User tests: Successful: Unsuccessful:
Clean up the data in a different way.
Status | New | ⇒ | Pending |
Category | ⇒ | JavaScript Unit Tests |
Title |
|
Title |
|
Labels |
Added:
Unit/System Tests
PR-5.2-dev
|
From my point of view, it would be more beneficial to perform the cleanup in
beforeEach
rather than inafterEach
. This prevents tests from failing after they are interrupted and avoids requiring the installation step. This change should be applied consistently across all tests, either by cleaning up all test-created database objects or using transactions. I like to discuss this further with @laoneo and @alikon.
Makes sense
Regarding the failing System Tests with the error
duplicate key value violates unique constraint "_users_pkey"
with PostgreSQL, from my point of view it is related tocleanupDB()
is not completed before the next test run creates a new user and needs to be fixed on chaining and I'am working on resolving it.
The cleanupDB is a good idea, haven't looked at the test for a longer time and didn't noticed this. But as far as I understand it it runs only after a block and not after a single test. So my guess is that this will not help.
From my point of view, it would be more beneficial to perform the cleanup in
beforeEach
rather than inafterEach
. This prevents tests from failing after they are interrupted and avoids requiring the installation step. This change should be applied consistently across all tests, either by cleaning up all test-created database objects or using transactions. I like to discuss this further with @laoneo and @alikon.Regarding the failing System Tests with the error
duplicate key value violates unique constraint "_users_pkey"
with PostgreSQL, from my point of view it is related tocleanupDB()
is not completed before the next test run creates a new user and needs to be fixed on chaining and I'am working on resolving it.