@argos-ci/playwright 1.6.1 → 1.6.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.mjs +4 -4
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { mkdir, readFile } from 'node:fs/promises';
|
|
|
2
2
|
import { relative, resolve, dirname } from 'node:path';
|
|
3
3
|
import { createRequire } from 'node:module';
|
|
4
4
|
import { resolveViewport } from '@argos-ci/browser';
|
|
5
|
-
import { getGitRepositoryPath, readVersionFromPackage, getScreenshotName, writeMetadata } from '@argos-ci/util';
|
|
5
|
+
import { getGitRepositoryPath, readVersionFromPackage, getScreenshotName, writeMetadata, getMetadataPath } from '@argos-ci/util';
|
|
6
6
|
|
|
7
7
|
function getAttachmentName(name, type) {
|
|
8
8
|
return `argos/${type}___${name}`;
|
|
@@ -173,7 +173,7 @@ async function argosScreenshot(page, name, { element, has, hasText, viewports, a
|
|
|
173
173
|
});
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
|
-
|
|
176
|
+
await Promise.all([
|
|
177
177
|
handle.screenshot({
|
|
178
178
|
path: screenshotPath ?? undefined,
|
|
179
179
|
type: "png",
|
|
@@ -189,11 +189,11 @@ async function argosScreenshot(page, name, { element, has, hasText, viewports, a
|
|
|
189
189
|
if (useArgosReporter) {
|
|
190
190
|
await Promise.all([
|
|
191
191
|
testInfo.attach(getAttachmentName(name, "metadata"), {
|
|
192
|
-
|
|
192
|
+
path: getMetadataPath(screenshotPath),
|
|
193
193
|
contentType: "application/json"
|
|
194
194
|
}),
|
|
195
195
|
testInfo.attach(getAttachmentName(name, "screenshot"), {
|
|
196
|
-
|
|
196
|
+
path: screenshotPath,
|
|
197
197
|
contentType: "image/png"
|
|
198
198
|
})
|
|
199
199
|
]);
|
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": "1.6.
|
|
4
|
+
"version": "1.6.2",
|
|
5
5
|
"author": "Smooth Code",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"test": "pnpm exec playwright test",
|
|
60
60
|
"e2e": "UPLOAD_TO_ARGOS=true pnpm run test"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "78db5bd5211d07027f84c581392b4ac8fec0be12"
|
|
63
63
|
}
|