Skip to content

Add Cypress E2E testing with ReScript bindings and CI integration#1239

Merged
jderochervlk merged 6 commits intomasterfrom
vlk/add-cypress-e2e-tests
Apr 9, 2026
Merged

Add Cypress E2E testing with ReScript bindings and CI integration#1239
jderochervlk merged 6 commits intomasterfrom
vlk/add-cypress-e2e-tests

Conversation

@jderochervlk
Copy link
Copy Markdown
Collaborator

@jderochervlk jderochervlk commented Apr 9, 2026

  • Add Cypress config and support files for E2E tests
  • Add ReScript bindings for Cypress in e2e/bindings
  • Add navigation E2E test in e2e/Navigation_.cy.res
  • Update .gitignore for e2e artifacts
  • Add Cypress and E2E scripts to package.json
  • Add e2e to rescript.json dev sources
  • Update GitHub Actions to run E2E tests after deploy

Note

This code was generated by AI

- Add Cypress config and support files for E2E tests
- Add ReScript bindings for Cypress in e2e/bindings
- Add navigation E2E test in e2e/Navigation_.cy.res
- Update .gitignore for e2e artifacts
- Add Cypress and E2E scripts to package.json
- Add e2e to rescript.json dev sources
- Update GitHub Actions to run E2E tests after deploy
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces Cypress end-to-end testing to the repo, including ReScript bindings for authoring Cypress specs in .res and CI integration to run E2E tests after Cloudflare Pages deploys.

Changes:

  • Add Cypress dependency, config/support files, and yarn lock updates.
  • Add ReScript Cypress bindings plus an initial navigation E2E suite.
  • Update GitHub Actions deploy workflow to run Cypress E2E tests post-deploy and update ignore rules for generated E2E outputs.

Reviewed changes

Copilot reviewed 7 out of 9 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
yarn.lock Adds Cypress and transitive dependencies to the lockfile.
rescript.json Includes e2e/ as a dev source directory so specs/bindings compile.
package.json Adds Cypress scripts and devDependency.
e2e/Navigation_.cy.res Adds desktop/mobile navigation E2E coverage.
e2e/bindings/Cy.res Introduces ReScript externals/helpers for Cypress + Mocha globals.
cypress/support/e2e.js Adds global exception handling for hydration-related errors during runs.
cypress.config.mjs Adds Cypress E2E configuration (baseUrl/specPattern/support settings).
.gitignore Ignores generated .jsx/.mjs outputs under e2e/.
.github/workflows/deploy.yml Adds an e2e job intended to run Cypress against the deployed site.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -0,0 +1,140 @@
// -- Chainable type -----------------------------------------------------------

type chainable
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

could this just be type t ?

At least to me it's immediately clear we operate on the main Cy type.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, that makes sense.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

Cloudflare deployment

Deployement ID: 30552c51-a037-4363-9bda-7ffbce871918
Deployment Environment: preview

⛅️ wrangler 4.63.0 (update available 4.81.1)
─────────────────────────────────────────────
✨ Compiled Worker successfully
Uploading... (7659/7661)
Uploading... (7660/7661)
Uploading... (7661/7661)
✨ Success! Uploaded 2 files (7659 already uploaded) (1.57 sec)

✨ Uploading _redirects
✨ Uploading Functions bundle
🌎 Deploying...
✨ Deployment complete! Take a peek over at https://30552c51.rescript-lang.pages.dev
✨ Deployment alias URL: https://vlk-add-cypress-e2e-tests.rescript-lang.pages.dev

@jderochervlk jderochervlk merged commit e1270cb into master Apr 9, 2026
6 checks passed
@jderochervlk jderochervlk deleted the vlk/add-cypress-e2e-tests branch April 9, 2026 19:49
jderochervlk added a commit that referenced this pull request Apr 9, 2026
* ci: allow dependabot PRs to skip deployments to cloudflare (#1235)

* ci: allow dependabot PRs to deploy via pull_request_target

GitHub restricts secrets for pull_request events triggered by
dependabot[bot]. Switch dependabot PRs to pull_request_target,
which runs in the base branch context and has access to secrets.

- Add pull_request_target trigger
- Route dependabot PRs through pull_request_target only
- Route all other PRs through pull_request only (no double runs)
- Checkout PR head SHA for pull_request_target events

* Update .github/workflows/deploy.yml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* bypass cloudflare

* Simplify deploy job condition in workflow file

* Fix conditional syntax in deploy workflow steps

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix: patch marked ReDoS vulnerability (CVE-2022-21681) via Yarn resolution override (#1236)

* Initial plan

* fix: upgrade marked to 4.0.10 via resolutions to fix ReDoS (GHSA-5v2h-r2cx-5xgj)

Agent-Logs-Url: https://github.com/rescript-lang/rescript-lang.org/sessions/9eb986e6-cb64-40d5-ac83-ff5bdd72d561

Co-authored-by: jderochervlk <60623931+jderochervlk@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jderochervlk <60623931+jderochervlk@users.noreply.github.com>

* feat: split community pages out of MdxRoute into CommunityRoute (#1223)

- Create CommunityRoute.res with dedicated loader and community sidebar
- Register communityRoutes in routes.res, filter community from mdxRoutes
- Remove communityTableOfContents, community branches from MdxRoute

* fix: Add .resi file for CommunityRoute.jsx (#1238)

* Add Cypress E2E testing with ReScript bindings and CI integration (#1239)

* Add Cypress E2E testing with ReScript bindings and CI integration

- Add Cypress config and support files for E2E tests
- Add ReScript bindings for Cypress in e2e/bindings
- Add navigation E2E test in e2e/Navigation_.cy.res
- Update .gitignore for e2e artifacts
- Add Cypress and E2E scripts to package.json
- Add e2e to rescript.json dev sources
- Update GitHub Actions to run E2E tests after deploy

* Use Cypress GitHub Action for E2E tests in deploy workflow

* pr feedback

* wait again

* configure retries

* change type name

* Initial plan

---------

Co-authored-by: Josh Vlk <josh@vlkpack.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jderochervlk <60623931+jderochervlk@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants