Skip to content

Conversation

@BenjaminCharmes
Copy link
Contributor

Closes #1363

Implements UI testing as authenticated users to catch bugs that only occur when logged in. Adds /testing/create-magic-link and /logout endpoints, plus Cypress commands loginViaTestMagicLink() and logout(). Includes tests for authenticated sample creation, admin dashboard access, and multi-user sample visibility.

@codecov
Copy link

codecov bot commented Oct 22, 2025

Codecov Report

❌ Patch coverage is 74.00000% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.02%. Comparing base (4d53d7f) to head (6f132d2).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
pydatalab/src/pydatalab/routes/v0_1/auth.py 73.46% 13 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1379      +/-   ##
==========================================
- Coverage   80.44%   80.02%   -0.43%     
==========================================
  Files          70       70              
  Lines        4771     4830      +59     
==========================================
+ Hits         3838     3865      +27     
- Misses        933      965      +32     
Files with missing lines Coverage Δ
pydatalab/src/pydatalab/routes/v0_1/items.py 86.19% <100.00%> (ø)
pydatalab/src/pydatalab/routes/v0_1/auth.py 66.03% <73.46%> (+0.10%) ⬆️

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cypress
Copy link

cypress bot commented Oct 22, 2025

datalab    Run #4004

Run Properties:  status check passed Passed #4004  •  git commit 557962a2e7 ℹ️: Merge 6f132d2948536087fb4b9f9d9d71afe21b7f45c3 into 760cef3071f5332181e219a08dbf...
Project datalab
Branch Review bc/cypress-magiclink
Run status status check passed Passed #4004
Run duration 07m 46s
Commit git commit 557962a2e7 ℹ️: Merge 6f132d2948536087fb4b9f9d9d71afe21b7f45c3 into 760cef3071f5332181e219a08dbf...
Committer Ben Charmes
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 354
View all changes introduced in this branch ↗︎

return jsonify({"status": "success", "token": token, "email": email}), 200


@AUTH.route("/logout", methods=["POST"])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep the original route that exists in main.py and use that in the tests

@ml-evs ml-evs added enhancement New feature or request testing For issues/PRs that change how the package is tested CI For issues/PRs regarding the continuous integration labels Oct 28, 2025
@ml-evs ml-evs marked this pull request as ready for review October 28, 2025 20:49
@ml-evs ml-evs requested a review from jdbocarsly as a code owner October 28, 2025 20:49
@ml-evs ml-evs force-pushed the bc/cypress-magiclink branch from dd19abf to b809178 Compare October 28, 2025 20:49
Copy link
Member

@ml-evs ml-evs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more minor comment, otherwise good to go!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI For issues/PRs regarding the continuous integration enhancement New feature or request testing For issues/PRs that change how the package is tested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UI testing as fake user

3 participants