Skip to content

Refactor HeaderActions unit tests

Erwan Rouchet requested to merge rewrite-header-actions-tests into master

The unit tests for HeaderActions, which test that actions are properly displayed depending on a lot of parameters (in a public project, private project, folder, non-folder, as a non-verified or verified user, with read/write/admin access, with UV/Mirador, etc.), had some repetitive code to call the same component in the same way every time. Additionally, some tests used a for loop which could end earlier than expected, causing some actions to not be tested at all. This rewrites the test file to use a single assertion function and better structured tests for easier debugging.

Edited by Erwan Rouchet

Merge request reports

Loading