Setup tests with new user system (#344)

* chore(.gitignore): add auth.json to gitignore
test(landing.spec.js): remove commented out code and add check for landing page title
test(login.spec.js): add test for login page title
feat(package.json): add e2e:auth script to generate auth.json storage file for e2e tests

* test(landing.spec.js): add beforeEach hook to create a new browser context with auth.json storage state
test(landing.spec.js): change test name from 'landing page' to 'Landing title'
fix(package.json): change e2e:auth script to save auth.json in e2e directory
This commit is contained in:
Danny Avila 2023-05-20 09:00:45 -04:00 committed by GitHub
parent 8c7ad09977
commit 5964b71e14
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 26 additions and 7 deletions

View file

@ -15,6 +15,7 @@
"e2e:update": "playwright test --config=e2e/playwright.config.js --update-snapshots",
"e2e:debug": "cross-env PWDEBUG=1 playwright test --config=e2e/playwright.config.js",
"e2e:report": "npx playwright show-report e2e/playwright-report",
"e2e:auth": "npx playwright codegen --save-storage=e2e/auth.json http://localhost:3080/",
"prepare": "husky install",
"format": "prettier-eslint --write \"{,!(node_modules)/**/}*.{js,jsx,ts,tsx}\""
},