Browse Source

test: network validation flaky

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/5903/head
Raju Udava 1 year ago
parent
commit
6ea1b4cfa2
  1. 18
      tests/playwright/pages/Account/Settings.ts
  2. 4
      tests/playwright/tests/db/users&Accounts/accountUserSettings.spec.ts

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

@ -10,12 +10,18 @@ export class AccountSettingsPage extends BasePage {
this.accountPage = accountPage;
}
async goto() {
return this.waitForResponse({
uiAction: async () => await this.rootPage.goto('/#/account/users/settings'),
httpMethodsToMatch: ['GET'],
requestUrlPathToMatch: `api/v1/app-settings`,
});
async goto(p: { networkValidation: boolean }) {
if (p.networkValidation) {
return this.waitForResponse({
uiAction: async () => await this.rootPage.goto('/#/account/users/settings'),
httpMethodsToMatch: ['GET'],
requestUrlPathToMatch: `api/v1/app-settings`,
});
} else {
await this.rootPage.goto('/#/account/users/settings');
await this.rootPage.waitForTimeout(500);
return;
}
}
get() {

4
tests/playwright/tests/db/users&Accounts/accountUserSettings.spec.ts

@ -20,7 +20,7 @@ test.describe('App settings', () => {
test('Toggle invite only signup', async () => {
test.slow();
await accountSettingsPage.goto();
await accountSettingsPage.goto({ networkValidation: false });
// todo: remove after route navigation issue resolved
await accountSettingsPage.rootPage.reload({ waitUntil: 'load' });
@ -44,7 +44,7 @@ test.describe('App settings', () => {
await signupPage.rootPage.reload({ waitUntil: 'load' });
await accountSettingsPage.goto();
await accountSettingsPage.goto({ networkValidation: false });
await accountSettingsPage.checkInviteOnlySignupCheckbox(true);
await accountSettingsPage.toggleInviteOnlyCheckbox();

Loading…
Cancel
Save