Skip to content

Commit

Permalink
Add force option for number inputs in functional tests
Browse files Browse the repository at this point in the history
  • Loading branch information
monsieurswag committed Sep 13, 2024
1 parent a0175ff commit bc17259
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/tests/utils/form-content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export class FormContent {
case FormFieldType.DATE:
await field.locator.clear();
case FormFieldType.NUMBER:
await field?.locator.fill(values[key].toString());
await field?.locator.fill(values[key].toString(), { force: true });
default:
await field?.locator.fill(values[key]);

Check failure on line 120 in frontend/tests/utils/form-content.ts

View workflow job for this annotation

GitHub Actions / functional-tests (3.11, chromium)

[chromium] › functional/user-route.test.ts:6:1 › user usual routine actions are working correctly

1) [chromium] › functional/user-route.test.ts:6:1 › user usual routine actions are working correctly Error: locator.fill: value: expected string, got number at utils/form-content.ts:120 118 | await field?.locator.fill(values[key].toString(), { force: true }); 119 | default: > 120 | await field?.locator.fill(values[key]); | ^ 121 | break; 122 | } 123 | } at FormContent.fill (/home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/utils/form-content.ts:120:27) at PageContent.createItem (/home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/utils/page-content.ts:50:3) at /home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/functional/user-route.test.ts:104:3 at /home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/functional/user-route.test.ts:99:2

Check failure on line 120 in frontend/tests/utils/form-content.ts

View workflow job for this annotation

GitHub Actions / functional-tests (3.11, chromium)

[chromium] › functional/user-route.test.ts:6:1 › user usual routine actions are working correctly

1) [chromium] › functional/user-route.test.ts:6:1 › user usual routine actions are working correctly Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: locator.fill: value: expected string, got number at utils/form-content.ts:120 118 | await field?.locator.fill(values[key].toString(), { force: true }); 119 | default: > 120 | await field?.locator.fill(values[key]); | ^ 121 | break; 122 | } 123 | } at FormContent.fill (/home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/utils/form-content.ts:120:27) at PageContent.createItem (/home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/utils/page-content.ts:50:3) at /home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/functional/user-route.test.ts:104:3 at /home/runner/work/ciso-assistant-community/ciso-assistant-community/frontend/tests/functional/user-route.test.ts:99:2
break;
Expand Down

0 comments on commit bc17259

Please sign in to comment.