-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into marketing-consent-tracking-bug
- Loading branch information
Showing
12 changed files
with
150 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
'use strict'; | ||
import { SmokeCore } from '../../tags'; | ||
import TestHelpers from '../../helpers'; | ||
import WalletView from '../../pages/wallet/WalletView'; | ||
import AmountView from '../../pages/Send/AmountView'; | ||
import SendView from '../../pages/Send/SendView'; | ||
import { loginToApp } from '../../viewHelper'; | ||
import TransactionConfirmationView from '../../pages/Send/TransactionConfirmView'; | ||
import TokenOverview from '../../pages/wallet/TokenOverview'; | ||
import Assertions from '../../utils/Assertions'; | ||
import TabBarComponent from '../../pages/wallet/TabBarComponent'; | ||
import { | ||
defaultGanacheOptions, | ||
stopFixtureServer, | ||
withFixtures, | ||
} from '../../fixtures/fixture-helper'; | ||
import FixtureServer from '../../fixtures/fixture-server'; | ||
import FixtureBuilder from '../../fixtures/fixture-builder'; | ||
import Gestures from '../../utils/Gestures'; | ||
import { ActivitiesViewSelectorsText, sentMessageTokenIDs } from '../../selectors/Transactions/ActivitiesView.selectors'; | ||
import { contractConfiguration } from '../../../app/util/test/smart-contracts'; | ||
|
||
const INCORRECT_SEND_ADDRESS = '0xebe6CcB6B55e1d094d9c58980Bc10Fed69932cAb'; | ||
const CORRECT_SEND_ADDRESS = '0x37cc5ef6bfe753aeaf81f945efe88134b238face'; | ||
const SHORTHAND_ADDRESS = '0x37Cc...FACE'; | ||
const fixtureServer = new FixtureServer(); | ||
|
||
describe( | ||
SmokeCore('Send ETH to the correct address after editing the recipient'), | ||
() => { | ||
beforeEach(() => { | ||
jest.setTimeout(200000); | ||
}); | ||
|
||
afterAll(async () => { | ||
await stopFixtureServer(fixtureServer); | ||
}); | ||
|
||
it('should display correct send address after edit', async () => { | ||
await withFixtures( | ||
{ | ||
fixture: new FixtureBuilder().withGanacheNetwork().build(), | ||
restartDevice: true, | ||
ganacheOptions: defaultGanacheOptions, | ||
}, | ||
async () => { | ||
await loginToApp(); | ||
await Assertions.checkIfVisible(WalletView.container); | ||
await TabBarComponent.tapActions(); | ||
await TokenOverview.tapActionSheetSendButton(); | ||
await SendView.inputAddress(INCORRECT_SEND_ADDRESS); | ||
|
||
await SendView.tapNextButton(); | ||
await AmountView.typeInTransactionAmount('0.000001'); | ||
|
||
await AmountView.tapNextButton(); | ||
|
||
//Assert Address | ||
const address = await SendView.splitAddressText(); | ||
await Assertions.checkIfTextMatches(address[0], INCORRECT_SEND_ADDRESS); | ||
|
||
await SendView.tapBackButton(); | ||
await AmountView.tapBackButton(); | ||
await SendView.removeAddress(); | ||
await SendView.inputAddress(CORRECT_SEND_ADDRESS); | ||
await SendView.tapNextButton(); | ||
await AmountView.typeInTransactionAmount('0.000001'); | ||
|
||
await AmountView.tapNextButton(); | ||
|
||
// Assert correct address | ||
const correctAddress = await SendView.splitAddressText(); | ||
await Assertions.checkIfTextMatches(correctAddress[0], CORRECT_SEND_ADDRESS); | ||
|
||
//Assert transactions send screen on IOS only due to android limitations | ||
if (device.getPlatform() === 'ios') { | ||
// Tap Send | ||
await TransactionConfirmationView.tapConfirmButton(); | ||
|
||
// Transactions view to assert address remains consistent | ||
await TabBarComponent.tapActivity(); | ||
await TestHelpers.delay(3000); | ||
await TestHelpers.tapByText(ActivitiesViewSelectorsText.CONFIRM_TEXT); | ||
await Assertions.checkIfTextIsDisplayed(`${SHORTHAND_ADDRESS}`); | ||
} | ||
}, | ||
); | ||
}); | ||
}, | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters