Skip to content

Commit

Permalink
Fixed failures
Browse files Browse the repository at this point in the history
  • Loading branch information
davibroc committed Oct 25, 2024
1 parent df4d479 commit befb593
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 16 deletions.
19 changes: 12 additions & 7 deletions e2e/specs/swaps/swap-action-regression.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,20 +87,18 @@ describe(Regression('Multiple Swaps from Actions'), () => {
`(
"should swap $type token '$sourceTokenSymbol' to '$destTokenSymbol' on '$network.providerConfig.nickname'",
async ({ type, quantity, sourceTokenSymbol, destTokenSymbol, network }) => {
await TabBarComponent.tapWallet();
await WalletView.tapNetworksButtonOnNavBar();
await TestHelpers.delay(2000);

if (network.providerConfig.nickname !== currentNetwork)
{
await TabBarComponent.tapWallet();
await WalletView.tapNetworksButtonOnNavBar();
await Assertions.checkIfToggleIsOn(NetworkListModal.testNetToggle);
await NetworkListModal.changeNetworkTo(network.providerConfig.nickname, false);
await NetworkEducationModal.tapGotItButton();
await TestHelpers.delay(3000);
currentNetwork = network.providerConfig.nickname;
} else {
await NetworkListModal.changeNetworkTo(network.providerConfig.nickname, false);
}

await Assertions.checkIfVisible(WalletView.container);
await TabBarComponent.tapActions();
await TestHelpers.delay(1000);
Expand Down Expand Up @@ -148,7 +146,7 @@ describe(Regression('Multiple Swaps from Actions'), () => {
//Wait for Swap to complete
await SwapView.swapCompleteLabel(sourceTokenSymbol, destTokenSymbol);
await device.enableSynchronization();
await TestHelpers.delay(5000);
await TestHelpers.delay(10000);

// Check the swap activity completed
await TabBarComponent.tapActivity();
Expand All @@ -158,13 +156,20 @@ describe(Regression('Multiple Swaps from Actions'), () => {
);
await Assertions.checkIfElementToHaveText(ActivitiesView.firstTransactionStatus, ActivitiesViewSelectorsText.CONFIRM_TEXT, 60000);

// Check the tokeb approval completed
// Check the token approval completed
if (type === 'unapproved') {
await Assertions.checkIfVisible(
ActivitiesView.tokenApprovalActivity(sourceTokenSymbol),
);
await Assertions.checkIfElementToHaveText(ActivitiesView.secondTransactionStatus, ActivitiesViewSelectorsText.CONFIRM_TEXT, 60000);
}

await TabBarComponent.tapWallet();
await WalletView.tapIdenticon();
await Assertions.checkIfVisible(AccountListView.accountList);
// THis is need to update the token balance
await AccountListView.tapToSelectActiveAccountAtIndex(1);

},
);
});
20 changes: 12 additions & 8 deletions e2e/specs/swaps/swap-action-smoke.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,20 +86,17 @@ describe(SmokeSwaps('Swap from Actions'), () => {
`(
"should swap $type token '$sourceTokenSymbol' to '$destTokenSymbol' on '$network.providerConfig.nickname'",
async ({ type, quantity, sourceTokenSymbol, destTokenSymbol, network }) => {
await TabBarComponent.tapWallet();
await WalletView.tapNetworksButtonOnNavBar();
await TestHelpers.delay(2000);

if (network.providerConfig.nickname !== currentNetwork)
{
await TabBarComponent.tapWallet();
await WalletView.tapNetworksButtonOnNavBar();
await Assertions.checkIfToggleIsOn(NetworkListModal.testNetToggle);
await NetworkListModal.changeNetworkTo(network.providerConfig.nickname, false);
await NetworkEducationModal.tapGotItButton();
await TestHelpers.delay(3000);
currentNetwork = network.providerConfig.nickname;
} else {
await NetworkListModal.changeNetworkTo(network.providerConfig.nickname, false);
}

await Assertions.checkIfVisible(WalletView.container);
await TabBarComponent.tapActions();
await TestHelpers.delay(1000);
Expand Down Expand Up @@ -147,7 +144,7 @@ describe(SmokeSwaps('Swap from Actions'), () => {
//Wait for Swap to complete
await SwapView.swapCompleteLabel(sourceTokenSymbol, destTokenSymbol);
await device.enableSynchronization();
await TestHelpers.delay(5000);
await TestHelpers.delay(10000);

// Check the swap activity completed
await TabBarComponent.tapActivity();
Expand All @@ -157,13 +154,20 @@ describe(SmokeSwaps('Swap from Actions'), () => {
);
await Assertions.checkIfElementToHaveText(ActivitiesView.firstTransactionStatus, ActivitiesViewSelectorsText.CONFIRM_TEXT, 60000);

// Check the tokeb approval completed
// Check the token approval completed
if (type === 'unapproved') {
await Assertions.checkIfVisible(
ActivitiesView.tokenApprovalActivity(sourceTokenSymbol),
);
await Assertions.checkIfElementToHaveText(ActivitiesView.secondTransactionStatus, ActivitiesViewSelectorsText.CONFIRM_TEXT, 60000);
}

await TabBarComponent.tapWallet();
await WalletView.tapIdenticon();
await Assertions.checkIfVisible(AccountListView.accountList);
// THis is need to update the token balance
await AccountListView.tapToSelectActiveAccountAtIndex(1);

},
);
});
2 changes: 1 addition & 1 deletion e2e/specs/swaps/swap-token-chart.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ describe(Regression('Swap from Token view'), () => {
//Wait for Swap to complete
await SwapView.swapCompleteLabel('ETH', 'DAI');
await device.enableSynchronization();
await TestHelpers.delay(5000);
await TestHelpers.delay(10000);
await TokenOverview.isVisible();
await TokenOverview.tapBackButton();

Expand Down

0 comments on commit befb593

Please sign in to comment.