!Repo is archived and all playwright tests merged into the main repo
NOTE: All commands are assumed to be executed from this (playwright) directory unless otherwise noted
-
Start openc3
OPENC3> openc3.bat start
-
Open OpenC3 in your browser. It should take you to the login screen. Set the password to "password"
-
Install testing dependencies with yarn
playwright> yarn playwright> npx playwright install
-
Generate the test plugins (must be located above this directory). If openc3.sh isn't in your path you might need to ues an absolute or relative path to it.
playwright> cd .. > openc3.sh cliroot generate plugin PW_TEST > cd openc3-cosmos-pw-test openc3-pw-test> openc3.sh cliroot rake build VERSION=1.0.0 openc3-pw-test> mv openc3-cosmos-pw-test*.gem openc3-cosmos-pw-test-1.0.0.gem openc3-pw-test> cp openc3-cosmos-pw-test-1.0.0.gem openc3-cosmos-pw-test-1.0.1.gem
-
Set Enterprise if running against OpenC3 COSMOS Enterprise
playwright> set ENTERPRISE=1
-
Open playwright and run tests
playwright> yarn playwright test --headed --project=chromium
-
Enable the playwright inspector / debugger with
playwright> set PWDEBUG=1 playwright> yarn playwright test --headed --project=chromium
-
[Optional] Fix istanbul/nyc coverage source lookups (use
fixlinux
if not on Windows). Tests will run successfully without this step and you will get coverage statistics, but line-by-line coverage won't work.playwright> yarn fixwindows
-
Create code coverage
playwright> yarn coverage
Code coverage reports can be viewed at playwright/coverage/index.html