fix: unify horizontal portal menus and remove discovery duplicates
tests / ci (push) Canceled after 0s
tests / ci (push) Canceled after 0s
This commit is contained in:
@@ -97,12 +97,9 @@ void test('reconciled navigation selects discovery, realization and private supp
|
||||
const groups = portalNavigation({ authenticated: false, manager: false });
|
||||
assert.equal(
|
||||
currentNavigationGroup(groups, '/oportunidades/fixture'),
|
||||
'discovery',
|
||||
);
|
||||
assert.equal(
|
||||
currentNavigationGroup(groups, '/simulador-fiscal'),
|
||||
'discovery',
|
||||
null,
|
||||
);
|
||||
assert.equal(currentNavigationGroup(groups, '/simulador-fiscal'), null);
|
||||
assert.equal(
|
||||
currentNavigationGroup(groups, '/balcao-virtual/dossiers/fixture'),
|
||||
'support',
|
||||
@@ -110,7 +107,7 @@ void test('reconciled navigation selects discovery, realization and private supp
|
||||
assert.equal(currentNavigationGroup(groups, '/management/crm/leads'), null);
|
||||
});
|
||||
|
||||
void test('discovery keeps four entry points and catalogue destinations without duplicates', () => {
|
||||
void test('discovery retains distinct catalogues without repeating main entry points', () => {
|
||||
const groups = portalNavigation({
|
||||
authenticated: false,
|
||||
manager: false,
|
||||
@@ -125,10 +122,16 @@ void test('discovery keeps four entry points and catalogue destinations without
|
||||
});
|
||||
collect(groups);
|
||||
assert.equal(new Set(links).size, links.length);
|
||||
const discovery = groups.find((group) => group.id === 'discovery');
|
||||
const retained = JSON.stringify(discovery);
|
||||
for (const id of ['why', 'opportunities', 'simulator', 'sectors', 'start'])
|
||||
assert.equal(
|
||||
discovery.children.some((item) => item.id === id),
|
||||
false,
|
||||
);
|
||||
assert.equal(retained.includes('/investimentos/iniciar'), false);
|
||||
for (const href of [
|
||||
'/investimentos/iniciar',
|
||||
'/oportunidades',
|
||||
'/sectores',
|
||||
'/oportunidades?view=map',
|
||||
'/carteira',
|
||||
'/zonas',
|
||||
|
||||
Reference in New Issue
Block a user