Skip to content

currents-dev/currents-playwright-component-tests-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Playwright Component testing with Currents

Run Playwright Component testing and report the results to Currents

Note November 2023: Playwright support for Component testing is still experimental

The project contains simple component tests:

  • src/App.spec.jsx - a passing test
  • src/AppFailing.spec.jsx - a failing test

Setup

  • First run npm i
  • Create an account and project at https://app.currents.dev
  • Grab the following details:
    • projectId
    • recordKey

Run

Run pwc command:

npx pwc --key <recordKey> --project-id <projectId> --ci-build-id hello-currents

  • Explore playwright-ct.config.js and note that screenshots, videos and trace are activated
  • Explore more about CI Build Id

Running the command would produce an output that is similar to this:

currents-2023-11-02-15 32 59@2x

The results will be reported to Currents Dashboard:

demo-currents-pw-ct

Explore @currents/playwright integration options

Follow our documentation to explore integration options: https://currents.dev/readme/integration-with-playwright/currents-playwright

  • Applying tags for better tests managing
  • Create additional projects
  • Explore