Bug 41038 - Add more test coverage for bug 30724
Summary: Add more test coverage for bug 30724
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Authentication (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Tomás Cohen Arazi (tcohen)
QA Contact: Jonathan Druart
URL:
Keywords:
Depends on: 30724
Blocks:
  Show dependency treegraph
 
Reported: 2025-10-16 19:49 UTC by Nick Clemens (kidclamp)
Modified: 2025-11-26 13:41 UTC (History)
6 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
25.11.00
Circulation function:


Attachments
Bug 41038: Add tests for superlibrarian managing other users' 2FA (7.33 KB, patch)
2025-11-03 19:29 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 41038: Add tests for superlibrarian managing other users' 2FA (7.40 KB, patch)
2025-11-03 20:12 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 41038: Add tests for superlibrarian managing other users' 2FA (7.46 KB, patch)
2025-11-14 13:26 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens (kidclamp) 2025-10-16 19:49:10 UTC
From bug 30724:
The (followup) patch fixes the selenium tests but they are not correct IMO.

We still need new tests to cover changes from this bug report.
Comment 1 Tomás Cohen Arazi (tcohen) 2025-11-03 19:29:32 UTC
Created attachment 188995 [details] [review]
Bug 41038: Add tests for superlibrarian managing other users' 2FA

Adds comprehensive selenium tests for the new functionality where
superlibrarians can manage 2FA settings for other patrons.

To test:
1. Run the existing authentication_2fa.t selenium tests
2. Notice missing coverage for cross-user 2FA management
3. Apply the patch
4. Run the tests again
5. Verify new subtests pass:
   - Superlibrarian can view/disable other users' 2FA
   - Enable button is hidden with explanatory message
   - Non-superlibrarian gets 403 error for other users
Comment 2 Kyle M Hall (khall) 2025-11-03 20:12:24 UTC
Created attachment 188999 [details] [review]
Bug 41038: Add tests for superlibrarian managing other users' 2FA

Adds comprehensive selenium tests for the new functionality where
superlibrarians can manage 2FA settings for other patrons.

To test:
1. Run the existing authentication_2fa.t selenium tests
2. Notice missing coverage for cross-user 2FA management
3. Apply the patch
4. Run the tests again
5. Verify new subtests pass:
   - Superlibrarian can view/disable other users' 2FA
   - Enable button is hidden with explanatory message
   - Non-superlibrarian gets 403 error for other users

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 3 Jonathan Druart 2025-11-14 13:26:43 UTC
Created attachment 189602 [details] [review]
Bug 41038: Add tests for superlibrarian managing other users' 2FA

Adds comprehensive selenium tests for the new functionality where
superlibrarians can manage 2FA settings for other patrons.

To test:
1. Run the existing authentication_2fa.t selenium tests
2. Notice missing coverage for cross-user 2FA management
3. Apply the patch
4. Run the tests again
5. Verify new subtests pass:
   - Superlibrarian can view/disable other users' 2FA
   - Enable button is hidden with explanatory message
   - Non-superlibrarian gets 403 error for other users

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 4 Lucas Gass (lukeg) 2025-11-17 22:16:52 UTC
Nice work everyone!

Pushed to main for 25.11
Comment 5 Paul Derscheid 2025-11-25 16:31:05 UTC
Nice work everyone!

Pushed to 25.05.x
Comment 6 Paul Derscheid 2025-11-26 10:49:34 UTC
Reverted from 25.05.x as we don't have Bug 30724. Looked for deps in "Depends on". Please use the metadata fields :)