Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

e2e: Initialize end to end testing #238

Merged
merged 1 commit into from
Jan 9, 2024
Merged

e2e: Initialize end to end testing #238

merged 1 commit into from
Jan 9, 2024

Conversation

juliaogris
Copy link
Member

@juliaogris juliaogris commented Jan 9, 2024

Initialize end to end testing in top level directory e2e.

On CI e2 testing runs against https://evy.dev at the moment!

Initialize e2e node package with

echo '{"private": true}' > e2e/package.json
npm install --save-dev --prefix e2e playwright
npm install --save-dev --prefix e2e @playwright/test@latest

Add node_modules/ to .gitignore.

Add a minimal index.test.js test file that loads the Evy playground index.html
page. It runs two tests on it:

  • ensure the title is "Evy | Playground"
  • execute Run and ensure the console output contains expected contents.

Setup basic playwright test config that will allow to parametrize the baseURL
for tests - it expects a BASEURL environment variable and falls back to https://localhost:8080 by default. For local development run

SERVEDIR_PORT=8080 make serve

and in other terminal

cd e2e; npx playwright test [--ui]

Add e2e target to make file, triggered by ci target.
If BASEURL environment variable is not set, make will set it to https://evy.dev
for now. This allows us to prototype e2e testing until we can extract the per-PR
preview deployment URL from the firebase-deploy run.
We will add this in a follow up PR.

Despite concerns it seems that the CI runtime has increased by only less than 30 seconds at this stage.

Part 1/2 for evylang/todo#43

Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Initialize end to end testing in top level directory e2e. Everything related
to end to end testing will be in this directory. Initialize node package
with

    echo '{"private": true}' > e2e/package.json
    npm install --save-dev --prefix e2e playwright
    npm install --save-dev --prefix e2e @playwright/test@latest

Add `node_modules/` to .gitignore.

Setup basic playwright test config that will allow to parametrize the baseURL
of tests.

Add a minimal index.test.js test file that loads the Evy playground index.html
page. It runs two tests on it:

- ensure the title is "Evy | Playground"
- execute `Run` and ensure the console output contains expected test.

Issue: evylang/todo#43
@juliaogris juliaogris merged commit 0f91678 into main Jan 9, 2024
3 checks passed
@juliaogris juliaogris deleted the e2e branch January 9, 2024 10:18
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.

2 participants