From f0f347777b3e6080a9a15b744543bee6921d46d3 Mon Sep 17 00:00:00 2001 From: Joseph Bergeron Date: Sun, 8 Sep 2024 23:50:26 -0400 Subject: [PATCH 01/12] test From d892d2a3c60ed4c53b850aea135aebba98e01efc Mon Sep 17 00:00:00 2001 From: Joseph Bergeron Date: Wed, 11 Sep 2024 12:58:39 -0400 Subject: [PATCH 02/12] test From eb0c9de31c7dad1c8ad16b07a6f622be8a8a40d8 Mon Sep 17 00:00:00 2001 From: Joseph Bergeron Date: Wed, 11 Sep 2024 13:15:36 -0400 Subject: [PATCH 03/12] Update e2e --- .github/workflows/e2e-android.yml | 2 +- .github/workflows/e2e-pr.yml | 12 ++++++------ e2e/scripts/consts.ts | 4 ++-- e2e/src/utils/consts.js | 10 +++++----- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/e2e-android.yml b/.github/workflows/e2e-android.yml index 1409314b923..4457cf8719d 100644 --- a/.github/workflows/e2e-android.yml +++ b/.github/workflows/e2e-android.yml @@ -12,7 +12,7 @@ jobs: runs-on: - nscloud-ubuntu-22.04-amd64-16x64-with-cache - nscloud-cache-size-20gb - - nscloud-cache-tag-wallet-e2e-android + - nscloud-cache-tag-ms-runtime-e2e-android # We pay by the minute. # If it takes longer it usually fails, so no need to pay for more timeout-minutes: 25 diff --git a/.github/workflows/e2e-pr.yml b/.github/workflows/e2e-pr.yml index 14893646fce..b31b495f1ff 100644 --- a/.github/workflows/e2e-pr.yml +++ b/.github/workflows/e2e-pr.yml @@ -18,9 +18,9 @@ jobs: with: android-api-level: 30 secrets: inherit - ios: - name: iOS - uses: ./.github/workflows/e2e-ios.yml - with: - ios-version: '15.0' - secrets: inherit + # ios: + # name: iOS + # uses: ./.github/workflows/e2e-ios.yml + # with: + # ios-version: '15.0' + # secrets: inherit diff --git a/e2e/scripts/consts.ts b/e2e/scripts/consts.ts index 7fb65ff556f..b5cb001a41e 100644 --- a/e2e/scripts/consts.ts +++ b/e2e/scripts/consts.ts @@ -1,4 +1,4 @@ -export const E2E_TEST_WALLET = '0x6131a6d616a4be3737b38988847270a64bc10caa' -export const E2E_TEST_WALLET_SECURE_SEND = '0x86b8f44386cb2d457db79c3dab8cf42f9d8a3fc0' +export const E2E_TEST_WALLET = '0x3f4f42aC3a5A3c54454F9d00C27bCAFA78Cc6856' +export const E2E_TEST_WALLET_SECURE_SEND = '0x4971094C1cB186b5589E5709c83D28c264865925' export const E2E_TEST_FAUCET = '0xe5F5363e31351C38ac82DBAdeaD91Fd5a7B08846' export const REFILL_TOKENS = ['CELO', 'cUSD', 'cEUR'] diff --git a/e2e/src/utils/consts.js b/e2e/src/utils/consts.js index 0ed6e417b45..858cc8a99b1 100644 --- a/e2e/src/utils/consts.js +++ b/e2e/src/utils/consts.js @@ -1,12 +1,12 @@ export const DEFAULT_RECIPIENT_ADDRESS = '0xe5F5363e31351C38ac82DBAdeaD91Fd5a7B08846' export const SAMPLE_BACKUP_KEY = - 'general debate dial flock want basket local machine effort monitor stomach purity attend brand extend salon obscure soul open floor useful like cause exhaust' + 'industry almost clinic kitchen garage vibrant episode credit solution blanket repair whisper height autumn elevator abstract viable gate girl sadness price process hard ready' export const SAMPLE_PRIVATE_KEY = // corresponds to backup key above - '0x34c78f42ec153668070bd55c0d237adcdfee0359f1ea473b8e16c8d5f99be14a' -export const SAMPLE_WALLET_ADDRESS = '0x6131a6d616a4be3737b38988847270a64bc10caa' // corresponds to the backup key above + '0x81f25dc705a953868e172e155ef02ecdf4e0b950af91918d0dd13fb5f586945c' +export const SAMPLE_WALLET_ADDRESS = '0x3f4f42aC3a5A3c54454F9d00C27bCAFA78Cc6856' // corresponds to the backup key above export const SAMPLE_BACKUP_KEY_VERIFIED = - 'embody siege middle glory soda solar nasty report swap now never any' -export const SAMPLE_WALLET_ADDRESS_VERIFIED = '0x86b8f44386cb2d457db79c3dab8cf42f9d8a3fc0' // corresponds to the backup key above + 'call broccoli practice engage private amused seek sure barely horn oyster try farm nest victory cloth pilot sense return glad wrist toilet device upset' +export const SAMPLE_WALLET_ADDRESS_VERIFIED = '0x4971094C1cB186b5589E5709c83D28c264865925' // corresponds to the backup key above export const SAMPLE_BACKUP_KEY_VERIFIED_2 = 'bench album relax truth pond orchard diet unaware cloud tackle twin tongue' export const SAMPLE_WALLET_ADDRESS_VERIFIED_2 = '0x5fe1407f47b1310ff232a8d368b36099eff61604' // corresponds to the backup key above From 9839455ac0981e421ed6111dac5c041de7d59b5c Mon Sep 17 00:00:00 2001 From: Joseph Bergeron Date: Wed, 11 Sep 2024 14:07:25 -0400 Subject: [PATCH 04/12] Try installing ninja --- .github/workflows/e2e-android.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/e2e-android.yml b/.github/workflows/e2e-android.yml index 4457cf8719d..f403b1bb3fb 100644 --- a/.github/workflows/e2e-android.yml +++ b/.github/workflows/e2e-android.yml @@ -50,6 +50,9 @@ jobs: yes | sdkmanager "platform-tools" "platforms;android-33" set -o pipefail + # Install Ninja + apt-get install ninja-build + # Allow the emulator to use /dev/kvm sudo adduser $USER kvm sudo chown $USER /dev/kvm From 18cc7d067258070444b0c807b8804a24c9c06f9e Mon Sep 17 00:00:00 2001 From: Joseph Bergeron Date: Wed, 11 Sep 2024 14:09:29 -0400 Subject: [PATCH 05/12] Sudo --- .github/workflows/e2e-android.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e-android.yml b/.github/workflows/e2e-android.yml index f403b1bb3fb..95c99740775 100644 --- a/.github/workflows/e2e-android.yml +++ b/.github/workflows/e2e-android.yml @@ -51,7 +51,7 @@ jobs: set -o pipefail # Install Ninja - apt-get install ninja-build + sudo apt-get install ninja-build # Allow the emulator to use /dev/kvm sudo adduser $USER kvm From 252b9c004634452d9bd0a906bdba298ac97eb6a0 Mon Sep 17 00:00:00 2001 From: Joseph Bergeron Date: Wed, 11 Sep 2024 16:34:58 -0400 Subject: [PATCH 06/12] Disable some tests --- e2e/src/usecases/NewAccountPhoneVerification.js | 3 ++- e2e/src/usecases/Send.js | 17 +++++++++-------- e2e/src/usecases/Settings.js | 3 ++- renovate.json5 | 2 +- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/e2e/src/usecases/NewAccountPhoneVerification.js b/e2e/src/usecases/NewAccountPhoneVerification.js index c9dde667b84..d324446b345 100644 --- a/e2e/src/usecases/NewAccountPhoneVerification.js +++ b/e2e/src/usecases/NewAccountPhoneVerification.js @@ -174,7 +174,8 @@ export default NewAccountPhoneVerification = () => { } // Assert correct content is visible on the phone verification screen - it('Then should have correct phone verification screen', async () => { + // TODO(mobilestack): Un-skip if CPV is enabled + it.skip('Then should have correct phone verification screen', async () => { await expect(element(by.id('PhoneVerificationHeader'))).toBeVisible() let skipAttributes = await element(by.text('Skip')).getAttributes() jestExpect(skipAttributes.enabled).toBe(true) diff --git a/e2e/src/usecases/Send.js b/e2e/src/usecases/Send.js index 88c868272cd..85d4fc085c8 100644 --- a/e2e/src/usecases/Send.js +++ b/e2e/src/usecases/Send.js @@ -133,6 +133,7 @@ export default Send = () => { }) }) + //TODO(mobilestack): Un-skip these if we ever support CPV describe('When multi-token send flow to phone number with one address', () => { beforeAll(async () => { await device.uninstallApp() @@ -141,12 +142,12 @@ export default Send = () => { await quickOnboarding({ mnemonic: SAMPLE_BACKUP_KEY_VERIFIED }) }) - it('Then should navigate to send search input from home action', async () => { + it.skip('Then should navigate to send search input from home action', async () => { await waitForElementByIdAndTap('HomeAction-Send', 30_000) await waitForElementId('SendSelectRecipientSearchInput', 10_000) }) - it('Then should be able to enter a phone number', async () => { + it.skip('Then should be able to enter a phone number', async () => { await waitForElementByIdAndTap('SendSelectRecipientSearchInput', 30_000) await element(by.id('SendSelectRecipientSearchInput')).typeText( SINGLE_ADDRESS_VERIFIED_PHONE_NUMBER @@ -155,23 +156,23 @@ export default Send = () => { await isElementVisible('RecipientItem', 0) }) - it('Then tapping a recipient should show send button', async () => { + it.skip('Then tapping a recipient should show send button', async () => { await element(by.id('RecipientItem')).atIndex(0).tap() await waitForElementId('SendOrInviteButton', 30_000) }) - it('Then tapping send button should navigate to Send Enter Amount screen', async () => { + it.skip('Then tapping send button should navigate to Send Enter Amount screen', async () => { await element(by.id('SendOrInviteButton')).tap() await waitForElementId('SendEnterAmount/TokenAmountInput', 30_000) }) - it('Then should be able to select token', async () => { + it.skip('Then should be able to select token', async () => { await element(by.id('SendEnterAmount/TokenSelect')).tap() await element(by.id('cUSDSymbol')).tap() await expect(element(by.text('cUSD')).atIndex(0)).toBeVisible() }) - it('Then should be able to enter amount and navigate to review screen', async () => { + it.skip('Then should be able to enter amount and navigate to review screen', async () => { await waitForElementByIdAndTap('SendEnterAmount/TokenAmountInput', 30_000) await element(by.id('SendEnterAmount/TokenAmountInput')).replaceText('0.01') await element(by.id('SendEnterAmount/TokenAmountInput')).tapReturnKey() @@ -179,11 +180,11 @@ export default Send = () => { await isElementVisible('ConfirmButton') }) - it('Then should display correct recipient', async () => { + it.skip('Then should display correct recipient', async () => { await expect(element(by.text(SINGLE_ADDRESS_VERIFIED_PHONE_NUMBER_DISPLAY))).toBeVisible() }) - it('Then should be able to send', async () => { + it.skip('Then should be able to send', async () => { await element(by.id('ConfirmButton')).tap() await enterPinUiIfNecessary() await expect(element(by.text('Transaction failed, please retry'))).not.toBeVisible() diff --git a/e2e/src/usecases/Settings.js b/e2e/src/usecases/Settings.js index 4d3c37a2486..7639523263c 100644 --- a/e2e/src/usecases/Settings.js +++ b/e2e/src/usecases/Settings.js @@ -16,7 +16,8 @@ export default Settings = () => { await sleep(3000) }) - it('Edit Profile Name', async () => { + // mobilestack: no profile support + it.skip('Edit Profile Name', async () => { let randomName = faker.lorem.words() await navigateToProfile() await element(by.id('ProfileSubmenu/EditProfile')).tap() diff --git a/renovate.json5 b/renovate.json5 index 8a42126c4fa..8491e8b2dc5 100644 --- a/renovate.json5 +++ b/renovate.json5 @@ -3,7 +3,7 @@ // Deps updates will be handled from the wallet repo and synced here // to avoid conflicts and duplicated PRs enabled: false, - + extends: ['github>valora-inc/renovate-config:default.json5', ':disableDigestUpdates'], // Restrict semantic commit type to "chore" From 44f85075969b6c148f472bd1bfb731e47bfe4108 Mon Sep 17 00:00:00 2001 From: Joseph Bergeron Date: Wed, 11 Sep 2024 16:38:09 -0400 Subject: [PATCH 07/12] Test From c80184370d20fd4c400bfffc57f42f26b14b8c35 Mon Sep 17 00:00:00 2001 From: Joseph Bergeron Date: Wed, 11 Sep 2024 18:11:56 -0400 Subject: [PATCH 08/12] Everything is working locally now --- e2e/src/HomeFeed.spec.js | 4 +++- e2e/src/usecases/WalletConnectV2.js | 2 +- e2e/src/utils/consts.js | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/e2e/src/HomeFeed.spec.js b/e2e/src/HomeFeed.spec.js index 39bb860decb..8042b727ca2 100644 --- a/e2e/src/HomeFeed.spec.js +++ b/e2e/src/HomeFeed.spec.js @@ -22,7 +22,9 @@ describe('Home Feed', () => { await expect(element(by.text(`$${amount}`)).atIndex(0)).toBeVisible() }) - it('should load more items on scroll', async () => { + // TODO(mobilestack): Un-skip once more items are in the feed. Currently + // there's not really a backlog so this will fail. + it.skip('should load more items on scroll', async () => { // Tap back button if present form previous test try { await element(by.id('BackChevron')).tap() diff --git a/e2e/src/usecases/WalletConnectV2.js b/e2e/src/usecases/WalletConnectV2.js index 7e6623366dc..a773349c32f 100644 --- a/e2e/src/usecases/WalletConnectV2.js +++ b/e2e/src/usecases/WalletConnectV2.js @@ -20,7 +20,7 @@ import jestExpect from 'expect' const dappName = 'WalletConnectV2 E2E' const walletAddress = ( - process.env.E2E_WALLET_ADDRESS || '0x6131a6d616a4be3737b38988847270a64bc10caa' + process.env.E2E_WALLET_ADDRESS || '0x3f4f42aC3a5A3c54454F9d00C27bCAFA78Cc6856' ).toLowerCase() const client = createPublicClient({ diff --git a/e2e/src/utils/consts.js b/e2e/src/utils/consts.js index 858cc8a99b1..46b82c5c02e 100644 --- a/e2e/src/utils/consts.js +++ b/e2e/src/utils/consts.js @@ -3,7 +3,7 @@ export const SAMPLE_BACKUP_KEY = 'industry almost clinic kitchen garage vibrant episode credit solution blanket repair whisper height autumn elevator abstract viable gate girl sadness price process hard ready' export const SAMPLE_PRIVATE_KEY = // corresponds to backup key above '0x81f25dc705a953868e172e155ef02ecdf4e0b950af91918d0dd13fb5f586945c' -export const SAMPLE_WALLET_ADDRESS = '0x3f4f42aC3a5A3c54454F9d00C27bCAFA78Cc6856' // corresponds to the backup key above +export const SAMPLE_WALLET_ADDRESS = '0x3f4f42ac3a5a3c54454f9d00c27bcafa78cc6856' // corresponds to the backup key above export const SAMPLE_BACKUP_KEY_VERIFIED = 'call broccoli practice engage private amused seek sure barely horn oyster try farm nest victory cloth pilot sense return glad wrist toilet device upset' export const SAMPLE_WALLET_ADDRESS_VERIFIED = '0x4971094C1cB186b5589E5709c83D28c264865925' // corresponds to the backup key above From b50cf8aec2764ee55403b5742095f867e5fff7b2 Mon Sep 17 00:00:00 2001 From: Joseph Bergeron Date: Wed, 11 Sep 2024 18:31:39 -0400 Subject: [PATCH 09/12] Continue to fix stuff --- e2e/scripts/check-e2e-wallet-balance.ts | 6 +----- e2e/scripts/fund-e2e-accounts.ts | 12 ++---------- e2e/src/SecureSend.spec.js | 3 ++- e2e/src/usecases/Send.js | 5 ++++- 4 files changed, 9 insertions(+), 17 deletions(-) diff --git a/e2e/scripts/check-e2e-wallet-balance.ts b/e2e/scripts/check-e2e-wallet-balance.ts index e78bb4dd3c6..626752c6fbc 100644 --- a/e2e/scripts/check-e2e-wallet-balance.ts +++ b/e2e/scripts/check-e2e-wallet-balance.ts @@ -1,11 +1,7 @@ -import { E2E_TEST_WALLET, E2E_TEST_WALLET_SECURE_SEND } from './consts' +import { E2E_TEST_WALLET } from './consts' import { checkBalance, getCeloTokensBalance } from './utils' ;(async () => { console.log(`E2E_TEST_WALLET: ${E2E_TEST_WALLET}`) console.table(await getCeloTokensBalance(E2E_TEST_WALLET)) await checkBalance(E2E_TEST_WALLET) - - console.log(`E2E_TEST_WALLET_SECURE_SEND: ${E2E_TEST_WALLET_SECURE_SEND}`) - console.table(await getCeloTokensBalance(E2E_TEST_WALLET_SECURE_SEND)) - await checkBalance(E2E_TEST_WALLET_SECURE_SEND) })() diff --git a/e2e/scripts/fund-e2e-accounts.ts b/e2e/scripts/fund-e2e-accounts.ts index c987376286a..5cb66905bcb 100644 --- a/e2e/scripts/fund-e2e-accounts.ts +++ b/e2e/scripts/fund-e2e-accounts.ts @@ -3,12 +3,7 @@ import dotenv from 'dotenv' // Would be nice to use viem, but mento is using ethers import { Contract, providers, utils, Wallet } from 'ethers' import { Address } from 'viem' -import { - E2E_TEST_FAUCET, - E2E_TEST_WALLET, - E2E_TEST_WALLET_SECURE_SEND, - REFILL_TOKENS, -} from './consts' +import { E2E_TEST_FAUCET, E2E_TEST_WALLET, REFILL_TOKENS } from './consts' import { checkBalance, getCeloTokensBalance } from './utils' const provider = new providers.JsonRpcProvider('https://alfajores-forno.celo-testnet.org') @@ -45,7 +40,7 @@ const TOKENS_BY_SYMBOL: Record = { } ;(async () => { - const walletsToBeFunded: Address[] = [E2E_TEST_WALLET, E2E_TEST_WALLET_SECURE_SEND] + const walletsToBeFunded: Address[] = [E2E_TEST_WALLET] const walletBalances = await Promise.all(walletsToBeFunded.map(getCeloTokensBalance)) for (let i = 0; i < walletsToBeFunded.length; i++) { console.log(`Initial balance for ${walletsToBeFunded[i]}:`) @@ -234,11 +229,8 @@ const TOKENS_BY_SYMBOL: Record = { // Log Balances console.log('E2E Test Account:', E2E_TEST_WALLET) console.table(await getCeloTokensBalance(E2E_TEST_WALLET)) - console.log('E2E Test Account Secure Send:', E2E_TEST_WALLET_SECURE_SEND) - console.table(await getCeloTokensBalance(E2E_TEST_WALLET_SECURE_SEND)) console.log('Valora Test Faucet:', E2E_TEST_FAUCET) console.table(await getCeloTokensBalance(E2E_TEST_FAUCET)) await checkBalance(E2E_TEST_WALLET) - await checkBalance(E2E_TEST_WALLET_SECURE_SEND) })() diff --git a/e2e/src/SecureSend.spec.js b/e2e/src/SecureSend.spec.js index cc2d5fe991b..7a088ef1e24 100644 --- a/e2e/src/SecureSend.spec.js +++ b/e2e/src/SecureSend.spec.js @@ -1,5 +1,6 @@ import SecureSend from './usecases/SecureSend' describe('Given', () => { - describe('SecureSend with CPV', SecureSend) + // TODO(mobilestack): Un-skip this usecase if we support CPV + // describe('SecureSend with CPV', SecureSend) }) diff --git a/e2e/src/usecases/Send.js b/e2e/src/usecases/Send.js index 85d4fc085c8..0152ac44e80 100644 --- a/e2e/src/usecases/Send.js +++ b/e2e/src/usecases/Send.js @@ -133,7 +133,10 @@ export default Send = () => { }) }) - //TODO(mobilestack): Un-skip these if we ever support CPV + // TODO(mobilestack): Un-skip these if we ever support CPV. + // This is the ONLY place in tests where the centrally verified e2e account + // is used, so enabling these also means we'll need to add this account (SAMPLE_BACKUP_KEY_VERIFIED) + // back into the funding scripts. describe('When multi-token send flow to phone number with one address', () => { beforeAll(async () => { await device.uninstallApp() From b7469efe64401733202569798b08972acb205ee8 Mon Sep 17 00:00:00 2001 From: Joseph Bergeron Date: Thu, 12 Sep 2024 09:44:27 -0400 Subject: [PATCH 10/12] Fix test --- e2e/src/SecureSend.spec.js | 3 +-- e2e/src/usecases/SecureSend.js | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/e2e/src/SecureSend.spec.js b/e2e/src/SecureSend.spec.js index 7a088ef1e24..cc2d5fe991b 100644 --- a/e2e/src/SecureSend.spec.js +++ b/e2e/src/SecureSend.spec.js @@ -1,6 +1,5 @@ import SecureSend from './usecases/SecureSend' describe('Given', () => { - // TODO(mobilestack): Un-skip this usecase if we support CPV - // describe('SecureSend with CPV', SecureSend) + describe('SecureSend with CPV', SecureSend) }) diff --git a/e2e/src/usecases/SecureSend.js b/e2e/src/usecases/SecureSend.js index 57bff1561c4..79e5d3f71a1 100644 --- a/e2e/src/usecases/SecureSend.js +++ b/e2e/src/usecases/SecureSend.js @@ -20,7 +20,8 @@ const AMOUNT_TO_SEND = '0.01' const WALLET_FUNDING_MULTIPLIER = 2.2 export default SecureSend = () => { - describe('Secure send flow with phone number lookup', () => { + // TODO(mobilestack): Un-skip this if we ever support CPV + describe.skip('Secure send flow with phone number lookup', () => { beforeAll(async () => { // uninstall the app to remove secure send mapping await device.uninstallApp() From bc0da9bf61763c1e4dfb96d7a04c6008d906ac8b Mon Sep 17 00:00:00 2001 From: Joseph Bergeron Date: Thu, 12 Sep 2024 10:23:38 -0400 Subject: [PATCH 11/12] Simplify skips --- e2e/src/usecases/Send.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/e2e/src/usecases/Send.js b/e2e/src/usecases/Send.js index 0152ac44e80..a7038a036b4 100644 --- a/e2e/src/usecases/Send.js +++ b/e2e/src/usecases/Send.js @@ -137,7 +137,7 @@ export default Send = () => { // This is the ONLY place in tests where the centrally verified e2e account // is used, so enabling these also means we'll need to add this account (SAMPLE_BACKUP_KEY_VERIFIED) // back into the funding scripts. - describe('When multi-token send flow to phone number with one address', () => { + describe.skip('When multi-token send flow to phone number with one address', () => { beforeAll(async () => { await device.uninstallApp() await device.installApp() @@ -145,12 +145,12 @@ export default Send = () => { await quickOnboarding({ mnemonic: SAMPLE_BACKUP_KEY_VERIFIED }) }) - it.skip('Then should navigate to send search input from home action', async () => { + it('Then should navigate to send search input from home action', async () => { await waitForElementByIdAndTap('HomeAction-Send', 30_000) await waitForElementId('SendSelectRecipientSearchInput', 10_000) }) - it.skip('Then should be able to enter a phone number', async () => { + it('Then should be able to enter a phone number', async () => { await waitForElementByIdAndTap('SendSelectRecipientSearchInput', 30_000) await element(by.id('SendSelectRecipientSearchInput')).typeText( SINGLE_ADDRESS_VERIFIED_PHONE_NUMBER @@ -159,23 +159,23 @@ export default Send = () => { await isElementVisible('RecipientItem', 0) }) - it.skip('Then tapping a recipient should show send button', async () => { + it('Then tapping a recipient should show send button', async () => { await element(by.id('RecipientItem')).atIndex(0).tap() await waitForElementId('SendOrInviteButton', 30_000) }) - it.skip('Then tapping send button should navigate to Send Enter Amount screen', async () => { + it('Then tapping send button should navigate to Send Enter Amount screen', async () => { await element(by.id('SendOrInviteButton')).tap() await waitForElementId('SendEnterAmount/TokenAmountInput', 30_000) }) - it.skip('Then should be able to select token', async () => { + it('Then should be able to select token', async () => { await element(by.id('SendEnterAmount/TokenSelect')).tap() await element(by.id('cUSDSymbol')).tap() await expect(element(by.text('cUSD')).atIndex(0)).toBeVisible() }) - it.skip('Then should be able to enter amount and navigate to review screen', async () => { + it('Then should be able to enter amount and navigate to review screen', async () => { await waitForElementByIdAndTap('SendEnterAmount/TokenAmountInput', 30_000) await element(by.id('SendEnterAmount/TokenAmountInput')).replaceText('0.01') await element(by.id('SendEnterAmount/TokenAmountInput')).tapReturnKey() @@ -183,11 +183,11 @@ export default Send = () => { await isElementVisible('ConfirmButton') }) - it.skip('Then should display correct recipient', async () => { + it('Then should display correct recipient', async () => { await expect(element(by.text(SINGLE_ADDRESS_VERIFIED_PHONE_NUMBER_DISPLAY))).toBeVisible() }) - it.skip('Then should be able to send', async () => { + it('Then should be able to send', async () => { await element(by.id('ConfirmButton')).tap() await enterPinUiIfNecessary() await expect(element(by.text('Transaction failed, please retry'))).not.toBeVisible() From d0bfcbdc36d414de65aaf7c04ac548a3b9b596b3 Mon Sep 17 00:00:00 2001 From: Joseph Bergeron Date: Thu, 12 Sep 2024 23:20:42 -0400 Subject: [PATCH 12/12] Comments --- .github/workflows/e2e-pr.yml | 14 ++++++++------ e2e/scripts/fund-e2e-accounts.ts | 12 ++++++++++-- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/.github/workflows/e2e-pr.yml b/.github/workflows/e2e-pr.yml index b31b495f1ff..421fc24e1d1 100644 --- a/.github/workflows/e2e-pr.yml +++ b/.github/workflows/e2e-pr.yml @@ -18,9 +18,11 @@ jobs: with: android-api-level: 30 secrets: inherit - # ios: - # name: iOS - # uses: ./.github/workflows/e2e-ios.yml - # with: - # ios-version: '15.0' - # secrets: inherit + ios: + # TODO re-enable after we're able to switch to Namespace for iOS + if: false + name: iOS + uses: ./.github/workflows/e2e-ios.yml + with: + ios-version: '15.0' + secrets: inherit diff --git a/e2e/scripts/fund-e2e-accounts.ts b/e2e/scripts/fund-e2e-accounts.ts index 5cb66905bcb..c987376286a 100644 --- a/e2e/scripts/fund-e2e-accounts.ts +++ b/e2e/scripts/fund-e2e-accounts.ts @@ -3,7 +3,12 @@ import dotenv from 'dotenv' // Would be nice to use viem, but mento is using ethers import { Contract, providers, utils, Wallet } from 'ethers' import { Address } from 'viem' -import { E2E_TEST_FAUCET, E2E_TEST_WALLET, REFILL_TOKENS } from './consts' +import { + E2E_TEST_FAUCET, + E2E_TEST_WALLET, + E2E_TEST_WALLET_SECURE_SEND, + REFILL_TOKENS, +} from './consts' import { checkBalance, getCeloTokensBalance } from './utils' const provider = new providers.JsonRpcProvider('https://alfajores-forno.celo-testnet.org') @@ -40,7 +45,7 @@ const TOKENS_BY_SYMBOL: Record = { } ;(async () => { - const walletsToBeFunded: Address[] = [E2E_TEST_WALLET] + const walletsToBeFunded: Address[] = [E2E_TEST_WALLET, E2E_TEST_WALLET_SECURE_SEND] const walletBalances = await Promise.all(walletsToBeFunded.map(getCeloTokensBalance)) for (let i = 0; i < walletsToBeFunded.length; i++) { console.log(`Initial balance for ${walletsToBeFunded[i]}:`) @@ -229,8 +234,11 @@ const TOKENS_BY_SYMBOL: Record = { // Log Balances console.log('E2E Test Account:', E2E_TEST_WALLET) console.table(await getCeloTokensBalance(E2E_TEST_WALLET)) + console.log('E2E Test Account Secure Send:', E2E_TEST_WALLET_SECURE_SEND) + console.table(await getCeloTokensBalance(E2E_TEST_WALLET_SECURE_SEND)) console.log('Valora Test Faucet:', E2E_TEST_FAUCET) console.table(await getCeloTokensBalance(E2E_TEST_FAUCET)) await checkBalance(E2E_TEST_WALLET) + await checkBalance(E2E_TEST_WALLET_SECURE_SEND) })()