@tristan2828/ui-foundation 4.68.0 → 4.68.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/dist/testing/index.d.ts +7 -0
- package/dist/testing/index.js +8 -1
- package/package.json +1 -1
package/dist/testing/index.d.ts
CHANGED
|
@@ -98,6 +98,13 @@ export type A11ySuiteOptions = {
|
|
|
98
98
|
* locator that matches each of them: Playwright's strict mode refuses
|
|
99
99
|
* `expect(page.locator('[data-state="success"]')).toBeVisible()` as soon
|
|
100
100
|
* as two match. Use it before reading or scanning a screen.
|
|
101
|
+
*
|
|
102
|
+
* It waits on the first *visible* data view. A responsive component can
|
|
103
|
+
* render two elements that both carry `data-state` and show one of them by
|
|
104
|
+
* viewport: a `ModuleStrip mobile="row"` puts each `ModuleCard` (hidden on a
|
|
105
|
+
* phone) beside its chip (hidden from `md` up). The card comes first in the
|
|
106
|
+
* document, so on a phone `.first()` alone is the hidden one and the wait
|
|
107
|
+
* never ended.
|
|
101
108
|
*/
|
|
102
109
|
export declare function expectDataViewsLoaded(page: Page, { success }?: {
|
|
103
110
|
success?: boolean;
|
package/dist/testing/index.js
CHANGED
|
@@ -213,10 +213,17 @@ const NAV_PAGE_BUDGET_MS = 10_000;
|
|
|
213
213
|
* locator that matches each of them: Playwright's strict mode refuses
|
|
214
214
|
* `expect(page.locator('[data-state="success"]')).toBeVisible()` as soon
|
|
215
215
|
* as two match. Use it before reading or scanning a screen.
|
|
216
|
+
*
|
|
217
|
+
* It waits on the first *visible* data view. A responsive component can
|
|
218
|
+
* render two elements that both carry `data-state` and show one of them by
|
|
219
|
+
* viewport: a `ModuleStrip mobile="row"` puts each `ModuleCard` (hidden on a
|
|
220
|
+
* phone) beside its chip (hidden from `md` up). The card comes first in the
|
|
221
|
+
* document, so on a phone `.first()` alone is the hidden one and the wait
|
|
222
|
+
* never ended.
|
|
216
223
|
*/
|
|
217
224
|
export async function expectDataViewsLoaded(page, { success = true } = {}) {
|
|
218
225
|
if (success)
|
|
219
|
-
await expect(page.locator('[data-state="success"]').first()).toBeVisible();
|
|
226
|
+
await expect(page.locator('[data-state="success"]').filter({ visible: true }).first()).toBeVisible();
|
|
220
227
|
// A data view renders its skeleton from its first paint, so once the
|
|
221
228
|
// screen is up every one of them is either loading or settled.
|
|
222
229
|
else
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tristan2828/ui-foundation",
|
|
3
|
-
"version": "4.68.
|
|
3
|
+
"version": "4.68.1",
|
|
4
4
|
"description": "Shared UI foundation for contract-first, database-backed React apps: shadcn primitives, DataTable/EntityForm composites, auth, the gateway error seam, design tokens, lint rules and the AI playbook.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|