Skip to content

Commit

Permalink
changed(e2e tests): open ProductDetails page more reliably
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimir-8 committed Dec 6, 2024
1 parent 74dd9a9 commit daae444
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions e2e/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,15 @@ export const addProduct = async id => {

await element(by.id(id)).tap();

// Product details page
await waitFor(element(by.id('productDetails')))
.toBeVisible()
.withTimeout(3000);
try {
// Product details page
await waitFor(element(by.id('productDetails')))
.toBeVisible()
.withTimeout(1000);
} catch (e) {
//FIXME: it seems that sometimes the tap does not work on the first try
await element(by.id(id)).tap();
}

// FIXME: with a local coopcycle-web instance, we'll have more control over the test data
// As there is no way to know the number of sections,
Expand Down

0 comments on commit daae444

Please sign in to comment.