refactor: refs #8606 merged previous and e2e changes and corrected minor errors
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
parent
d679436171
commit
6ffb62497b
|
@ -171,9 +171,10 @@ onMounted(() => {
|
||||||
openConfirmationModal(
|
openConfirmationModal(
|
||||||
t('eventsPanel.deleteTitle'),
|
t('eventsPanel.deleteTitle'),
|
||||||
t('eventsPanel.deleteSubtitle'),
|
t('eventsPanel.deleteSubtitle'),
|
||||||
() => deleteEvent()
|
() => deleteEvent(),
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
|
data-cy="ZoneEventExclusionDeleteBtn"
|
||||||
/>
|
/>
|
||||||
<QBtn
|
<QBtn
|
||||||
:label="isNew ? t('globals.add') : t('globals.save')"
|
:label="isNew ? t('globals.add') : t('globals.save')"
|
||||||
|
|
|
@ -159,12 +159,10 @@ onMounted(() => {
|
||||||
<VnInputDate
|
<VnInputDate
|
||||||
:label="t('eventsInclusionForm.from')"
|
:label="t('eventsInclusionForm.from')"
|
||||||
v-model="eventInclusionFormData.started"
|
v-model="eventInclusionFormData.started"
|
||||||
data-cy="ZoneEventsFromDate"
|
|
||||||
/>
|
/>
|
||||||
<VnInputDate
|
<VnInputDate
|
||||||
:label="t('eventsInclusionForm.to')"
|
:label="t('eventsInclusionForm.to')"
|
||||||
v-model="eventInclusionFormData.ended"
|
v-model="eventInclusionFormData.ended"
|
||||||
data-cy="ZoneEventsToDate"
|
|
||||||
/>
|
/>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow>
|
<VnRow>
|
||||||
|
|
|
@ -67,7 +67,7 @@ watch(
|
||||||
async () => {
|
async () => {
|
||||||
await fetchData();
|
await fetchData();
|
||||||
},
|
},
|
||||||
{ immediate: true, deep: true }
|
{ immediate: true, deep: true },
|
||||||
);
|
);
|
||||||
|
|
||||||
const formatWdays = (event) => {
|
const formatWdays = (event) => {
|
||||||
|
@ -178,9 +178,10 @@ onMounted(async () => {
|
||||||
openConfirmationModal(
|
openConfirmationModal(
|
||||||
t('zone.deleteTitle'),
|
t('zone.deleteTitle'),
|
||||||
t('zone.deleteSubtitle'),
|
t('zone.deleteSubtitle'),
|
||||||
() => deleteEvent(event.id)
|
() => deleteEvent(event.id),
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
|
data-cy="ZoneEventsPanelDeleteBtn"
|
||||||
>
|
>
|
||||||
<QTooltip>{{ t('eventsPanel.delete') }}</QTooltip>
|
<QTooltip>{{ t('eventsPanel.delete') }}</QTooltip>
|
||||||
</QBtn>
|
</QBtn>
|
||||||
|
|
|
@ -161,7 +161,8 @@ onUnmounted(() => {
|
||||||
:url="url"
|
:url="url"
|
||||||
:redirect="false"
|
:redirect="false"
|
||||||
:search-remove-params="false"
|
:search-remove-params="false"
|
||||||
:label="$t('Search locations')"
|
:label="$t('zone.searchLocations')"
|
||||||
|
:info="$t('zone.searchLocationsInfo')"
|
||||||
/>
|
/>
|
||||||
</Teleport>
|
</Teleport>
|
||||||
<VnInput
|
<VnInput
|
||||||
|
|
|
@ -278,6 +278,23 @@ const exprBuilder = (param, value) => {
|
||||||
</VnSection>
|
</VnSection>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.table-container {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.column {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
min-width: 70%;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.shrink-column) {
|
||||||
|
width: 8%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
<i18n>
|
<i18n>
|
||||||
es:
|
es:
|
||||||
Search zone: Buscar zona
|
Search zone: Buscar zona
|
||||||
|
|
|
@ -30,7 +30,7 @@ const columns = computed(() => [
|
||||||
label: t('list.id'),
|
label: t('list.id'),
|
||||||
name: 'id',
|
name: 'id',
|
||||||
field: 'zoneFk',
|
field: 'zoneFk',
|
||||||
align: 'left',
|
align: 'center',
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,8 @@ zone:
|
||||||
travelingDays: Traveling days
|
travelingDays: Traveling days
|
||||||
search: Search zone
|
search: Search zone
|
||||||
searchInfo: Search zone by id or name
|
searchInfo: Search zone by id or name
|
||||||
|
searchLocations: Search locations
|
||||||
|
searchLocationsInfo: Search locations by post code
|
||||||
list:
|
list:
|
||||||
clone: Clone
|
clone: Clone
|
||||||
id: Id
|
id: Id
|
||||||
|
|
|
@ -17,6 +17,8 @@ zone:
|
||||||
travelingDays: Días de viaje
|
travelingDays: Días de viaje
|
||||||
search: Buscar zona
|
search: Buscar zona
|
||||||
searchInfo: Buscar zona por Id o nombre
|
searchInfo: Buscar zona por Id o nombre
|
||||||
|
searchLocations: Buscar localización
|
||||||
|
searchLocationsInfo: Buscar localización por código postal
|
||||||
list:
|
list:
|
||||||
clone: Clonar
|
clone: Clonar
|
||||||
id: Id
|
id: Id
|
||||||
|
|
|
@ -1,20 +1,18 @@
|
||||||
describe('ZoneCalendar', () => {
|
describe('ZoneCalendar', () => {
|
||||||
const addEventBtn = '.q-page-sticky > div > .q-btn';
|
const addEventBtn = '.q-page-sticky > div > .q-btn';
|
||||||
const submitBtn = '.q-mt-lg > .q-btn--standard';
|
const submitBtn = '.q-mt-lg > .q-btn--standard';
|
||||||
const deleteBtn = '.q-item__section--side > .q-btn';
|
const deleteBtn = '[data-cy="ZoneEventsPanelDeleteBtn"]';
|
||||||
const from = '.q-field__control-container > [data-cy="ZoneEventsFromDate"]';
|
|
||||||
const to = '.q-field__control-container > [data-cy="ZoneEventsToDate"]';
|
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
cy.viewport(1920, 1080);
|
cy.viewport(1920, 1080);
|
||||||
cy.visit(`/#/zone/11/events`);
|
cy.visit(`/#/zone/13/events`);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should include a one day event, then delete it', () => {
|
it('should include a one day event, then delete it', () => {
|
||||||
cy.get(addEventBtn).click();
|
cy.get(addEventBtn).click();
|
||||||
cy.dataCy('ZoneEventInclusionDayRadio').click();
|
cy.dataCy('ZoneEventInclusionDayRadio').click();
|
||||||
cy.get('.q-card > :nth-child(5)').type('02/04/2001');
|
cy.get('.q-card > :nth-child(5)').type('01/01/2001');
|
||||||
cy.get(submitBtn).click();
|
cy.get(submitBtn).click();
|
||||||
cy.get(deleteBtn).click();
|
cy.get(deleteBtn).click();
|
||||||
cy.dataCy('VnConfirm_confirm').click();
|
cy.dataCy('VnConfirm_confirm').click();
|
||||||
|
@ -47,7 +45,7 @@ describe('ZoneCalendar', () => {
|
||||||
cy.get(
|
cy.get(
|
||||||
'.q-current-day > .q-calendar-month__day--content > [data-cy="ZoneCalendarDay"]',
|
'.q-current-day > .q-calendar-month__day--content > [data-cy="ZoneCalendarDay"]',
|
||||||
).click();
|
).click();
|
||||||
cy.get('.q-mt-lg > :nth-child(2)').click();
|
cy.dataCy('ZoneEventExclusionDeleteBtn').click();
|
||||||
cy.dataCy('VnConfirm_confirm').click();
|
cy.dataCy('VnConfirm_confirm').click();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
describe.skip('ZoneCreate', () => {
|
describe('ZoneCreate', () => {
|
||||||
const data = {
|
const data = {
|
||||||
Name: { val: 'Zone pickup D' },
|
Name: { val: 'Zone pickup D' },
|
||||||
Price: { val: '3' },
|
Price: { val: '3' },
|
||||||
|
|
|
@ -29,7 +29,5 @@ describe('ZoneList', () => {
|
||||||
cy.dataCy('VnConfirm_confirm').click();
|
cy.dataCy('VnConfirm_confirm').click();
|
||||||
cy.url().should('not.include', 'zone/2/');
|
cy.url().should('not.include', 'zone/2/');
|
||||||
cy.url().should('match', /zone\/\d+\/basic-data/);
|
cy.url().should('match', /zone\/\d+\/basic-data/);
|
||||||
cy.get('.list-box > :nth-child(1)').should('include.text', agency);
|
|
||||||
cy.get('.title > span').should('include.text', 'Zone pickup B');
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -3,7 +3,8 @@ describe('ZoneLocations', () => {
|
||||||
Warehouse: { val: 'Warehouse One', type: 'select' },
|
Warehouse: { val: 'Warehouse One', type: 'select' },
|
||||||
};
|
};
|
||||||
|
|
||||||
const postalCode = '[style=""] > :nth-child(1) > :nth-child(1) > :nth-child(2) > :nth-child(1) > :nth-child(1) > :nth-child(2) > :nth-child(1) > .q-tree__node--parent > .q-tree__node-collapsible > .q-tree__children'
|
const postalCode =
|
||||||
|
'[style=""] > :nth-child(1) > :nth-child(1) > :nth-child(2) > :nth-child(1) > :nth-child(1) > :nth-child(2) > :nth-child(1) > .q-tree__node--parent > .q-tree__node-collapsible > .q-tree__children';
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.viewport(1280, 720);
|
cy.viewport(1280, 720);
|
||||||
|
@ -12,12 +13,14 @@ describe('ZoneLocations', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should show all locations on entry', () => {
|
it('should show all locations on entry', () => {
|
||||||
cy.get('.q-tree > :nth-child(1) > :nth-child(2) > :nth-child(1)').children().should('have.length', 9);
|
cy.get('.q-tree > :nth-child(1) > :nth-child(2) > :nth-child(1)')
|
||||||
|
.children()
|
||||||
|
.should('have.length', 9);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should be able to search by postal code', () => {
|
it('should be able to search by postal code', () => {
|
||||||
cy.get('#searchbarForm').type('46680');
|
cy.get('#searchbarForm').type('46680');
|
||||||
cy.get('.router-link-active > .q-icon').click();
|
cy.get('.router-link-active > .q-icon').click();
|
||||||
cy.get(postalCode).should('include.text', '46680')
|
cy.get(postalCode).should('include.text', '46680');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
describe.skip('ZoneWarehouse', () => {
|
describe('ZoneWarehouse', () => {
|
||||||
const data = {
|
const data = {
|
||||||
Warehouse: { val: 'Warehouse Two', type: 'select' },
|
Warehouse: { val: 'Warehouse Two', type: 'select' },
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue