@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 CHANGED
@@ -17,4 +17,4 @@ Visit [argos-ci.com/docs/playwright](https://argos-ci.com/docs/playwright) for g
17
17
  ## Links
18
18
 
19
19
  - [Official SDK Docs](https://argos-ci.com/docs/)
20
- - [Discord](https://discord.gg/WjzGrQGS4A)
20
+ - [Discord](https://argos-ci.com/discord)
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",
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": {