Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Fix swap smoke tests #11001

Merged
merged 7 commits into from
Sep 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions e2e/pages/swaps/SwapView.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {

import Matchers from '../../utils/Matchers';
import Gestures from '../../utils/Gestures';
import Assertions from '../../utils/Assertions';

class SwapView {
get quoteSummary() {
Expand Down Expand Up @@ -37,10 +36,11 @@ class SwapView {

async swipeToSwap() {
const percentage = device.getPlatform() === 'ios' ? 0.72 : 0.95;
// Wait for counter to go down to 0:05
// as the flashing gas fees happening when counter is 0:15
// will disables the swipe button
await Assertions.checkIfTextIsDisplayed('New quotes in 0:05');

// Swipe could happen at the same time when gas fees are falshing
// and that's when the swipe button becomes disabled
// that's the need to retry
await Gestures.swipe(this.swipeToSwapButton, 'right', 'fast', percentage);
await Gestures.swipe(this.swipeToSwapButton, 'right', 'fast', percentage);
}

Expand All @@ -52,7 +52,7 @@ class SwapView {

async tapIUnderstandPriceWarning() {
try {
await Gestures.waitAndTap(this.iUnderstandLabel);
await Gestures.waitAndTap(this.iUnderstandLabel, 5000);
} catch (e) {
// eslint-disable-next-line no-console
console.log(`Price warning not displayed: ${e}`);
Expand Down
Loading