feat(snapshot): implement active workspace tab type tracking (#8487)

* feat(snapshot): implement active workspace tab type tracking and restoration

* feat(snapshot): introduce workspace tab types and update related logic
This commit is contained in:
Sid
2026-07-07 00:09:38 +05:30
committed by GitHub
parent 4ddf65c0c1
commit cbed13a346
6 changed files with 109 additions and 4 deletions

View File

@@ -55,4 +55,32 @@ test.describe('Snapshot: Global Tab Restoration', () => {
await closeElectronApp(app2);
});
});
test('workspace-level active tab is restored after restart', async ({ launchElectronApp, createTmpDir }) => {
const userDataPath = await createTmpDir('snap-workspace-active-tab');
const app = await launchElectronApp({ userDataPath });
const page = await waitForReadyPage(app);
await test.step('Switch to workspace environments tab', async () => {
const locators = buildCommonLocators(page);
await locators.tabs.requestTab('Environments').click();
await expect(locators.tabs.activeRequestTab()).toContainText('Environments');
});
await test.step('Close and restart app', async () => {
await page.waitForTimeout(2000);
await closeElectronApp(app);
});
await test.step('Verify workspace environments is restored as active tab', async () => {
const app2 = await launchElectronApp({ userDataPath });
const page2 = await waitForReadyPage(app2);
const locators2 = buildCommonLocators(page2);
await expect(locators2.tabs.activeRequestTab()).toContainText('Environments', { timeout: 15000 });
await closeElectronApp(app2);
});
});
});