feat: sitemap validattion
This commit is contained in:
@@ -40,11 +40,15 @@ describe('Help menu documentation entry', () => {
|
||||
expect(viewGroup?.items.some((item) => item.action === 'toggleFullScreen')).toBe(true);
|
||||
});
|
||||
|
||||
it('assigns Command/Ctrl+R shortcut for generateSitemap menu item', () => {
|
||||
it('includes Validate Site action in Blog menu with a V shortcut', () => {
|
||||
const blogGroup = APP_MENU_GROUPS.find((group) => group.label === 'Blog');
|
||||
const generateSiteItem = blogGroup?.items.find((item) => item.action === 'generateSitemap');
|
||||
const validateSiteItem = blogGroup?.items.find((item) => item.action === 'validateSite');
|
||||
|
||||
expect(generateSiteItem).toBeDefined();
|
||||
expect(generateSiteItem?.accelerator).toBe('CmdOrCtrl+R');
|
||||
expect(validateSiteItem).toBeDefined();
|
||||
expect(validateSiteItem?.accelerator).toContain('V');
|
||||
});
|
||||
|
||||
it('maps Validate Site to a renderer menu event', () => {
|
||||
expect(APP_MENU_ACTION_EVENT_MAP.validateSite).toBe('menu:validateSite');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -47,4 +47,23 @@ describe('tabPersistence', () => {
|
||||
|
||||
expect(() => saveTabsForProject(projectId, sampleTabState)).not.toThrow();
|
||||
});
|
||||
|
||||
it('does not persist transient tabs', () => {
|
||||
const tabStateWithTransient = {
|
||||
tabs: [
|
||||
{ id: 'documentation', type: 'documentation', isTransient: false },
|
||||
{ id: 'site-validation-report', type: 'site-validation', isTransient: true },
|
||||
],
|
||||
activeTabId: 'site-validation-report',
|
||||
} as unknown as TabState;
|
||||
|
||||
saveTabsForProject(projectId, tabStateWithTransient);
|
||||
|
||||
const loaded = loadTabsForProject(projectId);
|
||||
|
||||
expect(loaded?.tabs).toEqual([
|
||||
{ id: 'documentation', type: 'documentation', isTransient: false },
|
||||
]);
|
||||
expect(loaded?.activeTabId).toBe('documentation');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user