mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-08 06:28:33 +00:00
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:
@@ -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);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user