@argos-ci/playwright
Advanced tools
Comparing version 3.8.1 to 3.9.0
@@ -1,4 +0,5 @@ | ||
import { Page, PageScreenshotOptions, LocatorScreenshotOptions, ElementHandle, Locator } from "@playwright/test"; | ||
import { ViewportOption } from "@argos-ci/browser"; | ||
import { ScreenshotMetadata } from "@argos-ci/util"; | ||
import { ElementHandle, Locator, LocatorScreenshotOptions, PageScreenshotOptions, Page } from '@playwright/test'; | ||
import { ViewportOption, StabilizationOptions } from '@argos-ci/browser'; | ||
import { ScreenshotMetadata } from '@argos-ci/util'; | ||
type LocatorOptions = Parameters<Page["locator"]>[1]; | ||
@@ -36,2 +37,9 @@ type ScreenshotOptions<TBase extends PageScreenshotOptions | LocatorScreenshotOptions> = Omit<TBase, "encoding" | "type" | "omitBackground" | "path">; | ||
root?: string; | ||
/** | ||
* Wait for the UI to stabilize before taking the screenshot. | ||
* Set to `false` to disable stabilization. | ||
* Pass an object to customize the stabilization. | ||
* @default true | ||
*/ | ||
stabilize?: boolean | StabilizationOptions; | ||
} & LocatorOptions & ScreenshotOptions<LocatorScreenshotOptions> & ScreenshotOptions<PageScreenshotOptions>; | ||
@@ -45,12 +53,16 @@ /** | ||
*/ | ||
declare function argosScreenshot(/** | ||
declare function argosScreenshot( | ||
/** | ||
* Playwright `page` object. | ||
*/ | ||
page: Page, /** | ||
page: Page, | ||
/** | ||
* Name of the screenshot. Must be unique. | ||
*/ | ||
name: string, /** | ||
name: string, | ||
/** | ||
* Options for the screenshot. | ||
*/ | ||
options?: ArgosScreenshotOptions): Promise<void>; | ||
/** | ||
@@ -60,2 +72,3 @@ * Get the CSP script hash. | ||
declare function getCSPScriptHash(): Promise<string>; | ||
type MetadataConfig = { | ||
@@ -69,2 +82,3 @@ sdk: ScreenshotMetadata["sdk"]; | ||
declare function setMetadataConfig(metadata: MetadataConfig): Promise<void>; | ||
export { ArgosScreenshotOptions, argosScreenshot, getCSPScriptHash, setMetadataConfig as DO_NOT_USE_setMetadataConfig }; | ||
export { type ArgosScreenshotOptions, setMetadataConfig as DO_NOT_USE_setMetadataConfig, argosScreenshot, getCSPScriptHash }; |
@@ -1,4 +0,4 @@ | ||
/// <reference types="node" /> | ||
import { FullConfig, FullResult, Reporter, Suite, TestCase, TestResult } from "@playwright/test/reporter"; | ||
import { UploadParameters } from "@argos-ci/core"; | ||
import { Reporter, FullConfig, TestResult, Suite, TestCase, FullResult } from '@playwright/test/reporter'; | ||
import { UploadParameters } from '@argos-ci/core'; | ||
/** | ||
@@ -44,5 +44,2 @@ * Dynamic build name. | ||
*/ | ||
/** | ||
* Write a file to the temporary directory. | ||
*/ | ||
writeFile(path: string, body: Buffer | string): Promise<void>; | ||
@@ -52,5 +49,2 @@ /** | ||
*/ | ||
/** | ||
* Copy a file to the temporary directory. | ||
*/ | ||
copyFile(from: string, to: string): Promise<void>; | ||
@@ -60,5 +54,2 @@ /** | ||
*/ | ||
/** | ||
* Copy the trace file if found in the result. | ||
*/ | ||
copyTraceIfFound(result: TestResult, path: string): Promise<void>; | ||
@@ -68,5 +59,2 @@ /** | ||
*/ | ||
/** | ||
* Get the root upload directory (cached). | ||
*/ | ||
getRootUploadDirectory(): Promise<string>; | ||
@@ -79,2 +67,3 @@ onBegin(config: FullConfig, _suite: Suite): void; | ||
} | ||
export { ArgosReporter as default, ArgosReporterOptions, createArgosReporterOptions }; | ||
export { type ArgosReporterOptions, createArgosReporterOptions, ArgosReporter as default }; |
{ | ||
"name": "@argos-ci/playwright", | ||
"description": "Playwright SDK for visual testing with Argos.", | ||
"version": "3.8.1", | ||
"version": "3.9.0", | ||
"author": "Smooth Code", | ||
@@ -35,10 +35,10 @@ "license": "MIT", | ||
"types": "./dist/index.d.ts", | ||
"import": "./dist/index.mjs", | ||
"import": "./dist/index.js", | ||
"require": "./dist/index.cjs", | ||
"default": "./dist/index.mjs" | ||
"default": "./dist/index.cjs" | ||
}, | ||
"./reporter": { | ||
"types": "./dist/reporter.d.ts", | ||
"import": "./dist/reporter.mjs", | ||
"default": "./dist/reporter.mjs" | ||
"import": "./dist/reporter.js", | ||
"default": "./dist/reporter.js" | ||
}, | ||
@@ -51,12 +51,12 @@ "./package.json": "./package.json" | ||
"dependencies": { | ||
"@argos-ci/browser": "2.1.6", | ||
"@argos-ci/core": "2.9.2", | ||
"@argos-ci/util": "2.1.2", | ||
"@argos-ci/browser": "2.2.0", | ||
"@argos-ci/core": "2.10.0", | ||
"@argos-ci/util": "2.2.0", | ||
"chalk": "^5.3.0", | ||
"debug": "^4.3.6" | ||
"debug": "^4.3.7" | ||
}, | ||
"devDependencies": { | ||
"@argos-ci/cli": "2.4.7", | ||
"@argos-ci/cli": "2.5.0", | ||
"@argos-ci/playwright": "workspace:.", | ||
"@playwright/test": "^1.48.1", | ||
"@playwright/test": "^1.48.2", | ||
"@types/debug": "^4.1.12", | ||
@@ -66,8 +66,7 @@ "@types/node": "^18.19.44" | ||
"scripts": { | ||
"prebuild": "rm -rf dist", | ||
"build": "rollup -c", | ||
"build": "tsup && cp ./src/index.cjs ./dist", | ||
"test": "pnpm exec -- playwright test", | ||
"e2e": "UPLOAD_TO_ARGOS=true pnpm run test" | ||
}, | ||
"gitHead": "7a4968a5b85f8ff511940d9a16ae9dd14e70ca00" | ||
"gitHead": "fe6e055a43e955e7df362ddaec59c84dc274bbb2" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
0
30564
812
1
+ Added@argos-ci/api-client@0.7.0(transitive)
+ Added@argos-ci/browser@2.2.0(transitive)
+ Added@argos-ci/core@2.10.0(transitive)
+ Added@argos-ci/util@2.2.0(transitive)
+ Addedopenapi-fetch@0.13.3(transitive)
+ Addedopenapi-typescript-helpers@0.0.15(transitive)
- Removed@argos-ci/api-client@0.6.2(transitive)
- Removed@argos-ci/browser@2.1.6(transitive)
- Removed@argos-ci/core@2.9.2(transitive)
- Removed@argos-ci/util@2.1.2(transitive)
- Removedopenapi-fetch@0.11.3(transitive)
- Removedopenapi-typescript-helpers@0.0.13(transitive)
Updated@argos-ci/browser@2.2.0
Updated@argos-ci/core@2.10.0
Updated@argos-ci/util@2.2.0
Updateddebug@^4.3.7