feat(shell): domain menu in the header, as in the deployed dev version
How: on /indicadores/<domain> routes the App header shows the platform title and a mat-menu button named after the current domain, listing the other two (the same markup and styles as the deployed WebApp's app.html). Other routes (Conectar, Gobernanza) keep the "Análisis de información" breadcrumb. The indicators page drops its own TEA/CaCu/CaMa links, so there is one switcher. Implications: domain switching now depends on the App shell; a page embedded elsewhere has no way to change domain by itself. Specs that asserted the in-page links now assert their absence, and app.spec covers the menu.
This commit is contained in:
@@ -42,10 +42,8 @@ describe('Secciones compartidas por dominio', () => {
|
||||
expect(tabs.map(t => t.getAttribute('aria-selected'))).toEqual(tabs.map((_, i) => String(i === 0)));
|
||||
const tab = (id: string) => tabs.find(t => t.id === 'tab-' + id)!;
|
||||
expect(root.querySelector('[role="tablist"]')?.getAttribute('aria-label')).toContain(page.domainLabels[domain]);
|
||||
// Upstream moved domain selection to its own App shell; ours keeps it on
|
||||
// the page itself (see indicadores-page.html), since our shell is shared
|
||||
// with other workspace sections.
|
||||
expect(root.querySelector('nav.domain-nav')).not.toBeNull();
|
||||
// The App header switches domains (see app.html); the page has no switcher of its own.
|
||||
expect(root.querySelector('nav.domain-nav')).toBeNull();
|
||||
for (const tab of tabs) {
|
||||
const panel = root.querySelector<HTMLElement>('#' + tab.getAttribute('aria-controls'))!;
|
||||
expect(panel.getAttribute('aria-labelledby')).toBe(tab.id);
|
||||
|
||||
Reference in New Issue
Block a user