jsonresume / jsonresume.org

The mono repo that builds the homepage, utils, ui components, registry and anything else
https://jsonresume.org
81 stars 22 forks source link

feat: add e2e tests #25

Closed levino closed 11 months ago

levino commented 11 months ago

Summary by CodeRabbit

coderabbitai[bot] commented 11 months ago

Walkthrough

The project has integrated Playwright for automated browser testing, with configurations tailored for CI/CD environments. Tests are set to run in parallel with retries and trace collection on failures. The .gitignore file has been updated to exclude test artifacts, and a GitHub Actions workflow has been added to automate test execution. Additionally, there's a minor update in API handling for GitHub tokens and the removal of a theme export.

Changes

File Path Change Summary
.github/workflows/playwright.yml Added GitHub Actions workflows for Playwright tests, Node.js setup, and dependency installation with pnpm.
apps/registry/.gitignore Updated to exclude test results and Playwright artifacts.
apps/registry/playwright.config.js Configured Playwright for CI with parallel execution, retries, and specific browser projects.
apps/registry/tests/... Added new Playwright test cases to check web page titles.
apps/registry/pages/api/[payload].js Added conditional GitHub token handling for API requests.
apps/registry/pages/api/formatters/template.js Removed the export of the apage theme.

🐇✨ In the code's burrow, deep and vast,
Playwright's magic is cast at last.
Tests in browsers, running free,
A CI dance of code and glee. 🎭🚀


Tips ### Chat with CodeRabbit Bot (`@coderabbitai`) - If you reply to a *review comment* from CodeRabbit, the bot will automatically respond. - To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment - Note: Review comments are made on code diffs or files, not on the PR overview. - Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. ### CodeRabbit Commands (invoked as PR comments) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger a review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai help` to get help. Note: For conversation with the bot, please use the review comments on code diffs or files. ### CodeRabbit Configration File (`.coderabbit.yaml`) - You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository. - The JSON schema for the configuration file is available [here](https://coderabbit.ai/integrations/coderabbit-overrides.v2.json). - If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json`
vercel[bot] commented 11 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
jsonresume-org-homepage ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 26, 2023 7:46pm
jsonresume-org-registry ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 26, 2023 7:46pm
levino commented 11 months ago

@thomasdavis Please see 89af6f7f2a92c3e5304390194b7380d135e20dac. The apage theme requires an environment variable LANG to be present, which is not the case on MacOS, but probably only on linux. I think that makes the theme essentially broken and we should remove it, until this issue has been fixed. Opened https://github.com/jsonresume/jsonresume.org/pull/27 for this.