fix: replace waitForLoadState('networkidle') with domcontentloaded in all E2E tests
Release / release (push) Failing after 10s
Release / release (push) Failing after 10s
This commit is contained in:
@@ -161,7 +161,7 @@ When('I click the {string} button', async function (buttonText: string) {
|
||||
console.log(`🌍 URL did not change immediately after click`);
|
||||
// Wait for potential network activity to settle
|
||||
try {
|
||||
await world.page.waitForLoadState('networkidle', { timeout: 3000 });
|
||||
await world.page.waitForLoadState('domcontentloaded', { timeout: 3000 });
|
||||
} catch {
|
||||
console.log(`🌍 Network idle not reached, continuing anyway`);
|
||||
}
|
||||
@@ -405,7 +405,7 @@ Then('I should see the {string} button', async function (buttonText: string) {
|
||||
});
|
||||
|
||||
Then('I should be redirected to {string}', async function (path: string) {
|
||||
await world.page.waitForLoadState('networkidle');
|
||||
await world.page.waitForLoadState('domcontentloaded');
|
||||
const currentUrl = world.page.url();
|
||||
|
||||
console.log(`🌍 Checking redirect to: ${path}`);
|
||||
@@ -436,7 +436,7 @@ When('I wait for {int} seconds', async function (seconds: number) {
|
||||
});
|
||||
|
||||
When('I wait for the page to load', async function () {
|
||||
await world.page.waitForLoadState('networkidle');
|
||||
await world.page.waitForLoadState('domcontentloaded');
|
||||
});
|
||||
|
||||
/**
|
||||
@@ -449,7 +449,7 @@ Then('the URL should contain {string}', async function (expectedPath: string) {
|
||||
});
|
||||
|
||||
Then('I should be redirected to the login page', async function () {
|
||||
await world.page.waitForLoadState('networkidle');
|
||||
await world.page.waitForLoadState('domcontentloaded');
|
||||
const currentUrl = world.page.url();
|
||||
|
||||
console.log(`🌍 Checking redirect to login page. Current URL: ${currentUrl}`);
|
||||
|
||||
Reference in New Issue
Block a user