Skip to content

Commit 18931ce

Browse files
stabilize test
1 parent cd91cee commit 18931ce

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

‎e2e/react-start/rsc-query/tests/rsc-query-no-loader-css.spec.ts‎

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,7 @@ test.describe('RSC Query Without Loader CSS Tests', () => {
3636
'CSS Modules via Render-Time Suspense Query',
3737
)
3838

39-
const backgroundColor = await container.evaluate(
40-
(el) => getComputedStyle(el).backgroundColor,
41-
)
42-
expect(backgroundColor).toBe('rgb(224, 242, 254)')
39+
await expect(container).toHaveCSS('background-color', 'rgb(224, 242, 254)')
4340
})
4441

4542
test('client-side navigation keeps streamed query CSS intact', async ({
@@ -55,9 +52,6 @@ test.describe('RSC Query Without Loader CSS Tests', () => {
5552
const container = page.getByTestId('rsc-css-modules-content')
5653
await expect(container).toBeVisible()
5754

58-
const backgroundColor = await container.evaluate(
59-
(el) => getComputedStyle(el).backgroundColor,
60-
)
61-
expect(backgroundColor).toBe('rgb(224, 242, 254)')
55+
await expect(container).toHaveCSS('background-color', 'rgb(224, 242, 254)')
6256
})
6357
})

0 commit comments

Comments
 (0)