Skip to content

Commit 7ecdf8c

Browse files
refactor: pr comments, webkit spec failures.
1 parent 4c0da02 commit 7ecdf8c

3 files changed

Lines changed: 10 additions & 5 deletions

File tree

playwright/helpers/app-test-helpers.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ export const waitForAppReady = async (page: Page, path = appEntryPath) => {
8383
return (
8484
statusText === 'Rendered' ||
8585
statusText?.startsWith('Rendered (Type errors:') ||
86-
statusText === 'Error'
86+
statusText === 'Error' ||
87+
statusText === 'Could not restore local workspace context.'
8788
)
8889
})
8990
.toBe(true)

playwright/rendering-modes/core.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,9 @@ test('missing component identifiers in App render as runtime errors', async ({
614614

615615
await expect(page.getByRole('status', { name: 'App status' })).toHaveText('Error')
616616
await expect(page.locator('#preview-host pre')).toContainText('[runtime]')
617-
await expect(page.locator('#preview-host pre')).toContainText('List is not defined')
617+
await expect(page.locator('#preview-host pre')).toContainText(
618+
/List is not defined|Can't find variable:\s*List/,
619+
)
618620
})
619621

620622
test('preview iframe sandbox isolates parent origin access', async ({ page }) => {

src/modules/app-core/app-bindings-startup.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -496,9 +496,11 @@ const bindAppEventsAndStart = ({
496496
syncDiagnosticsDrawerLayout()
497497
}
498498

499-
const stylesTab = getPrimaryStyleWorkspaceTab()
500-
if (stylesTab && typeof stylesTab.content === 'string') {
501-
setCssSource(stylesTab.content)
499+
if (!isStyleWorkspaceTab(activeTab)) {
500+
const stylesTab = getPrimaryStyleWorkspaceTab()
501+
if (stylesTab && typeof stylesTab.content === 'string') {
502+
setCssSource(stylesTab.content)
503+
}
502504
}
503505

504506
setHasCompletedInitialWorkspaceBootstrap(true)

0 commit comments

Comments
 (0)