WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 021ffb5

Browse files
Merge pull request #7 from auto-qa-hub/readme
Created Readme
2 parents 724f7bd + 8c7f542 commit 021ffb5

File tree

3 files changed

+41
-18
lines changed

3 files changed

+41
-18
lines changed

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Automated tests for saucedemo.com
2+
3+
## Description
4+
This suite of automated tests for the Saucedemo.com website is built using Playwright 🎭, a powerful tool for automating web application testing. The primary goal is to ensure the functionality and stability of the frontend user interface, providing a seamless experience for site visitors.
5+
6+
## Installation
7+
1. Clone the repository
8+
2. Navigate to the project directory
9+
3. Install dependencies: npm install
10+
11+
## Running Tests
12+
- Run all tests: npx playwright test
13+
- Run a specific test: npx playwright test tests/test-name.spec.ts
14+
- Run in UI mode: npx playwright test --ui
15+
16+
## Project Structure
17+
18+
- 📁 **tests/** – Contains all the test files.
19+
- 📁 **pages/** – Includes page object pattern (POP) files for structuring interactions with pages.
20+
- 📄 **<test-name>.spec.ts** – Test files.
21+
22+
- ⚙️ **playwright.config.ts** – Playwright configuration file for browser settings and test environment configurations.
23+
24+
- 📁 **fixtures/** – Contains fixtures.
25+
26+
- 📁 **utils/** – Utility functions for reusable tasks.

tests/example.spec.ts

Lines changed: 0 additions & 18 deletions
This file was deleted.

tests/mainPage.spec.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,20 @@ test.describe("Main Page tests", () => {
66
const mainPage = new MainPage(page);
77
await mainPage.visitMainPage();
88

9+
//Перевірка, що поле "Username" відображається
10+
await expect(page.locator('input[data-test="username"]')).toBeVisible();
11+
12+
//Перевірка, що поле "Password" відображається
13+
await expect(page.locator('input[data-test="password"]')).toBeVisible();
14+
15+
//Перевірка, що кнопка "Login" відображається і активна
16+
await expect(page.locator('input[data-test="login-button"]')).toBeVisible();
17+
await expect(page.locator('input[data-test="login-button"]')).toBeEnabled();
18+
19+
//Перевірка, що список користувачів відображається
20+
await expect(page.locator('div[data-test="login-credentials"]')).toBeVisible();
21+
22+
//Перевірка, що блок з паролем відображається
23+
await expect(page.locator('div[data-test="login-password"]')).toBeVisible();
924
});
1025
});

0 commit comments

Comments
 (0)