Browse Source

fix(tests): remove waitUntil: 'networkidle'

pull/5903/head
Wing-Kam Wong 2 years ago
parent
commit
744461c3d4
  1. 2
      tests/playwright/pages/Account/AppStore.ts
  2. 2
      tests/playwright/pages/Account/License.ts
  3. 3
      tests/playwright/pages/Account/Settings.ts
  4. 2
      tests/playwright/pages/Account/Token.ts
  5. 2
      tests/playwright/pages/Account/Users.ts
  6. 2
      tests/playwright/pages/SigninPage/index.ts
  7. 2
      tests/playwright/pages/SignupPage/index.ts
  8. 2
      tests/playwright/setup/index.ts
  9. 4
      tests/playwright/tests/db/accountUserManagement.spec.ts
  10. 2
      tests/playwright/tests/db/rolesSuperUser.spec.ts
  11. 2
      tests/playwright/tests/db/swagger.spec.ts

2
tests/playwright/pages/Account/AppStore.ts

@ -12,7 +12,7 @@ export class AccountAppStorePage extends BasePage {
async goto() {
await this.waitForResponse({
uiAction: () => this.rootPage.goto('/#/account/apps', { waitUntil: 'networkidle' }),
uiAction: async () => await this.rootPage.goto('/#/account/apps'),
httpMethodsToMatch: ['GET'],
requestUrlPathToMatch: 'api/v1/db/meta/plugins',
});

2
tests/playwright/pages/Account/License.ts

@ -10,7 +10,7 @@ export class AccountLicensePage extends BasePage {
}
async goto() {
await this.rootPage.goto('/#/account/license', { waitUntil: 'networkidle' });
await this.rootPage.goto('/#/account/license');
}
async waitUntilContentLoads() {

3
tests/playwright/pages/Account/Settings.ts

@ -11,9 +11,8 @@ export class AccountSettingsPage extends BasePage {
}
async goto() {
// await this.rootPage.goto('/#/account/users/settings', { waitUntil: 'networkidle' });
await this.waitForResponse({
uiAction: () => this.rootPage.goto('/#/account/users/settings', { waitUntil: 'networkidle' }),
uiAction: async () => await this.rootPage.goto('/#/account/users/settings'),
httpMethodsToMatch: ['GET'],
requestUrlPathToMatch: `api/v1/app-settings`,
});

2
tests/playwright/pages/Account/Token.ts

@ -15,7 +15,7 @@ export class AccountTokenPage extends BasePage {
}
async goto() {
await this.rootPage.goto('/#/account/tokens', { waitUntil: 'networkidle' });
await this.rootPage.goto('/#/account/tokens');
}
get() {

2
tests/playwright/pages/Account/Users.ts

@ -18,7 +18,7 @@ export class AccountUsersPage extends BasePage {
}
async goto() {
await this.rootPage.goto('/#/account/users/list', { waitUntil: 'networkidle' });
await this.rootPage.goto('/#/account/users/list');
}
get() {

2
tests/playwright/pages/SigninPage/index.ts

@ -17,7 +17,7 @@ export class SigninPage extends BasePage {
}
goto() {
return this.rootPage.goto('/#/signin/', { waitUntil: 'networkidle' });
return this.rootPage.goto('/#/signin/');
}
get() {

2
tests/playwright/pages/SignupPage/index.ts

@ -17,7 +17,7 @@ export class SignupPage extends BasePage {
}
goto() {
return this.rootPage.goto('/#/signup/', { waitUntil: 'networkidle' });
return this.rootPage.goto('/#/signup/');
}
get() {

2
tests/playwright/setup/index.ts

@ -79,7 +79,7 @@ const setup = async ({ page, isEmptyProject }: { page: Page; isEmptyProject?: bo
const project = response.data.project;
await page.goto(`/#/nc/${project.id}/auth`, { waitUntil: 'networkidle' });
await page.goto(`/#/nc/${project.id}/auth`);
return { project, token, dbType, workerId } as NcContext;
};

4
tests/playwright/tests/db/accountUserManagement.spec.ts

@ -28,7 +28,7 @@ test.describe('User roles', () => {
projectsPage = new ProjectsPage(accountPage.rootPage);
});
test('Invite user, update role and delete user', async () => {
test.only('Invite user, update role and delete user', async () => {
test.slow();
await accountUsersPage.goto();
@ -41,7 +41,7 @@ test.describe('User roles', () => {
});
await accountUsersPage.closeInvite();
await signupAndVerify(i);
await accountPage.rootPage.reload({ waitUntil: 'networkidle' });
await accountPage.rootPage.reload();
await accountUsersPage.goto();
}

2
tests/playwright/tests/db/rolesSuperUser.spec.ts

@ -14,7 +14,7 @@ test.describe('Super user', () => {
test('AppStore access', async () => {
await dashboard.closeTab({ title: 'Team & Auth' });
await dashboard.rootPage.goto('/#/account/apps', { waitUntil: 'networkidle' });
await dashboard.rootPage.goto('/#/account/apps');
await dashboard.rootPage.waitForLoadState('load');
const appPage = await dashboard.rootPage;

2
tests/playwright/tests/db/swagger.spec.ts

@ -16,7 +16,7 @@ test.describe('Table Column Operations', () => {
test('Create column', async () => {
// access swagger link
const link = `http://localhost:8080/api/v1/db/meta/projects/${context.project.id}/swagger`;
await dashboard.rootPage.goto(link, { waitUntil: 'networkidle' });
await dashboard.rootPage.goto(link);
const swagger = await dashboard.rootPage;

Loading…
Cancel
Save