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

Function verifyColumns

perf/drivers.mjs:253–269  ·  view source on GitHub ↗
({page, size}, expectedWidth)

Source from the content-addressed store, hash-verified

251];
252
253async function verifyColumns({page, size}, expectedWidth) {
254 let widths = await page.locator('.resizable-table th').evaluateAll(columns =>
255 columns.map(column => ({
256 style: parseFloat(column.style.width),
257 actual: column.getBoundingClientRect().width
258 }))
259 );
260 if (
261 widths.length !== 6 ||
262 widths.some(
263 width => width.style !== expectedWidth || Math.abs(width.actual - expectedWidth) > 1
264 )
265 ) {
266 throw new Error('The table columns did not finish resizing to the expected width.');
267 }
268 await page.getByRole('rowheader', {name: `Record ${size - 1}`, exact: true}).waitFor();
269}
270
271const resizedRows = (size, width) => [
272 condition('.resizable-table [data-record]', {count: size}),

Callers 1

drivers.mjsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected