@gfdelarue/testkit 0.6.1 → 0.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{_android as e,_baseTest as r,_electron as t,chromium as o,defineConfig as a,devices as s,errors as i,expect as m,firefox as d,mergeExpects as n,mergeTests as f,request as l,selectors as x,test as p,webkit as c}from"@playwright/test";export{e as _android,r as _baseTest,t as _electron,o as chromium,a as defineConfig,s as devices,i as errors,m as expect,d as firefox,n as mergeExpects,f as mergeTests,l as request,x as selectors,p as test,c as webkit};export{readPlaywrightContext}from"./runtime-input.js";export{defineTestkitConfig}from"./config.js";export{emulateCpu,emulateNetwork}from"./emulation.js";export{browserRequests}from"./browser-traffic.js";export{assertSafeUiTarget,assertSafeUiTargets,createAuthedApiClient,createSandboxId,createUiSandbox,resolveBackendBaseUrl,resolveFrontendBaseUrl,waitForAnimationFrames,waitForElementStable,waitForImagesLoaded,waitForNetworkIdle,waitForUiSettled}from"./sandbox.js";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"entrypoint": "dist/process/process.js",
|
|
4
4
|
"sourceSha256": "e7301ca010796bb92d983c039db47f36e155c26ccfb42ff2d057d47addab3121",
|
|
5
5
|
"bundleSha256": "db5da25a23e4577451c0c047360de70af8abbd63be686dd7b97d65486cbba3b8",
|
|
6
|
-
"packageLockSha256": "
|
|
6
|
+
"packageLockSha256": "4930f6721a8dccdb4e7f9e0545f70139ef5d6c4018b5eae961c74ff2be6af65c",
|
|
7
7
|
"esbuildVersion": "0.28.1",
|
|
8
8
|
"options": {
|
|
9
9
|
"format": "esm",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { APIRequest, APIRequestContext, Page, PlaywrightTestConfig } from '@playwright/test';
|
|
1
|
+
import { APIRequest, APIRequestContext, Page, PlaywrightTestConfig, _android, _baseTest, _electron, chromium, defineConfig, devices, errors, expect, firefox, mergeExpects, mergeTests, request, selectors, test, webkit } from '@playwright/test';
|
|
2
2
|
|
|
3
3
|
export type JsonPrimitive = boolean | null | number | string;
|
|
4
4
|
export type JsonValue = JsonPrimitive | readonly JsonValue[] | JsonObject;
|
|
@@ -139,13 +139,28 @@ export declare function waitForElementStable(page: UiStableElementPage, selector
|
|
|
139
139
|
timeout?: number;
|
|
140
140
|
}): Promise<void>;
|
|
141
141
|
export declare function waitForImagesLoaded(page: UiImagesPage, containerSelector?: string | null): Promise<void>;
|
|
142
|
-
export * from "@playwright/test";
|
|
142
|
+
export type * from "@playwright/test";
|
|
143
143
|
|
|
144
144
|
export {
|
|
145
145
|
APIRequest,
|
|
146
146
|
APIRequestContext,
|
|
147
147
|
Page,
|
|
148
148
|
PlaywrightTestConfig,
|
|
149
|
+
_android,
|
|
150
|
+
_baseTest,
|
|
151
|
+
_electron,
|
|
152
|
+
chromium,
|
|
153
|
+
defineConfig,
|
|
154
|
+
devices,
|
|
155
|
+
errors,
|
|
156
|
+
expect,
|
|
157
|
+
firefox,
|
|
158
|
+
mergeExpects,
|
|
159
|
+
mergeTests,
|
|
160
|
+
request,
|
|
161
|
+
selectors,
|
|
162
|
+
test,
|
|
163
|
+
webkit,
|
|
149
164
|
};
|
|
150
165
|
|
|
151
166
|
export {};
|
package/docs/release-notes.md
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
# 0.6.2
|
|
2
|
+
|
|
3
|
+
## Static imports from `@gfdelarue/testkit/playwright` work in a CommonJS product
|
|
4
|
+
|
|
5
|
+
In a product whose `package.json` doesn't set `"type": "module"`, a `ui` test
|
|
6
|
+
that imported a Testkit helper from `@gfdelarue/testkit/playwright` got
|
|
7
|
+
`undefined`, and threw a `TypeError` when it called it
|
|
8
|
+
([gfdelarue/testkit#505](https://github.com/gfdelarue/testkit/issues/505)).
|
|
9
|
+
Every helper was affected, from `browserRequests` and `emulateNetwork` to
|
|
10
|
+
`waitForUiSettled`. `test`, `expect`, and Playwright's other exports still
|
|
11
|
+
worked. Static imports now get every helper, as they do in an ES module product.
|
|
12
|
+
|
|
13
|
+
Playwright compiles such a test to CommonJS, so each static import becomes a
|
|
14
|
+
`require()`. The entry re-exported Playwright with `export *`, which also passed
|
|
15
|
+
on the `"module.exports"` export of Testkit's managed `@playwright/test`. Node's
|
|
16
|
+
`require()` returns that export in place of the module, so it returned the
|
|
17
|
+
managed `test`. The entry now names each of Playwright's runtime exports.
|
|
18
|
+
`require("@playwright/test")` in a test still returns the managed `test`.
|
|
19
|
+
|
|
1
20
|
# 0.6.1
|
|
2
21
|
|
|
3
22
|
## Each `ui` test's browser traffic is in the run evidence
|