@argos-ci/playwright 0.0.4 → 0.0.6
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/README.md +1 -1
- package/dist/index.mjs +9 -6
- package/package.json +2 -1
package/README.md
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -42,13 +42,16 @@ async function argosScreenshot(page, name, { element , has , hasText , ...option
|
|
|
42
42
|
mkdir(screenshotFolder, {
|
|
43
43
|
recursive: true
|
|
44
44
|
});
|
|
45
|
+
// Inject global styles
|
|
46
|
+
await page.addStyleTag({
|
|
47
|
+
content: GLOBAL_STYLES
|
|
48
|
+
});
|
|
49
|
+
// Wait for all busy elements to be loaded
|
|
50
|
+
await page.waitForSelector('[aria-busy="true"]', {
|
|
51
|
+
state: "hidden"
|
|
52
|
+
});
|
|
53
|
+
// Wait for all images and fonts to be loaded
|
|
45
54
|
await Promise.all([
|
|
46
|
-
page.addStyleTag({
|
|
47
|
-
content: GLOBAL_STYLES
|
|
48
|
-
}),
|
|
49
|
-
page.waitForSelector('[aria-busy="true"]', {
|
|
50
|
-
state: "hidden"
|
|
51
|
-
}),
|
|
52
55
|
page.waitForFunction(waitForImagesLoading),
|
|
53
56
|
page.waitForFunction(waitForFontLoading)
|
|
54
57
|
]);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@argos-ci/playwright",
|
|
3
3
|
"description": "Visual testing solution to avoid visual regression. Playwright commands and utilities for Argos visual testing.",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.6",
|
|
5
5
|
"author": "Smooth Code",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": "github:argos-ci/argos-playwright",
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"format": "prettier --write . --ignore-path .gitignore",
|
|
40
40
|
"check-format": "prettier --check .",
|
|
41
41
|
"lint": "eslint --ignore-path .gitignore .",
|
|
42
|
+
"prepublishOnly": "npm run build",
|
|
42
43
|
"release": "standard-version && conventional-github-releaser --preset angular"
|
|
43
44
|
},
|
|
44
45
|
"devDependencies": {
|