MCPcopy Create free account
hub / github.com/adobe/react-spectrum / visibleRows

Function visibleRows

perf/drivers.mjs:45–53  ·  view source on GitHub ↗
(page, selector)

Source from the content-addressed store, hash-verified

43 condition(selector, {orderedValues: {attribute: 'data-record', values}});
44
45async function visibleRows(page, selector) {
46 return page.locator(`${selector} [data-record]`).evaluateAll(nodes =>
47 nodes.map(node => ({
48 id: node.getAttribute('data-record'),
49 label: node.querySelector('[slot="label"]')?.textContent,
50 level: node.getAttribute('aria-level')
51 }))
52 );
53}
54
55function invalidRows() {
56 throw new Error('Visible collection records have incorrect labels or hierarchy levels.');

Callers 1

drivers.mjsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected