@rind-ui/testing 0.3.0 → 0.4.0
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/{adapter-B05M46SW.d.mts → adapter-C3LQTPFi.d.mts} +2 -0
- package/dist/{compose-BpR_PG11.mjs → compose-m76ER6GL.mjs} +1 -1
- package/dist/{dom-Ur_VPlTe.d.mts → dom-BH8CVBb2.d.mts} +1 -1
- package/dist/{dom-Bnnr_fg-.mjs → dom-DjurZVd0.mjs} +35 -4
- package/dist/dom.d.mts +1 -1
- package/dist/dom.mjs +1 -1
- package/dist/index.d.mts +3276 -852
- package/dist/index.mjs +217 -25
- package/dist/inpage.iife.js +7 -7
- package/dist/{playwright-C3Ue38p3.mjs → playwright-BbVj53fU.mjs} +10 -3
- package/dist/{playwright-By15MZsN.d.mts → playwright-D2coDhsT.d.mts} +1 -1
- package/dist/playwright.d.mts +1 -1
- package/dist/playwright.mjs +1 -1
- package/dist/setup.mjs +1 -1
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as renamedSnapshot, r as describeBy, s as poll, t as composeInPage } from "./compose-
|
|
1
|
+
import { c as renamedSnapshot, r as describeBy, s as poll, t as composeInPage } from "./compose-m76ER6GL.mjs";
|
|
2
2
|
//#region src/adapters/chromium-tree.ts
|
|
3
3
|
const toNode = (n) => ({
|
|
4
4
|
role: n.role?.value ?? "",
|
|
@@ -208,10 +208,10 @@ function createPlaywrightEnv(getBase, { scope, anchor, modality, platform, partN
|
|
|
208
208
|
timeout,
|
|
209
209
|
wait
|
|
210
210
|
});
|
|
211
|
-
const byLocator = (root, by) => "role" in by ? root.getByRole(
|
|
211
|
+
const byLocator = (root, by) => "role" in by ? [by.role].flat().map((role) => root.getByRole(role, { ...by.name === void 0 ? {} : {
|
|
212
212
|
name: by.name,
|
|
213
213
|
exact: true
|
|
214
|
-
} }) : "label" in by ? root.getByLabel(by.label, { exact: true }) : "part" in by ? root.locator(`[data-scope="${scope}"][data-part="${partName?.(by.part) ?? by.part}"]`) : root.getByText(by.text, { exact: true });
|
|
214
|
+
} })).reduce((all, one) => all.or(one)) : "label" in by ? root.getByLabel(by.label, { exact: true }) : "part" in by ? root.locator(`[data-scope="${scope}"][data-part="${partName?.(by.part) ?? by.part}"]`) : root.getByText(by.text, { exact: true });
|
|
215
215
|
const describeAll = (l) => l.evaluateAll((els) => els.map((el) => el.outerHTML.slice(0, 160)).join("\n"));
|
|
216
216
|
/** What tells a navigation: the URL, the open pages, and the in-page log (fakeRouter). */
|
|
217
217
|
const navigationState = async () => {
|
|
@@ -581,6 +581,13 @@ function createPlaywrightEnv(getBase, { scope, anchor, modality, platform, partN
|
|
|
581
581
|
input.dispatchEvent(new InputEvent("input", init));
|
|
582
582
|
}, text);
|
|
583
583
|
},
|
|
584
|
+
async setFiles(specs) {
|
|
585
|
+
await (await waitFor()).setInputFiles(specs.map((f) => ({
|
|
586
|
+
name: f.name,
|
|
587
|
+
mimeType: f.type,
|
|
588
|
+
buffer: Buffer.from(f.content)
|
|
589
|
+
})));
|
|
590
|
+
},
|
|
584
591
|
waitForDetach: async () => {
|
|
585
592
|
await until(async () => (await locate()).count(), (n) => n === 0);
|
|
586
593
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as EnvFactory } from "./adapter-
|
|
1
|
+
import { r as EnvFactory } from "./adapter-C3LQTPFi.mjs";
|
|
2
2
|
import { FrameLocator, Locator, Page } from "playwright";
|
|
3
3
|
//#region src/adapters/playwright.d.ts
|
|
4
4
|
type PlaywrightTarget = Page | Locator | FrameLocator;
|
package/dist/playwright.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as PlaywrightTarget, r as playwrightEnv, t as PlaywrightAdapterOptions } from "./playwright-
|
|
1
|
+
import { n as PlaywrightTarget, r as playwrightEnv, t as PlaywrightAdapterOptions } from "./playwright-D2coDhsT.mjs";
|
|
2
2
|
import { Page } from "playwright";
|
|
3
3
|
//#region src/adapters/chromium-tree.d.ts
|
|
4
4
|
interface AxNode {
|
package/dist/playwright.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { i as axNodeOf, a as chromiumTree, n as playwrightEnv } from "./playwright-
|
|
1
|
+
export { i as axNodeOf, a as chromiumTree, n as playwrightEnv } from "./playwright-BbVj53fU.mjs";
|
package/dist/setup.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as navigationLog, n as installErrorLog, o as installAnnouncementLog } from "./dom-
|
|
1
|
+
import { a as navigationLog, n as installErrorLog, o as installAnnouncementLog } from "./dom-DjurZVd0.mjs";
|
|
2
2
|
//#region src/setup.ts
|
|
3
3
|
function define(target, name, value) {
|
|
4
4
|
if (!target || Reflect.get(target, name) != null) return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rind-ui/testing",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Test drivers and environment setup for rind-ui components (Testing Library and Playwright).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Watermelon Bros",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"dom-accessibility-api": "^0.7.1",
|
|
55
|
-
"@rind-ui/core": "0.
|
|
55
|
+
"@rind-ui/core": "0.4.0"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@internationalized/date": "^3.12.4",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"react": "^19.3.0",
|
|
63
63
|
"react-dom": "^19.3.0",
|
|
64
64
|
"rolldown": "1.2.13",
|
|
65
|
-
"@rind-ui/react": "0.
|
|
65
|
+
"@rind-ui/react": "0.4.0"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
68
|
"@testing-library/dom": ">=10",
|