Skip to content

How to test playwright

Cesar Celis Hernandez edited this page Mar 8, 2023 · 16 revisions
  • Get code:
rm -rf ~/console
cd ~/
gcconsole
cd ~/console
updateconsole
git push
git remote add coworker [email protected]:dvaldivia/console.git
git fetch coworker
git branch -v -a
git checkout adopt-playwright
  • MinIO:
MINIO_ROOT_USER=minioadmin MINIO_ROOT_PASSWORD=minioadmin minio server /Volumes/data{1...4} --address :9000 --console-address :9001
  • console server at 9090
cd ~/console
make install
~/go/bin/console server
  • console at port 5005
cd ~/console/portal-ui
yarn install
yarn start
  1. Execute the tests:
cd /Users/cniackz/console/portal-ui
npx playwright test

You should see:

$ npx playwright test

Running 6 tests using 5 workers
  6 passed (5.2s)

To open last HTML report run:

  npx playwright show-report
  1. get report
npx playwright show-report
Screenshot 2023-03-08 at 1 18 23 PM
  1. get coverage
yarn add -D nyc
yarn global add nyc
npm install -g nyc
nyc report --reporter=html
URL: file:///Users/cniackz/console/portal-ui/coverage/index.html
Screenshot 2023-03-08 at 1 58 03 PM
Clone this wiki locally