Mars Airlines Assignment
End-to-end testing powered by playwright with typescript
Recommended to use asdf-vm and plugin NodeJS. See more detail by this link asdf-vm-nodejs
asdf install nodejs 20.5.1
git clone https://github.com/rendezvous14/marsair-assignment.git
npm install
npx playwright install
Copy file from 1PW
and paste it into .env
file on the project directory
Use VS Code with Playwright Test for VSCode:
-
Select Testing tab
-
Select test case that you want to run
- Click Debug to run specific test with browser open. You can set breakpoint and step through code as well
- Click Run to run specific test in headless mode
$ npm run test-ui
$ npm run test
$ npm run report
keep all test cases which are separated by features
tests
└── searching
├── basicWorkflow.test.ts
├── promotionCode.test.ts
└── ui.test.ts
keep all the resources e.g. constants, services, pages (POM), utils, helper
src
├── constants
│ └── searchOptions.ts
└── pages
├── home.page.ts
└── searchResult.page.ts