Skip to content

Commit 3308a21

Browse files
test(client): follow themed table status color
1 parent 40b1f64 commit 3308a21

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

tests/browser/frontend-baseline.spec.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,16 @@ test('DataSource table preserves virtual scrolling, styling and text-pattern int
190190
await expect.poll(() => dataHeaders.locator('.checkbox-container').count()).toBe(0);
191191
await expect.poll(() => rows.first().evaluate((row) => row.getBoundingClientRect().height)).toBe(38);
192192

193+
const negativeSubtleColor = await page.evaluate(() => {
194+
const probe = document.createElement('div');
195+
probe.style.backgroundColor = 'var(--negative-subtle)';
196+
document.body.appendChild(probe);
197+
const color = getComputedStyle(probe).backgroundColor;
198+
probe.remove();
199+
return color;
200+
});
193201
const rowColors = await rows.evaluateAll((elements) => elements.map((row) => getComputedStyle(row).backgroundColor));
194-
expect(rowColors).toContain('rgb(255, 242, 232)');
202+
expect(rowColors).toContain(negativeSubtleColor);
195203
expect(rowColors).toContain('rgba(0, 0, 0, 0)');
196204

197205
const initialHeader = await table.locator(':scope > thead').innerText();

0 commit comments

Comments
 (0)