@argos-ci/playwright 7.6.0 → 7.7.1
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.d.mts +10 -4
- package/dist/index.mjs +3 -1
- package/dist/reporter.d.mts +3 -3
- package/dist/reporter.mjs +3 -1
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
</a>
|
|
8
8
|
</p>
|
|
9
9
|
|
|
10
|
-
<p align="center"><strong>The open source visual testing platform for AI
|
|
10
|
+
<p align="center"><strong>The open source visual testing platform for teams and AI agents.</strong></p>
|
|
11
11
|
|
|
12
12
|
# Official Argos Playwright integration
|
|
13
13
|
|
package/dist/index.d.mts
CHANGED
|
@@ -48,7 +48,7 @@ type ArgosSnapshotOptions = {
|
|
|
48
48
|
* argosAriaSnapshot(page, "my-screenshot")
|
|
49
49
|
* @see https://playwright.dev/docs/aria-snapshots
|
|
50
50
|
*/
|
|
51
|
-
declare function argosAriaSnapshot(
|
|
51
|
+
export declare function argosAriaSnapshot(
|
|
52
52
|
/**
|
|
53
53
|
* Playwright `page` or `frame` object.
|
|
54
54
|
*/
|
|
@@ -155,7 +155,7 @@ type ArgosScreenshotOptions = {
|
|
|
155
155
|
* argosScreenshot(page, "my-screenshot")
|
|
156
156
|
* @see https://argos-ci.com/docs/reference/playwright
|
|
157
157
|
*/
|
|
158
|
-
declare function argosScreenshot(
|
|
158
|
+
export declare function argosScreenshot(
|
|
159
159
|
/**
|
|
160
160
|
* Playwright `page` or `frame` object.
|
|
161
161
|
*/
|
|
@@ -173,12 +173,18 @@ options?: ArgosScreenshotOptions): Promise<ArgosAttachment[]>;
|
|
|
173
173
|
/**
|
|
174
174
|
* Get the CSP script hash.
|
|
175
175
|
*/
|
|
176
|
-
declare function getCSPScriptHash(): string;
|
|
176
|
+
export declare function getCSPScriptHash(): string;
|
|
177
177
|
//#endregion
|
|
178
178
|
//#region src/metadata.d.ts
|
|
179
179
|
type MetadataConfig = {
|
|
180
180
|
sdk: ScreenshotMetadata["sdk"];
|
|
181
181
|
playwrightLibraries: string[];
|
|
182
|
+
/**
|
|
183
|
+
* Automation library resolved by the SDK itself, which wins over
|
|
184
|
+
* `playwrightLibraries`: for packages this one cannot resolve from its own
|
|
185
|
+
* install location, like a user's Storybook under strict package managers.
|
|
186
|
+
*/
|
|
187
|
+
automationLibrary?: ScreenshotMetadata["automationLibrary"];
|
|
182
188
|
url?: string;
|
|
183
189
|
test?: ScreenshotMetadata["test"];
|
|
184
190
|
story?: ScreenshotMetadata["story"];
|
|
@@ -195,4 +201,4 @@ type MetadataConfig = {
|
|
|
195
201
|
*/
|
|
196
202
|
declare function setMetadataConfig(metadata: MetadataConfig): void;
|
|
197
203
|
//#endregion
|
|
198
|
-
export { type ArgosAttachment, type ArgosScreenshotOptions, type ArgosSnapshotOptions, setMetadataConfig as DO_NOT_USE_setMetadataConfig, type MetadataConfig
|
|
204
|
+
export { type ArgosAttachment, type ArgosScreenshotOptions, type ArgosSnapshotOptions, setMetadataConfig as DO_NOT_USE_setMetadataConfig, type MetadataConfig };
|
package/dist/index.mjs
CHANGED
|
@@ -43,7 +43,9 @@ function getMetadataOverrides() {
|
|
|
43
43
|
* Get the name and version of the automation library.
|
|
44
44
|
*/
|
|
45
45
|
async function getAutomationLibraryMetadata() {
|
|
46
|
-
const
|
|
46
|
+
const metadataConfig = metadataConfigStorage.getStore();
|
|
47
|
+
if (metadataConfig?.automationLibrary) return metadataConfig.automationLibrary;
|
|
48
|
+
const libraries = metadataConfig?.playwrightLibraries ?? DEFAULT_PLAYWRIGHT_LIBRARIES;
|
|
47
49
|
for (const name of libraries) {
|
|
48
50
|
const pkgPath = tryResolve(`${name}/package.json`);
|
|
49
51
|
if (pkgPath) return {
|
package/dist/reporter.d.mts
CHANGED
|
@@ -2231,7 +2231,7 @@ type DynamicBuildName<T extends readonly string[]> = {
|
|
|
2231
2231
|
*/
|
|
2232
2232
|
get: (test: TestCase) => T[number];
|
|
2233
2233
|
};
|
|
2234
|
-
type ArgosReporterOptions<T extends string[] = string[]> = Omit<UploadParameters, "files" | "root" | "buildName" | "metadata"> & {
|
|
2234
|
+
export type ArgosReporterOptions<T extends string[] = string[]> = Omit<UploadParameters, "files" | "root" | "buildName" | "metadata"> & {
|
|
2235
2235
|
/**
|
|
2236
2236
|
* Upload the report to Argos.
|
|
2237
2237
|
* @default true
|
|
@@ -2248,7 +2248,7 @@ type ArgosReporterOptions<T extends string[] = string[]> = Omit<UploadParameters
|
|
|
2248
2248
|
*/
|
|
2249
2249
|
buildName?: string | DynamicBuildName<T> | null;
|
|
2250
2250
|
};
|
|
2251
|
-
declare function createArgosReporterOptions<T extends string[]>(options: ArgosReporterOptions<T>): ArgosReporterOptions<T>;
|
|
2251
|
+
export declare function createArgosReporterOptions<T extends string[]>(options: ArgosReporterOptions<T>): ArgosReporterOptions<T>;
|
|
2252
2252
|
declare class ArgosReporter implements Reporter {
|
|
2253
2253
|
rootUploadDirectoryPromise: null | Promise<string>;
|
|
2254
2254
|
uploadDirectoryPromises: Map<string, Promise<string>>;
|
|
@@ -2280,4 +2280,4 @@ declare class ArgosReporter implements Reporter {
|
|
|
2280
2280
|
printsToStdio(): boolean;
|
|
2281
2281
|
}
|
|
2282
2282
|
//#endregion
|
|
2283
|
-
export {
|
|
2283
|
+
export { ArgosReporter as default };
|
package/dist/reporter.mjs
CHANGED
|
@@ -33,7 +33,9 @@ const DEFAULT_PLAYWRIGHT_LIBRARIES = [
|
|
|
33
33
|
* Get the name and version of the automation library.
|
|
34
34
|
*/
|
|
35
35
|
async function getAutomationLibraryMetadata() {
|
|
36
|
-
const
|
|
36
|
+
const metadataConfig = metadataConfigStorage.getStore();
|
|
37
|
+
if (metadataConfig?.automationLibrary) return metadataConfig.automationLibrary;
|
|
38
|
+
const libraries = metadataConfig?.playwrightLibraries ?? DEFAULT_PLAYWRIGHT_LIBRARIES;
|
|
37
39
|
for (const name of libraries) {
|
|
38
40
|
const pkgPath = tryResolve(`${name}/package.json`);
|
|
39
41
|
if (pkgPath) return {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@argos-ci/playwright",
|
|
3
3
|
"description": "Playwright SDK for visual testing with Argos.",
|
|
4
|
-
"version": "7.
|
|
4
|
+
"version": "7.7.1",
|
|
5
5
|
"author": "Smooth Code",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -47,10 +47,10 @@
|
|
|
47
47
|
"node": ">=22.0.0"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@argos-ci/browser": "6.
|
|
51
|
-
"@argos-ci/core": "6.8.
|
|
52
|
-
"@argos-ci/util": "4.2.
|
|
53
|
-
"chalk": "^6.0.
|
|
50
|
+
"@argos-ci/browser": "6.5.0",
|
|
51
|
+
"@argos-ci/core": "6.8.7",
|
|
52
|
+
"@argos-ci/util": "4.2.2",
|
|
53
|
+
"chalk": "^6.0.1",
|
|
54
54
|
"debug": "^4.4.3"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"lint": "eslint .",
|
|
70
70
|
"test": "vitest src"
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "e9d0b2fb39001683230eff86f9c39e0016b5cf27"
|
|
73
73
|
}
|