7489-testToMaster #408

Merged
alexm merged 292 commits from 7489-testToMaster into master 2024-05-28 05:33:17 +00:00
2 changed files with 14 additions and 5 deletions
Showing only changes of commit 3ae523ef04 - Show all commits

View File

@ -56,11 +56,20 @@ async function fetch() {
}
const showRedirectToSummaryIcon = computed(() => {
const routeExists = route.matched.some(
(route) => route.name === `${route.meta.moduleName}Summary`
);
return !isSummary.value && route.meta.moduleName && routeExists;
const exist = existSummary(route.matched);
return !isSummary.value && route.meta.moduleName && exist;
});
function existSummary(routes) {
const hasSummary = routes.some((r) => r.name === `${route.meta.moduleName}Summary`);
if (hasSummary) return hasSummary;
for (const current of routes) {
if (current.path != '/' && current.children) {
const exist = existSummary(current.children);
if (exist) return exist;
}
}
}
</script>
<template>

View File

@ -20,6 +20,6 @@ describe('WorkerList', () => {
.eq(0)
.invoke('text')
.should('include', 'Basic data');
cy.get('.summary .header-link').eq(1).should('have.text', 'User data ');
cy.get('.summary .header-link').eq(2).should('have.text', 'User data ');
});
});