WomenInSoftwareEngineeringJP / home

Home page for our new organization
https://womeninsoftware.jp/
2 stars 3 forks source link

Website Status Languages GitHub Org's stars

WiSE JP Homepage

Prerequisites

  1. Review the CONTRIBUTING guidelines
  2. NodeJS to match the version here

Running the app locally

Install dependencies

npm i

Run for dev mode

npm run dev

Build for prod

npm run build

Quality Strategy

Unit tests 📦️

We are using Vitest and Testing Library for our unit tests.

Please aim for about 80% or greater test coverage. Perfection on metrics can often be the wrong target, so we aim for "good enough"

Automated tests are incorporated into GitHub Actions so we can easily see if our application is safe to deploy.

You can run the unit tests like so:

Command lines

npm run test

UI Mode

npm run test:ui 

When writing new tests, please follow the Testing Library Guiding Principles

End-to-end (E2E) tests ↔️

We use Playwright for end-to-end testing.

You can run it in terminal mode with:

npm run test:e2e

or in UI mode with:

npm run test:e2e:ui

Playwright & CI/CD

Playwright runs against the main branch automatically via GitHub Actions. Since we only have a production environment, it does not run on branches. If you notice a failed run, here's how to troubleshoot it:

  1. Go to the "Actions" tab and select the failing run

  2. Examine the logs, and download the artifact

    Screenshot 2024-07-22 at 11 34 57 PM
  3. Unzip the artifact to find one or more folders with the name of the test. Each folder should contain a file called trace.zip.

  4. Open up the Trace Viewer, which is a Progressive Web App (basically a special site that runs locally on your machine, not on a server).

  5. Drag the trace.zip file into the Trace Viewer and you can see the screenshots from the test run

Screenshot 2024-07-22 at 11 35 14 PM