Skip to content

Commit

Permalink
Added skip test if no quote found
Browse files Browse the repository at this point in the history
  • Loading branch information
davibroc committed Sep 24, 2024
1 parent 2a95bdf commit 3c1229a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export class NetworkController {
}

async waitForNetworkToSwitch(networkName: string) {
await this.page.waitForTimeout(3000)
await this.page.waitForTimeout(3000);
await this.page.waitForSelector(`button:has-text("${networkName}")`);
}
}
14 changes: 9 additions & 5 deletions test/e2e/playwright/swap/specs/swap.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const testSet = [
source: 'ETH',
type: 'native',
destination: 'USDC',
network: Tenderly.Abritrum,
network: Tenderly.Optimism,
},
{
quantity: '.3',
Expand Down Expand Up @@ -88,11 +88,10 @@ test.beforeAll(
activityListPage = new ActivityListPage(page);
walletPage = new WalletPage(page);

// await networkController.addCustomNetwork(Tenderly.Optimism, false);
// await networkController.addCustomNetwork(Tenderly.Abritrum, false);
// await networkController.addCustomNetwork(Tenderly.Mainnet, true);
await networkController.addCustomNetwork(Tenderly.Mainnet);
await networkController.addCustomNetwork(Tenderly.Optimism);
await networkController.addCustomNetwork(Tenderly.Abritrum);
await networkController.addCustomNetwork(Tenderly.Mainnet);

await walletPage.importAccount(wallet.privateKey);
},
);
Expand All @@ -115,6 +114,11 @@ testSet.forEach((options) => {
});
} else {
await swapPage.gotBack();
// eslint-disable-next-line no-console
console.error(
`\t\tERROR: No quotes found on ${options.network.name} network' Skipping the test`,
);
test.skip();
}
});
});

0 comments on commit 3c1229a

Please sign in to comment.