Skip to content

Commit 585298f

Browse files
renemadsenclaude
andcommitted
fix: test a timeout and test b date month offset
- Test a: increase timeout to 240s, move login inside first test - Test b: use getMonth()+1 for Playwright date picker (expects 1-based months) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent b508f78 commit 585298f

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

eform-client/playwright/e2e/plugins/workflow-pn/a/workflow-settings.spec.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ let page;
88
test.describe('Application settings page - site header section', () => {
99
test.beforeAll(async ({ browser }) => {
1010
page = await browser.newPage();
11-
const loginPage = new LoginPage(page);
12-
await loginPage.open('/auth');
1311
});
1412

1513
test.afterAll(async () => {
@@ -21,6 +19,7 @@ test.describe('Application settings page - site header section', () => {
2119
const myEformsPage = new MyEformsPage(page);
2220
const pluginPage = new PluginPage(page);
2321

22+
await loginPage.open('/auth');
2423
await loginPage.login();
2524
await myEformsPage.Navbar.goToPluginsPage();
2625

@@ -31,9 +30,7 @@ test.describe('Application settings page - site header section', () => {
3130
});
3231

3332
test('should activate the plugin', async () => {
34-
test.setTimeout(180000);
35-
const loginPage = new LoginPage(page);
36-
const myEformsPage = new MyEformsPage(page);
33+
test.setTimeout(240000);
3734
const pluginPage = new PluginPage(page);
3835

3936
const plugin = await pluginPage.getFirstPluginRowObj();

eform-client/playwright/e2e/plugins/workflow-pn/b/workflow-edit.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ test.describe('Workflow cases - Edit', () => {
2727
modelForUpdate.status = 'Igangværende';
2828
modelForUpdate.actionPlan = generateRandmString();
2929
modelForUpdate.description = generateRandmString();
30-
modelForUpdate.deadline = { day: dateNow.getDate(), month: dateNow.getMonth(), year: dateNow.getFullYear() };
31-
modelForUpdate.dateOfIncident = { day: dateNow.getDate(), month: dateNow.getMonth(), year: dateNow.getFullYear() };
30+
modelForUpdate.deadline = { day: dateNow.getDate(), month: dateNow.getMonth() + 1, year: dateNow.getFullYear() };
31+
modelForUpdate.dateOfIncident = { day: dateNow.getDate(), month: dateNow.getMonth() + 1, year: dateNow.getFullYear() };
3232
const firstWorkflowCase = await workflowCasesPage.getFirstWorkflowCase();
3333
await firstWorkflowCase.update(modelForUpdate, true);
3434
const findWorkflowCase = await workflowCasesPage.getFirstWorkflowCase();
@@ -46,8 +46,8 @@ test.describe('Workflow cases - Edit', () => {
4646
modelForUpdate.status = 'Igangværende';
4747
modelForUpdate.actionPlan = generateRandmString();
4848
modelForUpdate.description = generateRandmString();
49-
modelForUpdate.deadline = { day: dateNow.getDate(), month: dateNow.getMonth(), year: dateNow.getFullYear() };
50-
modelForUpdate.dateOfIncident = { day: dateNow.getDate(), month: dateNow.getMonth(), year: dateNow.getFullYear() };
49+
modelForUpdate.deadline = { day: dateNow.getDate(), month: dateNow.getMonth() + 1, year: dateNow.getFullYear() };
50+
modelForUpdate.dateOfIncident = { day: dateNow.getDate(), month: dateNow.getMonth() + 1, year: dateNow.getFullYear() };
5151
const firstWorkflowCase = await workflowCasesPage.getFirstWorkflowCase();
5252
await firstWorkflowCase.update(modelForUpdate);
5353
const findWorkflowCase = await workflowCasesPage.getFirstWorkflowCase();

0 commit comments

Comments
 (0)