Fixed failing frontend tests#3213
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes failing frontend tests by addressing Node version and timezone inconsistencies between local development and CI/CD environments. The changes ensure tests run consistently regardless of the environment's Node version or timezone settings.
Changes:
- Set UTC timezone for all test runs to eliminate timezone-dependent test failures
- Increase test timeout for long-running scan form tests
- Update TimePicker test assertions to handle browser differences in millisecond formatting
- Pin @testing-library/dom dependency version
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| frontend/package.json | Sets UTC timezone for test script and pins @testing-library/dom dependency version |
| frontend/tests/components/scan/ScanForm/ScanForm.toastRedirect.test.jsx | Increases Jest timeout to 30 seconds for longer-running tests |
| frontend/tests/components/common/TimePicker.test.jsx | Updates assertions to use regex matching for datetime values, handling optional milliseconds |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ); | ||
|
|
||
| jest.setTimeout(30000); | ||
| describe("ScanForm adavanced use", () => { |
There was a problem hiding this comment.
Spelling error: "adavanced" should be "advanced".
| describe("ScanForm adavanced use", () => { | |
| describe("ScanForm advanced use", () => { |
|
|
||
| jest.setTimeout(30000); | ||
| describe("ScanForm adavanced use", () => { | ||
| /* EXTREMELY IMPORTART! These tests need to be execute sequentially or they will fail! |
There was a problem hiding this comment.
Spelling error: "IMPORTART" should be "IMPORTANT".
| /* EXTREMELY IMPORTART! These tests need to be execute sequentially or they will fail! | |
| /* EXTREMELY IMPORTANT! These tests need to be execute sequentially or they will fail! |
|
hey @mlodic PTAL |
frontend/package.json
Outdated
| "prettier": "^3.3.3", | ||
| "sass": "^1.83.0", | ||
| "stylelint": "^14.9.1", | ||
| "stylelint": "^14.16.1", |
There was a problem hiding this comment.
you updated and added some dependencies...revert this
There was a problem hiding this comment.
Made the changes
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@mlodic can you review this whenever free? |
|
you still didn't explain the updated dependency. Also please @drosetti review |
|
Hey @mlodic Screen.Recording.2026-01-22.at.12.11.42.PM.mov |
|
@mlodic any updates on this? sorry for pinging you again and again, accordingly i'll start working on another issue :) |

Closes #3190 - Frontend test failing
Description
This PR is a clean version of #3206
Details:
Type of change
Checklist
developBlack,Flake,Isort) gave 0 errors. If you have correctly installed pre-commit, it does these checks and adjustments on your behalf.testsfolder). All the tests (new and old ones) gave 0 errors.