@argos-ci/puppeteer 0.0.2 → 0.0.3

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.
Files changed (3) hide show
  1. package/README.md +3 -3
  2. package/index.js +12 -0
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -12,9 +12,9 @@ _Argos is a visual testing solution that fits in your workflow to avoid visual r
12
12
  [![npm dm](https://img.shields.io/npm/dm/@argos-ci/puppeteer.svg)](https://www.npmjs.com/package/@argos-ci/puppeteer)
13
13
  [![npm dt](https://img.shields.io/npm/dt/@argos-ci/puppeteer.svg)](https://www.npmjs.com/package/@argos-ci/puppeteer)
14
14
 
15
- Visit [docs.argos-ci.com/puppeteer](https://docs.argos-ci.com/puppeteer) for guides, API and more.
15
+ Visit [argos-ci.com/docs/puppeteer](https://argos-ci.com/docs/puppeteer) for guides, API and more.
16
16
 
17
17
  ## Links
18
18
 
19
- - [Official SDK Docs](https://docs.argos-ci.com/)
20
- - [Discord](https://discord.gg/pK79sv85Vg)
19
+ - [Official SDK Docs](https://argos-ci.com/docs/)
20
+ - [Discord](https://argos-ci.com/discord)
package/index.js CHANGED
@@ -61,6 +61,17 @@ async function waitForImages() {
61
61
  );
62
62
  }
63
63
 
64
+ /**
65
+ * Disable spellcheck to avoid red underlines
66
+ */
67
+ function disableSpellCheck() {
68
+ const query =
69
+ "[contenteditable]:not([contenteditable=false]):not([spellcheck=false]), input:not([spellcheck=false]), textarea:not([spellcheck=false])";
70
+ const inputs = document.querySelectorAll(query);
71
+ inputs.forEach((input) => input.setAttribute("spellcheck", "false"));
72
+ return true;
73
+ }
74
+
64
75
  export async function argosScreenshot(
65
76
  page,
66
77
  name,
@@ -89,6 +100,7 @@ export async function argosScreenshot(
89
100
  page.waitForFunction(ensureNoBusy),
90
101
  page.waitForFunction(waitForFonts),
91
102
  page.waitForFunction(waitForImages),
103
+ page.waitForFunction(disableSpellCheck),
92
104
  ]);
93
105
 
94
106
  await resolvedElement.screenshot({
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@argos-ci/puppeteer",
3
3
  "description": "Visual testing solution to avoid visual regression. Puppeteer commands and utilities for Argos visual testing.",
4
- "version": "0.0.2",
4
+ "version": "0.0.3",
5
5
  "author": "Smooth Code",
6
6
  "license": "MIT",
7
7
  "repository": "github:argos-ci/argos-puppeteer",