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(
|
||||
t('eventsPanel.deleteTitle'),
|
||||
t('eventsPanel.deleteSubtitle'),
|
||||
() => deleteEvent()
|
||||
() => deleteEvent(),
|
||||
)
|
||||
"
|
||||
data-cy="ZoneEventExclusionDeleteBtn"
|
||||
/>
|
||||
<QBtn
|
||||
:label="isNew ? t('globals.add') : t('globals.save')"
|
||||
|
|
|
@ -159,12 +159,10 @@ onMounted(() => {
|
|||
<VnInputDate
|
||||
:label="t('eventsInclusionForm.from')"
|
||||
v-model="eventInclusionFormData.started"
|
||||
data-cy="ZoneEventsFromDate"
|
||||
/>
|
||||
<VnInputDate
|
||||
:label="t('eventsInclusionForm.to')"
|
||||
v-model="eventInclusionFormData.ended"
|
||||
data-cy="ZoneEventsToDate"
|
||||
/>
|
||||
</VnRow>
|
||||
<VnRow>
|
||||
|
|
|
@ -67,7 +67,7 @@ watch(
|
|||
async () => {
|
||||
await fetchData();
|
||||
},
|
||||
{ immediate: true, deep: true }
|
||||
{ immediate: true, deep: true },
|
||||
);
|
||||
|
||||
const formatWdays = (event) => {
|
||||
|
@ -178,9 +178,10 @@ onMounted(async () => {
|
|||
openConfirmationModal(
|
||||
t('zone.deleteTitle'),
|
||||
t('zone.deleteSubtitle'),
|
||||
() => deleteEvent(event.id)
|
||||
() => deleteEvent(event.id),
|
||||
)
|
||||
"
|
||||
data-cy="ZoneEventsPanelDeleteBtn"
|
||||
>
|
||||
<QTooltip>{{ t('eventsPanel.delete') }}</QTooltip>
|
||||
</QBtn>
|
||||
|
|
|
@ -161,7 +161,8 @@ onUnmounted(() => {
|
|||
:url="url"
|
||||
:redirect="false"
|
||||
:search-remove-params="false"
|
||||
:label="$t('Search locations')"
|
||||
:label="$t('zone.searchLocations')"
|
||||
:info="$t('zone.searchLocationsInfo')"
|
||||
/>
|
||||
</Teleport>
|
||||
<VnInput
|
||||
|
|
|
@ -278,6 +278,23 @@ const exprBuilder = (param, value) => {
|
|||
</VnSection>
|
||||
</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>
|
||||
es:
|
||||
Search zone: Buscar zona
|
||||
|
|
|
@ -30,7 +30,7 @@ const columns = computed(() => [
|
|||
label: t('list.id'),
|
||||
name: 'id',
|
||||
field: 'zoneFk',
|
||||
align: 'left',
|
||||
align: 'center',
|
||||
},
|
||||
]);
|
||||
|
||||
|
|
|
@ -17,6 +17,8 @@ zone:
|
|||
travelingDays: Traveling days
|
||||
search: Search zone
|
||||
searchInfo: Search zone by id or name
|
||||
searchLocations: Search locations
|
||||
searchLocationsInfo: Search locations by post code
|
||||
list:
|
||||
clone: Clone
|
||||
id: Id
|
||||
|
|
|
@ -17,6 +17,8 @@ zone:
|
|||
travelingDays: Días de viaje
|
||||
search: Buscar zona
|
||||
searchInfo: Buscar zona por Id o nombre
|
||||
searchLocations: Buscar localización
|
||||
searchLocationsInfo: Buscar localización por código postal
|
||||
list:
|
||||
clone: Clonar
|
||||
id: Id
|
||||
|
|
|
@ -1,20 +1,18 @@
|
|||
describe('ZoneCalendar', () => {
|
||||
const addEventBtn = '.q-page-sticky > div > .q-btn';
|
||||
const submitBtn = '.q-mt-lg > .q-btn--standard';
|
||||
const deleteBtn = '.q-item__section--side > .q-btn';
|
||||
const from = '.q-field__control-container > [data-cy="ZoneEventsFromDate"]';
|
||||
const to = '.q-field__control-container > [data-cy="ZoneEventsToDate"]';
|
||||
const deleteBtn = '[data-cy="ZoneEventsPanelDeleteBtn"]';
|
||||
|
||||
beforeEach(() => {
|
||||
cy.login('developer');
|
||||
cy.viewport(1920, 1080);
|
||||
cy.visit(`/#/zone/11/events`);
|
||||
cy.visit(`/#/zone/13/events`);
|
||||
});
|
||||
|
||||
it('should include a one day event, then delete it', () => {
|
||||
cy.get(addEventBtn).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(deleteBtn).click();
|
||||
cy.dataCy('VnConfirm_confirm').click();
|
||||
|
@ -47,7 +45,7 @@ describe('ZoneCalendar', () => {
|
|||
cy.get(
|
||||
'.q-current-day > .q-calendar-month__day--content > [data-cy="ZoneCalendarDay"]',
|
||||
).click();
|
||||
cy.get('.q-mt-lg > :nth-child(2)').click();
|
||||
cy.dataCy('ZoneEventExclusionDeleteBtn').click();
|
||||
cy.dataCy('VnConfirm_confirm').click();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
describe.skip('ZoneCreate', () => {
|
||||
describe('ZoneCreate', () => {
|
||||
const data = {
|
||||
Name: { val: 'Zone pickup D' },
|
||||
Price: { val: '3' },
|
||||
|
|
|
@ -29,7 +29,5 @@ describe('ZoneList', () => {
|
|||
cy.dataCy('VnConfirm_confirm').click();
|
||||
cy.url().should('not.include', 'zone/2/');
|
||||
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' },
|
||||
};
|
||||
|
||||
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(() => {
|
||||
cy.viewport(1280, 720);
|
||||
|
@ -12,12 +13,14 @@ describe('ZoneLocations', () => {
|
|||
});
|
||||
|
||||
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', () => {
|
||||
cy.get('#searchbarForm').type('46680');
|
||||
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 = {
|
||||
Warehouse: { val: 'Warehouse Two', type: 'select' },
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue