create-pw-core 0.0.4 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/templates/package.json +4 -4
- package/dist/templates/playwright.config.ts +1 -1
- package/dist/templates/src/pages/registry.ts +2 -1
- package/dist/templates/src/tests/core.test.ts +1 -0
- package/dist/templates/src/tests/e2e.test.ts +2 -0
- package/dist/templates/src/tests/state.test.ts +1 -0
- package/dist/templates/src/utils/env.ts +1 -1
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pw-core-demo",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1",
|
|
4
4
|
"description": "Demo and example test suite showcasing the usage of pw-core in Playwright.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "playwright test",
|
|
7
7
|
"test:headed": "playwright test --headed",
|
|
8
|
-
"test:
|
|
9
|
-
"test:
|
|
8
|
+
"test:report": "playwright show-report",
|
|
9
|
+
"test:ui": "playwright test --ui"
|
|
10
10
|
},
|
|
11
11
|
"author": {
|
|
12
12
|
"name": "Shanmuka Chandra Teja Anem",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"@playwright/test": "^1.61.0",
|
|
18
18
|
"@types/node": "^20.11.0",
|
|
19
19
|
"dotenv": "^16.4.5",
|
|
20
|
-
"pw-core": "^
|
|
20
|
+
"pw-core": "^1.1.0",
|
|
21
21
|
"typescript": "^6.0.3"
|
|
22
22
|
}
|
|
23
23
|
}
|
|
@@ -10,6 +10,7 @@ scenario('Verify advanced locators, actions and assertions in pw-core', async ({
|
|
|
10
10
|
// 1. Navigation and Title Verification
|
|
11
11
|
await loginPage.goto();
|
|
12
12
|
await loginPage.verifyTitle('PW-Core Workspace — Build, Test & Document');
|
|
13
|
+
await loginPage.waitForLoadState('networkidle');
|
|
13
14
|
|
|
14
15
|
// 2. Click action using options (hasText)
|
|
15
16
|
// This resolves the locator and filters it by the provided text before clicking
|
|
@@ -12,6 +12,7 @@ scenario('End-to-End User Flow on QECore App with Page Object Flows', async ({
|
|
|
12
12
|
}) => {
|
|
13
13
|
// 1. Login (automatic page usage)
|
|
14
14
|
await loginPage.goto();
|
|
15
|
+
await loginPage.waitForLoadState('networkidle');
|
|
15
16
|
|
|
16
17
|
// Verify title and page element states
|
|
17
18
|
await loginPage.verifyTitle(/PW-Core/);
|
|
@@ -56,6 +57,7 @@ scenario('End-to-End User Flow on QECore App with Page Object Flows', async ({
|
|
|
56
57
|
expect(taskRows.getAll('title')).toContain('Demo Task');
|
|
57
58
|
|
|
58
59
|
// 4. Logout (automatic page usage)
|
|
60
|
+
await topNav.hover('workspaceDropdown');
|
|
59
61
|
await topNav.click('logoutBtn');
|
|
60
62
|
await loginPage.verifyURL();
|
|
61
63
|
await loginPage.verify('defaultUserLogin'); // Inbuilt visibility check
|
|
@@ -4,6 +4,7 @@ scenario.describe.serial('Worker Page State Reuse Suite', () => {
|
|
|
4
4
|
// Scenario 1: Setup state inside the workerPage
|
|
5
5
|
scenario('Test 1: Navigate and transition page state on workerPage', async ({ workerLoginPage: lp, workerDashboardPage: dp }) => {
|
|
6
6
|
await lp.goto();
|
|
7
|
+
await lp.waitForLoadState('networkidle');
|
|
7
8
|
await lp.verifyURL();
|
|
8
9
|
await lp.verify('defaultUserLogin');
|
|
9
10
|
|
|
@@ -2,7 +2,7 @@ import dotenv from 'dotenv';
|
|
|
2
2
|
import path from 'path';
|
|
3
3
|
|
|
4
4
|
// Load env configuration
|
|
5
|
-
dotenv.config({ path: path.resolve('.env') });
|
|
5
|
+
dotenv.config({ path: path.resolve('.env'), quiet: true });
|
|
6
6
|
|
|
7
7
|
export const ENV = {
|
|
8
8
|
url: process.env.URL || 'https://qecore.github.io',
|