This project contains automated tests using Playwright Test framework for web testing.
- Node.js 18 or higher
- npm (Node Package Manager)
- Clone the repository
- Install dependencies:
npm install
tests/
- Contains the main test filestests-examples/
- Contains example tests including a todo app test suiteplaywright.config.ts
- Playwright configuration file
Run all tests in headless mode:
npx playwright test
Run tests with UI mode:
npx playwright test --ui
Run tests in specific browser:
npx playwright test --project=chromium
npx playwright test --project=firefox
npx playwright test --project=webkit
After test execution, you can view the HTML report:
npx playwright show-report
- Chromium
- Firefox
- WebKit (Safari)
The project is configured to run tests:
- In parallel
- With automatic retries on CI
- With HTML reporting
- With trace capture on first retry
See playwright.config.ts
for detailed configuration options.
- push() - adds to end
- pop() - removes from end
- unshift() - adds to beginning
- shift() - removes from beginning
- splice() - adds/removes elements anywhere
- reverse() - reverses array
- sort() - sorts array
- fill() - fills elements with value
Methods thêm/xóa ở đầu/cuối: Thêm (push, unshift) → return độ dài mới Xóa (pop, shift) → return phần tử bị xóa Method thêm/xóa ở giữa: splice → return mảng các phần tử bị xóa Methods biến đổi toàn bộ mảng: reverse, sort, fill → return chính mảng đã biến đổi
map() - transforms elements filter() - filters elements concat() - combines arrays slice() - extracts portion of array join() - creates string from array reduce() - reduces to single value forEach() - just loops, returns nothing indexOf() - finds index includes() - checks if element exists find() - finds element findIndex() - finds element index some() - checks if some pass test every() - checks if all pass test