Skip to content

Commit 8a4d509

Browse files
committed
CCM-7465: update timeouts to 30 seconds and 10 seconds for expect. Create a new browser page on common page steps
1 parent f627f0d commit 8a4d509

File tree

4 files changed

+16
-5
lines changed

4 files changed

+16
-5
lines changed

tests/test-team/config/local.config.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ import baseConfig from './playwright.config';
44
export default defineConfig({
55
...baseConfig,
66

7-
timeout: 15_000,
8-
7+
timeout: 30_000, // 30 seconds in the playwright default
8+
expect: {
9+
timeout: 10_000 // default is 5 seconds. After creating and previewing sometimes the load is slow on a cold start
10+
},
911
projects: [
1012
{
1113
name: 'auth-setup',

tests/test-team/template-mgmt-component-tests/email/template-mgmt-preview-email-page.component.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,10 @@ test.describe('Preview Email message template Page', () => {
8383
await assertLogoutLink(props);
8484
await assertFooterLinks(props);
8585
await assertBackToAllTemplatesTopLink(props);
86-
await assertBackToAllTemplatesBottomLink(props);
86+
await assertBackToAllTemplatesBottomLink({
87+
...props,
88+
page: new TemplateMgmtPreviewEmailPage(page),
89+
});
8790
});
8891

8992
test('when user submits form with "Edit" data, then the "Create email message template" page is displayed', async ({

tests/test-team/template-mgmt-component-tests/nhs-app/template-mgmt-preview-nhs-app-page.component.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,10 @@ test.describe('Preview NHS App template Page', () => {
8282
await assertLogoutLink(props);
8383
await assertFooterLinks(props);
8484
await assertBackToAllTemplatesTopLink(props);
85-
await assertBackToAllTemplatesBottomLink(props);
85+
await assertBackToAllTemplatesBottomLink({
86+
...props,
87+
page: new TemplateMgmtPreviewNhsAppPage(page),
88+
});
8689
});
8790

8891
test('when user submits form with "Edit" data, then the "Create NHS App message template" page is displayed', async ({

tests/test-team/template-mgmt-component-tests/sms/template-mgmt-preview-sms-page.component.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,10 @@ test.describe('Preview SMS message template Page', () => {
8282
await assertLogoutLink(props);
8383
await assertFooterLinks(props);
8484
await assertBackToAllTemplatesTopLink(props);
85-
await assertBackToAllTemplatesBottomLink(props);
85+
await assertBackToAllTemplatesBottomLink({
86+
...props,
87+
page: new TemplateMgmtPreviewSmsPage(page),
88+
});
8689
});
8790

8891
test('when user submits form with "Edit" data, then the "Create text message template" page is displayed', async ({

0 commit comments

Comments
 (0)