Skip to content

Commit e4dc5b8

Browse files
renemadsenclaude
andcommitted
fix: trim whitespace in test a assertions, fix date assertion in test b
- Test a: trim plugin name/status to handle whitespace from textContent() - Test b: use month-1 in setFullYear() since picker month is 1-based but JS Date month is 0-based Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 585298f commit e4dc5b8

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ test.describe('Application settings page - site header section', () => {
2525

2626
const plugin = await pluginPage.getFirstPluginRowObj();
2727
expect(plugin.id).toBe(1);
28-
expect(plugin.name).toBe('Microting Workflow Plugin');
29-
expect(plugin.status).toBe('toggle_off');
28+
expect(plugin.name.trim()).toBe('Microting Workflow Plugin');
29+
expect(plugin.status.trim()).toBe('toggle_off');
3030
});
3131

3232
test('should activate the plugin', async () => {
@@ -39,7 +39,7 @@ test.describe('Application settings page - site header section', () => {
3939
// After enableOrDisablePlugin: re-logged in and on plugins page
4040
const pluginAfter = await pluginPage.getFirstPluginRowObj();
4141
expect(pluginAfter.id).toBe(1);
42-
expect(pluginAfter.name).toBe('Microting Workflow Plugin');
43-
expect(pluginAfter.status).toBe('toggle_on');
42+
expect(pluginAfter.name.trim()).toBe('Microting Workflow Plugin');
43+
expect(pluginAfter.status.trim()).toBe('toggle_on');
4444
});
4545
});

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,14 @@ test.describe('Workflow cases - Edit', () => {
5757
const dateOfIncident = new Date();
5858
dateOfIncident.setFullYear(
5959
modelForUpdate.dateOfIncident.year,
60-
modelForUpdate.dateOfIncident.month,
60+
modelForUpdate.dateOfIncident.month - 1,
6161
modelForUpdate.dateOfIncident.day,
6262
);
6363

6464
const deadline = new Date();
6565
deadline.setFullYear(
6666
modelForUpdate.deadline.year,
67-
modelForUpdate.deadline.month,
67+
modelForUpdate.deadline.month - 1,
6868
modelForUpdate.deadline.day,
6969
);
7070

0 commit comments

Comments
 (0)