From 3e116eba3811a43cf9abc26144f463374d0035e4 Mon Sep 17 00:00:00 2001 From: patak-dev Date: Fri, 10 Jun 2022 18:43:15 +0200 Subject: [PATCH 1/2] test: fix style link after HMR --- .../backend-integration/__tests__/backend-integration.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playground/backend-integration/__tests__/backend-integration.spec.ts b/playground/backend-integration/__tests__/backend-integration.spec.ts index e8059c7d20f13c..40bec9b582d54b 100644 --- a/playground/backend-integration/__tests__/backend-integration.spec.ts +++ b/playground/backend-integration/__tests__/backend-integration.spec.ts @@ -52,7 +52,7 @@ describe.runIf(isServe)('serve', () => { await untilUpdated(() => getColor('body'), 'red') // successful HMR // Verify that the base (/dev/) was added during the css-update - const link = await page.$('link[rel="stylesheet"]') + const link = (await page.$$('link[rel="stylesheet"]')).at(-1) expect(await link.getAttribute('href')).toContain('/dev/global.css?t=') }) From 445601cc9495e9448bf1fa6912b643335d3ec445 Mon Sep 17 00:00:00 2001 From: patak-dev Date: Fri, 10 Jun 2022 21:30:07 +0200 Subject: [PATCH 2/2] chore: update --- .../backend-integration/__tests__/backend-integration.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playground/backend-integration/__tests__/backend-integration.spec.ts b/playground/backend-integration/__tests__/backend-integration.spec.ts index 40bec9b582d54b..314ccfb0582680 100644 --- a/playground/backend-integration/__tests__/backend-integration.spec.ts +++ b/playground/backend-integration/__tests__/backend-integration.spec.ts @@ -52,7 +52,7 @@ describe.runIf(isServe)('serve', () => { await untilUpdated(() => getColor('body'), 'red') // successful HMR // Verify that the base (/dev/) was added during the css-update - const link = (await page.$$('link[rel="stylesheet"]')).at(-1) + const link = await page.$('link[rel="stylesheet"]:last-of-type') expect(await link.getAttribute('href')).toContain('/dev/global.css?t=') })