Restore prominent Concursos dropdown before authorized APIEX and SWOT delivery
tests / ci (push) Canceled after 0s
tests / ci (push) Canceled after 0s
This commit is contained in:
@@ -404,3 +404,47 @@ void test('funding links require installation and saved list requires authentica
|
||||
true,
|
||||
);
|
||||
});
|
||||
|
||||
void test('installed concours has its own primary group and preserves public and private destinations', () => {
|
||||
const base = { authenticated: false, manager: false };
|
||||
assert.equal(
|
||||
portalNavigation(base).some((g) => g.id === 'procurement-area'),
|
||||
false,
|
||||
);
|
||||
for (const authenticated of [false, true]) {
|
||||
const groups = portalNavigation({
|
||||
...base,
|
||||
authenticated,
|
||||
procurement: true,
|
||||
});
|
||||
const group = groups.find((g) => g.id === 'procurement-area');
|
||||
assert.equal(group.label, 'Concursos e anúncios');
|
||||
assert.equal(
|
||||
destinations(groups).filter((h) => h === '/concursos').length,
|
||||
1,
|
||||
);
|
||||
assert.equal(
|
||||
JSON.stringify(groups.find((g) => g.id === 'discovery')).includes(
|
||||
'/concursos',
|
||||
),
|
||||
false,
|
||||
);
|
||||
assert.equal(
|
||||
currentNavigationGroup(groups, '/concursos?q=obras'),
|
||||
'procurement-area',
|
||||
);
|
||||
assert.equal(
|
||||
currentNavigationGroup(groups, '/concursos/fixture'),
|
||||
'procurement-area',
|
||||
);
|
||||
assert.equal(
|
||||
destinations(group.children).includes('/concursos/acompanhar'),
|
||||
authenticated,
|
||||
);
|
||||
if (authenticated)
|
||||
assert.equal(
|
||||
currentNavigationItem(groups, '/concursos/acompanhar'),
|
||||
'procurement-watched',
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user