pomwright 0.0.7 → 0.0.9
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/CHANGELOG.md +12 -0
- package/README.md +8 -6
- package/dist/index.d.mts +0 -1
- package/dist/index.d.ts +0 -1
- package/package.json +13 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# pomwright
|
|
2
2
|
|
|
3
|
+
## 0.0.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 7e8b7d1: removes an abstract method from POMWright/BasePage which should have been removed previously
|
|
8
|
+
|
|
9
|
+
## 0.0.8
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 0d4924e: adds additional inforamtion to package.json and shields in readme
|
|
14
|
+
|
|
3
15
|
## 0.0.7
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
# POMWright
|
|
2
2
|
|
|
3
|
+
 [](https://www.npmjs.com/package/pomwright)   [](https://www.npmjs.com/package/playwright) [](https://www.ice.no/)
|
|
4
|
+
|
|
3
5
|
POMWright is a TypeScript-based framework that implements the Page Object Model Design Pattern, designed specifically to augment Playwright's testing capabilities.
|
|
4
6
|
|
|
5
|
-
POMWright provides a way of abstracting the implementation details of a web page and encapsulating them into a reusable page object. This approach makes the tests easier to read and maintain, and helps reduce duplicated code by breaking down the code into smaller, reusable components, making the code more maintainable and organized.
|
|
7
|
+
POMWright provides a way of abstracting the implementation details of a web page and encapsulating them into a reusable page object. This approach makes the tests easier to read, write and maintain, and helps reduce duplicated code by breaking down the code into smaller, reusable components, making the code more maintainable and organized.
|
|
6
8
|
|
|
7
9
|
## Features
|
|
8
10
|
|
|
@@ -182,9 +184,9 @@ test("update a locator before use", async ({ profile }) => {
|
|
|
182
184
|
* content.region.details
|
|
183
185
|
* content.region.details.button.edit (updated)
|
|
184
186
|
*/
|
|
185
|
-
const editBtn = await profile.getLocatorSchema()
|
|
187
|
+
const editBtn = await profile.getLocatorSchema("content.region.details.button.edit")
|
|
186
188
|
.update({ roleOptions: { name: "Edit details" }})
|
|
187
|
-
.getNestedLocator(
|
|
189
|
+
.getNestedLocator();
|
|
188
190
|
|
|
189
191
|
await editBtn.click();
|
|
190
192
|
|
|
@@ -205,14 +207,14 @@ test("update a nested locator before use", async ({ profile }) => {
|
|
|
205
207
|
* content.region.details (updated)
|
|
206
208
|
* content.region.details.button.edit
|
|
207
209
|
*/
|
|
208
|
-
const editBtn = await profile.getLocatorSchema()
|
|
210
|
+
const editBtn = await profile.getLocatorSchema("content.region.details.button.edit")
|
|
209
211
|
.updates({
|
|
210
212
|
2: { // content.region.details
|
|
211
213
|
locator: ".profile-details",
|
|
212
214
|
locatorMethod: GetByMethod.locator
|
|
213
215
|
}
|
|
214
216
|
})
|
|
215
|
-
.getNestedLocator(
|
|
217
|
+
.getNestedLocator();
|
|
216
218
|
|
|
217
219
|
await editBtn.click();
|
|
218
220
|
|
|
@@ -238,7 +240,7 @@ test("make multiple versions of a locator", async ({ profile }) => {
|
|
|
238
240
|
await editBtnUpdated.click();
|
|
239
241
|
|
|
240
242
|
/**
|
|
241
|
-
* Calling profile.getLocatorSchema(content.region.details.button.edit) again
|
|
243
|
+
* Calling profile.getLocatorSchema("content.region.details.button.edit") again
|
|
242
244
|
* will return a new deepCopy of the original LocatorSchema
|
|
243
245
|
*/
|
|
244
246
|
|
package/dist/index.d.mts
CHANGED
|
@@ -433,7 +433,6 @@ declare abstract class BasePage<LocatorSchemaPathType extends string> {
|
|
|
433
433
|
* @returns Promise<Locator> - A promise that resolves to the nested locator.
|
|
434
434
|
*/
|
|
435
435
|
getLocator: (locatorSchemaPath: LocatorSchemaPathType) => Promise<Locator>;
|
|
436
|
-
protected abstract pageActionsToPerformAfterNavigation(): (() => Promise<void>)[];
|
|
437
436
|
/**
|
|
438
437
|
* Abstract method to initialize locator schemas.
|
|
439
438
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -433,7 +433,6 @@ declare abstract class BasePage<LocatorSchemaPathType extends string> {
|
|
|
433
433
|
* @returns Promise<Locator> - A promise that resolves to the nested locator.
|
|
434
434
|
*/
|
|
435
435
|
getLocator: (locatorSchemaPath: LocatorSchemaPathType) => Promise<Locator>;
|
|
436
|
-
protected abstract pageActionsToPerformAfterNavigation(): (() => Promise<void>)[];
|
|
437
436
|
/**
|
|
438
437
|
* Abstract method to initialize locator schemas.
|
|
439
438
|
*
|
package/package.json
CHANGED
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pomwright",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"description": "POMWright is a complementary test framework for Playwright written in TypeScript.",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/DyHex/POMWright"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://github.com/DyHex/POMWright#readme",
|
|
10
|
+
"bugs": {
|
|
11
|
+
"url": "https://github.com/DyHex/POMWright/issues"
|
|
12
|
+
},
|
|
13
|
+
"author": {
|
|
14
|
+
"name": "Magnus Blütecher Dysthe"
|
|
15
|
+
},
|
|
16
|
+
"license": "Apache 2.0",
|
|
5
17
|
"main": "dist/index.js",
|
|
6
18
|
"module": "dist/index.mjs",
|
|
7
19
|
"types": "dist/index.d.ts",
|
|
@@ -11,8 +23,6 @@
|
|
|
11
23
|
"Page Object Model",
|
|
12
24
|
"Test Framework"
|
|
13
25
|
],
|
|
14
|
-
"author": "Magnus Blütecher Dysthe",
|
|
15
|
-
"license": "Apache 2.0",
|
|
16
26
|
"devDependencies": {
|
|
17
27
|
"@biomejs/biome": "^1.5.1",
|
|
18
28
|
"@changesets/cli": "^2.27.1",
|