forked from verdnatura/salix-front
Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 6825-vnTable
This commit is contained in:
commit
a4db4bd2a5
|
@ -56,11 +56,20 @@ async function fetch() {
|
||||||
}
|
}
|
||||||
|
|
||||||
const showRedirectToSummaryIcon = computed(() => {
|
const showRedirectToSummaryIcon = computed(() => {
|
||||||
const routeExists = route.matched.some(
|
const exist = existSummary(route.matched);
|
||||||
(route) => route.name === `${route.meta.moduleName}Summary`
|
return !isSummary.value && route.meta.moduleName && exist;
|
||||||
);
|
|
||||||
return !isSummary.value && route.meta.moduleName && routeExists;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
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>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
@ -39,7 +39,7 @@ describe('VnLocation', () => {
|
||||||
});
|
});
|
||||||
it('Create postCode', function () {
|
it('Create postCode', function () {
|
||||||
cy.get(
|
cy.get(
|
||||||
':nth-child(6) > .q-field > .q-field__inner > .q-field__control > :nth-child(3) > .q-icon'
|
':nth-child(6) > .q-field > .q-field__inner > .q-field__control > :nth-child(2) > .q-icon'
|
||||||
).click();
|
).click();
|
||||||
cy.get('.q-card > h1').should('have.text', 'New postcode');
|
cy.get('.q-card > h1').should('have.text', 'New postcode');
|
||||||
cy.get(dialogInputs).eq(0).clear('12');
|
cy.get(dialogInputs).eq(0).clear('12');
|
||||||
|
|
|
@ -21,8 +21,7 @@ describe('ClaimPhoto', () => {
|
||||||
cy.get('.q-notification__message').should('have.text', 'Data saved');
|
cy.get('.q-notification__message').should('have.text', 'Data saved');
|
||||||
});
|
});
|
||||||
|
|
||||||
/* it.skip('should open first image dialog change to second and close', () => {
|
it('should open first image dialog change to second and close', () => {
|
||||||
skiped fix on https://redmine.verdnatura.es/issues/7113
|
|
||||||
cy.get(
|
cy.get(
|
||||||
':nth-child(1) > .q-card > .q-img > .q-img__container > .q-img__image'
|
':nth-child(1) > .q-card > .q-img > .q-img__container > .q-img__image'
|
||||||
).click();
|
).click();
|
||||||
|
@ -38,19 +37,23 @@ describe('ClaimPhoto', () => {
|
||||||
cy.get('.q-carousel__slide > .q-img > .q-img__container > .q-img__image').should(
|
cy.get('.q-carousel__slide > .q-img > .q-img__container > .q-img__image').should(
|
||||||
'not.be.visible'
|
'not.be.visible'
|
||||||
);
|
);
|
||||||
}); */
|
});
|
||||||
|
|
||||||
it('should remove third and fourth file', () => {
|
it('should remove third and fourth file', () => {
|
||||||
cy.get(
|
cy.get(
|
||||||
'.multimediaParent > :nth-child(3) > .q-btn > .q-btn__content > .q-icon'
|
'.multimediaParent > :nth-child(3) > .q-btn > .q-btn__content > .q-icon'
|
||||||
).click();
|
).click();
|
||||||
cy.get('.q-btn--unelevated > .q-btn__content > .block').click();
|
cy.get(
|
||||||
|
'.q-card__actions > .q-btn--unelevated > .q-btn__content > .block'
|
||||||
|
).click();
|
||||||
cy.get('.q-notification__message').should('have.text', 'Data deleted');
|
cy.get('.q-notification__message').should('have.text', 'Data deleted');
|
||||||
|
|
||||||
cy.get(
|
cy.get(
|
||||||
'.multimediaParent > :nth-child(3) > .q-btn > .q-btn__content > .q-icon'
|
'.multimediaParent > :nth-child(3) > .q-btn > .q-btn__content > .q-icon'
|
||||||
).click();
|
).click();
|
||||||
cy.get('.q-btn--unelevated > .q-btn__content > .block').click();
|
cy.get(
|
||||||
|
'.q-card__actions > .q-btn--unelevated > .q-btn__content > .block'
|
||||||
|
).click();
|
||||||
cy.get('.q-notification__message').should('have.text', 'Data deleted');
|
cy.get('.q-notification__message').should('have.text', 'Data deleted');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -20,6 +20,6 @@ describe('WorkerList', () => {
|
||||||
.eq(0)
|
.eq(0)
|
||||||
.invoke('text')
|
.invoke('text')
|
||||||
.should('include', 'Basic data');
|
.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 ');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue