From b70886a99b466366e84d24271adbb890aebf6460 Mon Sep 17 00:00:00 2001
From: Dan Miller <danjm.com@gmail.com>
Date: Mon, 5 Nov 2018 13:31:46 -0330
Subject: Fixes for components that break e2e gas customization tests, plus
 unit test updates.

---
 .../send-gas-row/tests/send-gas-row-component.test.js     | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

(limited to 'ui/app/components/send/send-content/send-gas-row/tests/send-gas-row-component.test.js')

diff --git a/ui/app/components/send/send-content/send-gas-row/tests/send-gas-row-component.test.js b/ui/app/components/send/send-content/send-gas-row/tests/send-gas-row-component.test.js
index 171cd7bf6..059c6cdd3 100644
--- a/ui/app/components/send/send-content/send-gas-row/tests/send-gas-row-component.test.js
+++ b/ui/app/components/send/send-content/send-gas-row/tests/send-gas-row-component.test.js
@@ -10,6 +10,7 @@ import GasPriceButtonGroup from '../../../../gas-customization/gas-price-button-
 
 const propsMethodSpies = {
   showCustomizeGasModal: sinon.spy(),
+  resetGasButtons: sinon.spy(),
 }
 
 describe('SendGasRow Component', function () {
@@ -22,9 +23,9 @@ describe('SendGasRow Component', function () {
       gasFeeError={'mockGasFeeError'}
       gasLoadingError={false}
       gasTotal={'mockGasTotal'}
-      showGasButtonGroup={'mockShowGasPriceButtonGroup'}
       gasButtonGroupShown={false}
       showCustomizeGasModal={propsMethodSpies.showCustomizeGasModal}
+      resetGasButtons={propsMethodSpies.resetGasButtons}
       gasPriceButtonGroupProps={{
         someGasPriceButtonGroupProp: 'foo',
         anotherGasPriceButtonGroupProp: 'bar',
@@ -33,7 +34,7 @@ describe('SendGasRow Component', function () {
   })
 
   afterEach(() => {
-    propsMethodSpies.showCustomizeGasModal.resetHistory()
+    propsMethodSpies.resetGasButtons.resetHistory()
   })
 
   describe('render', () => {
@@ -63,17 +64,15 @@ describe('SendGasRow Component', function () {
         convertedCurrency,
         gasLoadingError,
         gasTotal,
-        onClick,
-        showGasButtonGroup,
+        onReset,
       } = wrapper.find(SendRowWrapper).childAt(0).props()
       assert.equal(conversionRate, 20)
       assert.equal(convertedCurrency, 'mockConvertedCurrency')
       assert.equal(gasLoadingError, false)
       assert.equal(gasTotal, 'mockGasTotal')
-      assert.equal(showGasButtonGroup, 'mockShowGasPriceButtonGroup')
-      assert.equal(propsMethodSpies.showCustomizeGasModal.callCount, 0)
-      onClick()
-      assert.equal(propsMethodSpies.showCustomizeGasModal.callCount, 1)
+      assert.equal(propsMethodSpies.resetGasButtons.callCount, 0)
+      onReset()
+      assert.equal(propsMethodSpies.resetGasButtons.callCount, 1)
     })
 
     it('should render the GasPriceButtonGroup if gasButtonGroupShown is true', () => {
-- 
cgit