Skip to content

test: add unit and end-to-end tests #51

Closed

Description

@uniqueg

Why?

The rewrite has no tests. The login, token and registry code (#43, #44, #40) is security-relevant and easy to break unnoticed.

How?

  1. Unit tests (e.g. Vitest) for the server routes and helpers: registry filtering (verified, type, version, environment, https), the PKCE/state/nonce handling and ID token validation, token renewal and the one-retry-after-401 rule, and tag stripping for re-runs.
  2. End-to-end tests (e.g. Playwright; or Cypress, as Implement the Cypress e2e test to test the login flow of krini #1 proposed) against a mock OIDC provider and mock registry/TES/WES servers: anonymous browsing, login, submit a task, logout.
  3. Run both in CI (ci: check PRs and publish images #50); no calls to real public services.

Acceptance criteria

  • Unit tests cover the auth and registry modules; E2E covers the main user journey; both run in CI.

Dependencies: #50; grows with #43, #44, #40.

Activity

  1. added
    priority: medium
    type: testing
    workload: days
    on Oct 24, 2026
  2. moved this from Backlog to Ready in ELIXIR On-Cloudon Oct 26, 2026
  3. added
    priority: low
    flag: nice to have
    and removed
    priority: medium
    on Nov 8, 2026
  4. moved this from Ready to Backlog in ELIXIR On-Cloudon Nov 8, 2026
  5. added
    status: in progress
    on Nov 12, 2026
  6. self-assigned this
    on Nov 12, 2026
  7. uniqueg commented on Nov 14, 2026

    @uniqueg
    MemberAuthor

    The tests landed on dev with #63: unit tests with Vitest (100% coverage threshold for src/lib/, src/app/api/ and src/app/auth/api/) and end-to-end tests with Playwright (anonymous browsing, login, a forged callback, a workflow submission with the user's token, logout) against mock OIDC, registry and WES services. The PR said "Closes #51", but it went into staging (now dev) before it was the default branch, so GitHub didn't close this issue.

    Units that didn't exist yet (PKCE, nonce, ID token validation, the TES journey) come with their features (#43, #44, #41); the coverage threshold makes them bring their tests.

    One gap is left: #60 replaced checks.yml with ci.yml and dropped the jobs Test and End-to-end tests, so CI doesn't run the tests at the moment. #75 (for #69) restores them. Closing this one as done; it ships with v0.1.0.

  8. removed
    status: in progress
    on Nov 14, 2026
  9. added this to the v0.1.0 milestone on Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

flag: nice to havepriority: lowtype: testingworkload: days

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions