Skip to content

Commit f7dcd18

Browse files
test: update based on changes.
1 parent 8dd9456 commit f7dcd18

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

playwright/github-pr-drawer/active-context-switch.spec.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1719,10 +1719,13 @@ test('Active PR context push with no local changes shows neutral status', async
17191719
const tabs = Array.isArray(workspaceRecord?.tabs)
17201720
? (workspaceRecord.tabs as Array<Record<string, unknown>>)
17211721
: []
1722-
const tabIds = new Set(
1723-
tabs.map(tab => (typeof tab?.id === 'string' ? tab.id : '')).filter(Boolean),
1724-
)
1725-
const hasPrimaryTabs = tabIds.has('component') && tabIds.has('styles')
1722+
const hasEntryTab = tabs.some(tab => tab?.role === 'entry')
1723+
const hasStyleTab = tabs.some(tab => {
1724+
const language =
1725+
typeof tab?.language === 'string' ? tab.language.trim().toLowerCase() : ''
1726+
return language === 'css' || language === 'less' || language === 'sass'
1727+
})
1728+
const hasPrimaryTabs = hasEntryTab && hasStyleTab
17261729
return hasPrimaryTabs && tabs.every(tab => tab?.isDirty === false)
17271730
})
17281731
.toBe(true)

0 commit comments

Comments
 (0)