Skip to content

Commit

Permalink
fix: added timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
Toto-hitori committed May 5, 2024
1 parent 0386a25 commit 6b424e3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ let browser;
defineFeature(feature, test => {
beforeAll(async () => {
browser = process.env.GITHUB_ACTIONS
? await puppeteer.launch()
? await puppeteer.launch({ ignoreHTTPSErrors: true})
: await puppeteer.launch({ headless: false, slowMo: 100, ignoreHTTPSErrors: true });
page = await browser.newPage();
//Way of setting up the timeout
Expand Down
3 changes: 2 additions & 1 deletion webapp/e2e/steps/logout_positive_logged_user.steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ defineFeature(feature, test => {
});

and('User presses the log out button', async() => {
await expect(page).toClick("button[data-testid='LogOut']");
await new Promise(resolve => setTimeout(resolve, 5000)); // Waiting for page to fully load
await expect(page).toClick("button[data-testid='LogOut']");

});

Expand Down
3 changes: 2 additions & 1 deletion webapp/e2e/steps/seeing_rules_positive.steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ defineFeature(feature, test => {
});

and('The user presses the button for seeing the rules', async() => {
await expect(page).toClick("button[data-testid='rules']");
await new Promise(resolve => setTimeout(resolve, 5000)); // Waiting for page to fully load
await expect(page).toClick("button[data-testid='rules']");

});

Expand Down
3 changes: 2 additions & 1 deletion webapp/e2e/steps/seeing_stats_positive.steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ defineFeature(feature, test => {
});

and('The user presses the button for seeing stats', async() => {
await expect(page).toClick("button[data-testid='statistics']");
await new Promise(resolve => setTimeout(resolve, 5000)); // Waiting for page to fully load
await expect(page).toClick("button[data-testid='statistics']");

});

Expand Down

0 comments on commit 6b424e3

Please sign in to comment.