Skip to content

Commit d9c279f

Browse files
committed
update tests
updating folders and tests
1 parent b525f1d commit d9c279f

File tree

7 files changed

+33
-26
lines changed

7 files changed

+33
-26
lines changed

.github/workflows/playwright.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
timeout-minutes: 20
1717

1818
# Run on latest Ubuntu (also works on windows-latest, macos-latest)
19-
runs-on: ubuntu-latest
19+
runs-on: ubuntu-latest
2020

2121
steps:
2222
# 1. Checkout code
File renamed without changes.

src/pages/DocsHomePage.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,35 @@
1+
/**
2+
* DocsHomePage - Page Object Model for Playwright testing
3+
*
4+
* This class represents the Playwright documentation homepage (https://playwright.dev)
5+
* and provides reusable methods to interact with it.
6+
*
7+
* @class DocsHomePage
8+
* @example
9+
* ```typescript
10+
* const page = await browser.newPage();
11+
* const docsPage = new DocsHomePage(page);
12+
* await docsPage.goto();
13+
* await docsPage.goToGetStarted();
14+
* ```
15+
*
16+
* KEY CONCEPTS FOR BEGINNERS:
17+
*
18+
* **Page Object Model (POM)**: Instead of writing selectors in every test,
19+
* we organize them in a class. This makes tests cleaner and easier to maintain.
20+
* If the website changes, we only update one place.
21+
*
22+
* **Role-based selectors** (getByRole): These find elements by their purpose
23+
* rather than CSS selectors. For example, finding a link by its text "Get started"
24+
* is more reliable than finding `<a class="nav-link-item">`.
25+
*
26+
* **Auto-waiting**: Playwright automatically waits for elements to be ready
27+
* before interacting. In older tools like Selenium, you had to manually wait.
28+
*
29+
* @property {Page} page - The Playwright page instance
30+
* @property {Locator} getStartedLink - Locator for the "Get started" navigation link
31+
* @property {Locator} heading - Locator for the main page heading
32+
*/
133
/**
234
* DocsHomePage - Page Object for https://playwright.dev
335
*

tests/offline.spec.ts

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

0 commit comments

Comments
 (0)