This repository contains end-to-end UI tests for https://www.thriftbooks.com implemented with Playwright and TypeScript.
The tests cover search and filter functionality, capture screenshots for debugging, and support Allure reporting.
- Node.js 18+ installed
- npm (or yarn) available
- Git (to clone the repository)
- Optional (for Allure): Java installed (if Allure CLI requires it on your environment)
- Clone repository and enter folder:
git clone <repository-url>
cd <repository-folder>- Install Node dependencies:
npm install- Install Playwright browsers:
npx playwright install- (Optional) Install Allure CLI globally if you will generate HTML reports locally:
npm install -g allure-commandline- Run all tests (headless, default):
npx playwright test- Run tests in headed (visible) mode:
npx playwright test --headed- Run a single test file:
npx playwright test src/tests/filters.spec.ts- Open Playwright test runner UI:
npx playwright test --ui- Run with trace recording (useful for debugging failures):
npx playwright test --trace onAfter a run, Playwright report is generated automatically in playwright-report/. Open playwright-report/index.html in a browser.
- Run tests with Allure reporter enabled (or configure reporter in your Playwright config):
npx playwright test --reporter=line,allure-playwright- Generate HTML report from raw results:
npx allure generate allure-results --clean -o allure-report- Open the generated report:
npx allure open allure-reportNotes:
allure-results/ folder contains raw test data and attachments.
Screenshots and other attachments should appear in Allure if you use takeScreenshot function.
Screenshots are saved to the screenshots/ directory during test execution.
Typical usage: tests or helpers take screenshots after key steps and attach them to the test report.
Clean up screenshots with:
rm -rf screenshotsCommon scripts you can use from file package.json:
"test" -> "npx playwright test"
"test:ui" -> "npx playwright test --ui"
"report" -> "npx playwright show-report"
"allure:generate" -> "allure generate --clean"
"allure:open" -> "allure open allure-report"
"codegen" -> "playwright codegen https://www.urlsample"
project-root/
├─ src/
│ ├─ pages/ # Page objects
│ ├─ tests/ # Test specs
│ ├─ fixtures/ # Custom Playwright fixtures
│ └─ utils/ # Helpers (screenshots, waits, element actions)
├─ screenshots/ # Saved screenshots
├─ test-results/ # Playwright raw results and traces
├─ playwright-report/ # Playwright HTML report (index.html)
├─ allure-report/ # Generated Allure HTML report
├─ playwright.config.ts
├─ package.json
└─ tsconfig.jsonAuthor: Daria Bodiakova
Phone: +1 (206) 581-4845
Email: [email protected]