@sridharkikkeri/playwright-common 1.0.31 → 1.0.32
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/create-healthedge-tests.js +1 -1
- package/dist/quality/pages/DashboardPage.d.ts +11 -0
- package/dist/quality/pages/DashboardPage.d.ts.map +1 -1
- package/dist/quality/pages/DashboardPage.js +21 -0
- package/dist/quality/pages/DashboardPage.js.map +1 -1
- package/package.json +1 -1
- package/src/quality/pages/DashboardPage.ts +28 -0
|
@@ -1 +1,12 @@
|
|
|
1
|
+
import { Page, Locator } from '@playwright/test';
|
|
2
|
+
export declare class DashboardPage {
|
|
3
|
+
readonly page: Page;
|
|
4
|
+
readonly welcomeMessage: Locator;
|
|
5
|
+
readonly logoutButton: Locator;
|
|
6
|
+
readonly searchInput: Locator;
|
|
7
|
+
constructor(page: Page);
|
|
8
|
+
getWelcomeText(): Promise<string>;
|
|
9
|
+
logout(): Promise<void>;
|
|
10
|
+
search(query: string): Promise<void>;
|
|
11
|
+
}
|
|
1
12
|
//# sourceMappingURL=DashboardPage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardPage.d.ts","sourceRoot":"","sources":["../../../src/quality/pages/DashboardPage.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"DashboardPage.d.ts","sourceRoot":"","sources":["../../../src/quality/pages/DashboardPage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEjD,qBAAa,aAAa;IACtB,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;IACpB,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;IACjC,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;gBAElB,IAAI,EAAE,IAAI;IAOhB,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC;IAIjC,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAIvB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAI7C"}
|
|
@@ -1,2 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DashboardPage = void 0;
|
|
4
|
+
class DashboardPage {
|
|
5
|
+
constructor(page) {
|
|
6
|
+
this.page = page;
|
|
7
|
+
this.welcomeMessage = page.locator('.welcome-message');
|
|
8
|
+
this.logoutButton = page.locator('button#logout');
|
|
9
|
+
this.searchInput = page.locator('input[name="search"]');
|
|
10
|
+
}
|
|
11
|
+
async getWelcomeText() {
|
|
12
|
+
return await this.welcomeMessage.textContent() || '';
|
|
13
|
+
}
|
|
14
|
+
async logout() {
|
|
15
|
+
await this.logoutButton.click();
|
|
16
|
+
}
|
|
17
|
+
async search(query) {
|
|
18
|
+
await this.searchInput.fill(query);
|
|
19
|
+
await this.searchInput.press('Enter');
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.DashboardPage = DashboardPage;
|
|
2
23
|
//# sourceMappingURL=DashboardPage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardPage.js","sourceRoot":"","sources":["../../../src/quality/pages/DashboardPage.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"DashboardPage.js","sourceRoot":"","sources":["../../../src/quality/pages/DashboardPage.ts"],"names":[],"mappings":";;;AAEA,MAAa,aAAa;IAMtB,YAAY,IAAU;QAClB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC;QACvD,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;QAClD,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC;IAC5D,CAAC;IAED,KAAK,CAAC,cAAc;QAChB,OAAO,MAAM,IAAI,CAAC,cAAc,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC;IACzD,CAAC;IAED,KAAK,CAAC,MAAM;QACR,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC;IACpC,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,KAAa;QACtB,MAAM,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACnC,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAC1C,CAAC;CACJ;AAzBD,sCAyBC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sridharkikkeri/playwright-common",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.32",
|
|
4
4
|
"description": "Production-grade Playwright framework with AI-powered self-healing, visual regression, and enterprise features",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Page, Locator } from '@playwright/test';
|
|
2
|
+
|
|
3
|
+
export class DashboardPage {
|
|
4
|
+
readonly page: Page;
|
|
5
|
+
readonly welcomeMessage: Locator;
|
|
6
|
+
readonly logoutButton: Locator;
|
|
7
|
+
readonly searchInput: Locator;
|
|
8
|
+
|
|
9
|
+
constructor(page: Page) {
|
|
10
|
+
this.page = page;
|
|
11
|
+
this.welcomeMessage = page.locator('.welcome-message');
|
|
12
|
+
this.logoutButton = page.locator('button#logout');
|
|
13
|
+
this.searchInput = page.locator('input[name="search"]');
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
async getWelcomeText(): Promise<string> {
|
|
17
|
+
return await this.welcomeMessage.textContent() || '';
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
async logout(): Promise<void> {
|
|
21
|
+
await this.logoutButton.click();
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
async search(query: string): Promise<void> {
|
|
25
|
+
await this.searchInput.fill(query);
|
|
26
|
+
await this.searchInput.press('Enter');
|
|
27
|
+
}
|
|
28
|
+
}
|