From 79d3e5694f6089ed1df1e81c9ed6051d51487ca5 Mon Sep 17 00:00:00 2001 From: soridalac Date: Thu, 15 Oct 2026 12:10:19 -0700 Subject: [PATCH 1/3] fix: add compile step to test:nuts to fix CI JIT pipeline --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 142747c4..48111ef6 100644 --- a/package.json +++ b/package.json @@ -108,7 +108,7 @@ "prepack": "sf-prepack", "prepare": "sf-install", "test": "wireit", - "test:nuts": "npx playwright install --with-deps && mocha \"**/*.nut.ts\" --slow 30000 --timeout 600000 --parallel=false", + "test:nuts": "yarn compile && npx playwright install --with-deps && mocha \"**/*.nut.ts\" --slow 30000 --timeout 600000 --parallel=false", "test:nuts:local": "npx playwright install --with-deps && node -r dotenv/config ./node_modules/.bin/nyc mocha \"**/*.nut.ts\" --slow 30000 --timeout 600000 --parallel=false", "test:nut:local": "npx playwright install --with-deps && node -r dotenv/config ./node_modules/.bin/nyc mocha --slow 30000 --timeout 600000", "test:only": "wireit", From d899b07158df1afa6f24e78212b9fd183469501f Mon Sep 17 00:00:00 2001 From: soridalac Date: Thu, 15 Oct 2026 13:00:14 -0700 Subject: [PATCH 2/3] fix: wait for HMR restore to fix CI race condition --- test/commands/lightning/dev/component-preview/hmr.nut.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/commands/lightning/dev/component-preview/hmr.nut.ts b/test/commands/lightning/dev/component-preview/hmr.nut.ts index 6fc5450c..b3e5316b 100644 --- a/test/commands/lightning/dev/component-preview/hmr.nut.ts +++ b/test/commands/lightning/dev/component-preview/hmr.nut.ts @@ -69,6 +69,7 @@ describe('lightning preview hot module reload', () => { expect(await updatedGreetingLocator.textContent()).to.equal(HMR_GREETING); await fs.promises.writeFile(componentJsPath, originalJsContent, 'utf8'); + await page.getByText(INITIAL_GREETING).waitFor({ state: 'visible' }); }); it('should re-render component and hot reload .css changes', async () => { @@ -98,6 +99,11 @@ describe('lightning preview hot module reload', () => { } expect(greetingColor).to.equal(RED); await fs.promises.writeFile(componentCssPath, originalCssContent, 'utf8'); + // eslint-disable-next-line no-await-in-loop + while ((await greeting.evaluate((e) => window.getComputedStyle(e).color)) !== BLUE) { + // eslint-disable-next-line no-await-in-loop + await page.waitForTimeout(500); + } }); it('should re-render component and hot reload .html changes', async () => { From 672c146c1d5398a3f7bbb145eb00b2ad231dab2f Mon Sep 17 00:00:00 2001 From: soridalac Date: Thu, 15 Oct 2026 13:28:30 -0700 Subject: [PATCH 3/3] fix: use page.reload() --- test/commands/lightning/dev/component-preview/hmr.nut.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/test/commands/lightning/dev/component-preview/hmr.nut.ts b/test/commands/lightning/dev/component-preview/hmr.nut.ts index b3e5316b..81cdccc9 100644 --- a/test/commands/lightning/dev/component-preview/hmr.nut.ts +++ b/test/commands/lightning/dev/component-preview/hmr.nut.ts @@ -69,6 +69,8 @@ describe('lightning preview hot module reload', () => { expect(await updatedGreetingLocator.textContent()).to.equal(HMR_GREETING); await fs.promises.writeFile(componentJsPath, originalJsContent, 'utf8'); + await page.waitForTimeout(3000); + await page.reload({ waitUntil: 'networkidle' }); await page.getByText(INITIAL_GREETING).waitFor({ state: 'visible' }); }); @@ -99,11 +101,8 @@ describe('lightning preview hot module reload', () => { } expect(greetingColor).to.equal(RED); await fs.promises.writeFile(componentCssPath, originalCssContent, 'utf8'); - // eslint-disable-next-line no-await-in-loop - while ((await greeting.evaluate((e) => window.getComputedStyle(e).color)) !== BLUE) { - // eslint-disable-next-line no-await-in-loop - await page.waitForTimeout(500); - } + await page.reload(); + await page.getByText(INITIAL_GREETING).waitFor({ state: 'visible' }); }); it('should re-render component and hot reload .html changes', async () => {