This repository showcases automated testing capabilities as part of a take-home coding challenge, focusing on functional testing scenarios.
- Playwright
- TypeScript
- ESLint + Prettier
- Husky (Git Hooks)
- Node.js (v16 or higher)
- npm/yarn
-
Clone the repository
git clone https://github.com/bddwithTim/salesbricks-automation.git
-
Install dependencies
npm install
-
Install Playwright browsers
npx playwright install
By default, when you execute tests, Playwright will run them across all configured browsers (Chrome, Edge, Firefox, WebKit). This provides comprehensive cross-browser coverage.
npx playwright test --grep @smokenpm run test:chrome # Run in Chrome
npm run test:firefox # Run in Firefox
npm run test:webkit # Run in Safari
npm run test:edge # Run in Edgenpx playwright test tests/checkOutFlow.test.tsnpx playwright test --ui@smoke: Critical path tests@functional: Functional validation tests@regression: Regression tests
# Single tag
npm run test:smoke # Run smoke tests
npm run test:functional # Run functional tests
npm run test:regression # Run regression tests
# Or using npx directly
npx playwright test --grep @smoke
# Multiple tags
npx playwright test --grep "@smoke|@functional" # Run tests with either @smoke OR @functional
npx playwright test --grep "@smoke&@functional" # Run tests with both @smoke AND @functionalnpm run test:chrome -- --grep @smoke # Run smoke tests in Chrome
npm run test:firefox -- --grep @functional # Run functional tests in Firefox
npm run test:webkit -- --grep "@smoke|@functional" # Run smoke OR functional tests in Safarinpm run test:chrome -- --workers=1 --grep @smoke # Run smoke tests in Chrome with single worker
npm run test:firefox -- --workers=1 # Run all tests in Firefox with single workerThe current automation repository primarily supports functional testing for web applications on desktop browsers. However, it is important to note that mobile automation is not supported at this time.