@argos-ci/puppeteer 3.1.1 → 3.1.2
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/dist/index.js +6 -5
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -183,18 +183,19 @@ ${reasons.map((reason) => `- ${reason}`).join("\n")}
|
|
|
183
183
|
};
|
|
184
184
|
if (element === void 0) {
|
|
185
185
|
await page.screenshot(screenshotOptions);
|
|
186
|
-
|
|
187
|
-
}
|
|
188
|
-
if (typeof element === "string") {
|
|
186
|
+
} else if (typeof element === "string") {
|
|
189
187
|
await page.waitForSelector(element);
|
|
190
188
|
const handle = await page.$(element);
|
|
191
189
|
if (!handle) {
|
|
192
190
|
throw new Error(`Unable to find element ${element}`);
|
|
193
191
|
}
|
|
194
192
|
await handle.screenshot(screenshotOptions);
|
|
195
|
-
|
|
193
|
+
} else {
|
|
194
|
+
await element.screenshot(screenshotOptions);
|
|
196
195
|
}
|
|
197
|
-
await
|
|
196
|
+
await page.evaluate(
|
|
197
|
+
() => window.__ARGOS__.afterEach()
|
|
198
|
+
);
|
|
198
199
|
}
|
|
199
200
|
if (viewports) {
|
|
200
201
|
for (const viewport of viewports) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@argos-ci/puppeteer",
|
|
3
3
|
"description": "Puppeteer SDK for visual testing with Argos.",
|
|
4
|
-
"version": "3.1.
|
|
4
|
+
"version": "3.1.2",
|
|
5
5
|
"author": "Smooth Code",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"puppeteer": ">=1"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@argos-ci/browser": "3.1.
|
|
45
|
+
"@argos-ci/browser": "3.1.2",
|
|
46
46
|
"@argos-ci/util": "2.3.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"argos-upload": "pnpm exec argos upload screenshots --build-name \"argos-puppeteer-e2e-node-$NODE_VERSION-$OS\"",
|
|
63
63
|
"e2e": "pnpm run test && pnpm run argos-upload"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "10a2ccddf43fa1fced8f8625d24b1d3f19e4096c"
|
|
66
66
|
}
|