Skip to content

feat: add simple e2e tests#1014

Open
steveiliop56 wants to merge 13 commits into
mainfrom
feat/e2e
Open

feat: add simple e2e tests#1014
steveiliop56 wants to merge 13 commits into
mainfrom
feat/e2e

Conversation

@steveiliop56

@steveiliop56 steveiliop56 commented Jul 16, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Tests
    • Added end-to-end coverage for authentication and authorization, including forward-auth login with redirect back to the app.
    • Added checks for logout, unauthorized access messaging, and an allowed route that bypasses authentication.
    • Added two-factor authentication (TOTP) success and failure scenarios with expected on-screen feedback.
    • Validated flows across desktop and mobile browser profiles with HTML reporting, tracing, and video capture.
  • Chores
    • Added a Playwright-based E2E test setup with a Docker Compose environment and a CI workflow that runs tests and uploads the Playwright report.

@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jul 16, 2026
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 98f4a5c8-6982-427d-8981-8b1a8f9df0b7

📥 Commits

Reviewing files that changed from the base of the PR and between 3cf3cc9 and bb1aa72.

⛔ Files ignored due to path filters (1)
  • e2e/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (10)
  • .github/workflows/e2e.yml
  • e2e/.gitignore
  • e2e/conf/Caddyfile
  • e2e/config.e2e.yaml
  • e2e/docker-compose.e2e.yml
  • e2e/fixtures/auth.fixtures.ts
  • e2e/package.json
  • e2e/playwright.config.ts
  • e2e/specs/apps.spec.ts
  • e2e/specs/auth.spec.ts

📝 Walkthrough

Walkthrough

Adds a Docker Compose-based Playwright E2E suite covering authentication, app authorization, reusable auth fixtures, environment configuration, and GitHub Actions execution.

Changes

E2E testing

Layer / File(s) Summary
E2E environment setup
e2e/package.json, e2e/playwright.config.ts, e2e/docker-compose.e2e.yml, e2e/conf/Caddyfile, e2e/config.e2e.yaml
Configures Playwright, Docker services, Caddy routing, TinyAuth users, and app access rules.
Authentication fixtures and scenarios
e2e/fixtures/auth.fixtures.ts, e2e/specs/*.spec.ts
Adds login, logout, and TOTP interactions with tests for successful and failed authentication, authorization, redirects, and allowed paths.
CI execution and artifact handling
.github/workflows/e2e.yml, e2e/.gitignore
Runs the E2E suite on pull requests or manual dispatch, uploads Playwright reports, and ignores generated artifacts.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Browser
  participant Caddy
  participant TinyAuth
  participant Whoami
  Browser->>Caddy: Request protected app
  Caddy->>TinyAuth: Check forward-auth
  TinyAuth-->>Caddy: Allow or reject request
  Caddy->>Whoami: Proxy allowed request
  Whoami-->>Browser: Return app content
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding simple end-to-end tests.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/e2e

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Comment thread e2e/specs/apps.spec.ts Fixed
@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/e2e.yml:
- Around line 24-38: Update the dependency installation, Playwright browser
installation, and test steps in the workflow to place working-directory
alongside run rather than under with. Remove the global pnpm installation from
the dependency command and rely on the existing pnpm/action-setup step.
- Around line 13-14: Update the Checkout step using actions/checkout to set
persist-credentials to false, ensuring the GITHUB_TOKEN is not stored in the
repository’s Git configuration while preserving the existing pinned action
reference.

In `@e2e/playwright.config.ts`:
- Around line 37-45: Increase the Playwright webServer startup timeout in the
webServer configuration to a value appropriate for Docker Compose builds with
--pull=always, preventing CI from timing out before the health endpoint is
available. Leave the existing command, URL, reuseExistingServer, and
gracefulShutdown settings unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 57ae66b3-2c03-4181-a1d3-da11f1a663a0

📥 Commits

Reviewing files that changed from the base of the PR and between 3cf3cc9 and 226df14.

⛔ Files ignored due to path filters (1)
  • e2e/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (9)
  • .github/workflows/e2e.yml
  • e2e/.gitignore
  • e2e/config.e2e.yaml
  • e2e/docker-compose.e2e.yml
  • e2e/fixtures/auth.fixtures.ts
  • e2e/package.json
  • e2e/playwright.config.ts
  • e2e/specs/apps.spec.ts
  • e2e/specs/auth.spec.ts

Comment thread .github/workflows/e2e.yml
Comment thread .github/workflows/e2e.yml
Comment thread e2e/playwright.config.ts
Comment thread e2e/docker-compose.e2e.yml Outdated
Comment thread e2e/docker-compose.e2e.yml Outdated
Rycochet
Rycochet previously approved these changes Jul 16, 2026
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Jul 16, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@e2e/playwright.config.ts`:
- Line 38: Update the Playwright configuration’s command so the network check
runs before the blocking pnpm run up step, or detach the Compose startup to
allow both commands to complete. If Playwright URL polling already provides
sufficient readiness validation, remove the redundant netcheck invocation.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 07b9deb0-ba08-46d9-8090-1550c3b33ab9

📥 Commits

Reviewing files that changed from the base of the PR and between 423ad7b and d8ee3e7.

📒 Files selected for processing (3)
  • e2e/docker-compose.e2e.yml
  • e2e/package.json
  • e2e/playwright.config.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • e2e/package.json
  • e2e/docker-compose.e2e.yml

Comment thread e2e/playwright.config.ts Outdated
@steveiliop56

Copy link
Copy Markdown
Member Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

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

Labels

lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants