[TEST] Refactor collection tests for granular display options#2042
Open
beatrycze-volk wants to merge 2 commits into
Open
[TEST] Refactor collection tests for granular display options#2042beatrycze-volk wants to merge 2 commits into
beatrycze-volk wants to merge 2 commits into
Conversation
…ontroller The `showSingle` setting previously caused a redirect to a single collection view when it was disabled (empty or false). This change corrects the condition so that the redirect only occurs when `showSingle` is explicitly enabled (`true`), aligning with its intended purpose to directly display a single collection.
Breaks down the comprehensive `canListAction` and `canShowAction` tests into several distinct test cases. This enables specific verification of the `showSingle`, `showOverview`, and `showDocuments` settings, ensuring their correct behavior in the collection view. New private helper functions `getContentsList` and `getContentsShow` are extracted to reduce duplication and improve readability across the new test cases. Test attributes are updated to PHPUnit 8+.
12c1891 to
f15f253
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Breaks down the comprehensive
canListActionandcanShowActiontests into several distinct test cases. This enables specific verification of theshowSingle,showOverview, andshowDocumentssettings, ensuring their correct behavior in the collection view.New private helper functions
getContentsListandgetContentsShoware extracted to reduce duplication and improve readability across the new test cases. Test attributes are updated to PHPUnit 8+.Depends on #2041