Merge branch 'dev' into 8417-e2eClaimPhoto
This commit is contained in:
commit
c680e20a08
38
CHANGELOG.md
38
CHANGELOG.md
|
@ -1,3 +1,41 @@
|
||||||
|
# Version 25.08 - 2025-03-04
|
||||||
|
|
||||||
|
### Added 🆕
|
||||||
|
|
||||||
|
- feat: add order for table (origin/8681_ticketAdvance_updates) by:Javier Segarra
|
||||||
|
- feat: detect when is descriptor proxy by:Javier Segarra
|
||||||
|
- feat: refs #7356 update CrudModel by:Javier Segarra
|
||||||
|
- feat: refs #8242 remove teleport by:Javier Segarra
|
||||||
|
- feat: refs #8242 use stateStore by:Javier Segarra
|
||||||
|
- fix: fixed negative bases style by:Jon
|
||||||
|
- fix: fixed style when clicking on icons by:Jon
|
||||||
|
- refactor: refs #6897 remove debug logs and unused style (origin/6897-fixSomeCaus) by:pablone
|
||||||
|
- style: refs #7356 eslint format by:Javier Segarra
|
||||||
|
|
||||||
|
### Changed 📦
|
||||||
|
|
||||||
|
- perf: refs #7356 minor changes (origin/7356_ticketService) by:Javier Segarra
|
||||||
|
- refactor: refs #6897 remove debug logs and unused style (origin/6897-fixSomeCaus) by:pablone
|
||||||
|
- refactor: refs #6897 update component props and attributes for consistency and improved functionality (origin/6897-fixMinorIssues) by:pablone
|
||||||
|
- refactor: refs #6897 update component props and improve UI handling in Entry pages by:pablone
|
||||||
|
- refactor: refs #6897 update VnTable components for improved value handling and UI adjustments (origin/6897-minorFixes) by:pablone
|
||||||
|
- refactor: refs #8697 simplify date handling in ItemDiary component by:pablone
|
||||||
|
|
||||||
|
### Fixed 🛠️
|
||||||
|
|
||||||
|
- fix: add datakey by:Javier Segarra
|
||||||
|
- fix: fixed account descriptor menu and created e2e by:Jon
|
||||||
|
- fix: fixed negative bases style by:Jon
|
||||||
|
- fix: fixed style when clicking on icons by:Jon
|
||||||
|
- fix: refs #6553 workerBusiness (origin/6553-fixWorkerBusinessV2) by:carlossa
|
||||||
|
- fix: refs #6553 workerBusiness v3 by:carlossa
|
||||||
|
- fix: refs #6897 prevent default event behavior in autocompleteExpense function by:pablone
|
||||||
|
- fix: refs #7356 chaining params by:Javier Segarra
|
||||||
|
- fix: refs #7356 ticketService by:Javier Segarra
|
||||||
|
- fix: refs #8242 workerDepartmentTree bug (origin/8242_leftMenu_responsive) by:Javier Segarra
|
||||||
|
- fix: workerBasicData by:carlossa
|
||||||
|
- Revert "revert 1015acefb7e400be2d8b5958dba69b4d98276b34" (origin/fix_revert_revert, fix_revert_revert) by:alexm
|
||||||
|
|
||||||
# Version 25.06 - 2025-02-18
|
# Version 25.06 - 2025-02-18
|
||||||
|
|
||||||
### Added 🆕
|
### Added 🆕
|
||||||
|
|
|
@ -17,6 +17,17 @@ defineProps({ row: { type: Object, required: true } });
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
</QIcon>
|
</QIcon>
|
||||||
</router-link>
|
</router-link>
|
||||||
|
<QIcon
|
||||||
|
v-if="row?.reserved"
|
||||||
|
color="primary"
|
||||||
|
name="vn:reserva"
|
||||||
|
size="xs"
|
||||||
|
data-cy="ticketSaleReservedIcon"
|
||||||
|
>
|
||||||
|
<QTooltip>
|
||||||
|
{{ t('ticketSale.reserved') }}
|
||||||
|
</QTooltip>
|
||||||
|
</QIcon>
|
||||||
<QIcon
|
<QIcon
|
||||||
v-if="row?.risk"
|
v-if="row?.risk"
|
||||||
name="vn:risk"
|
name="vn:risk"
|
||||||
|
@ -67,12 +78,7 @@ defineProps({ row: { type: Object, required: true } });
|
||||||
>
|
>
|
||||||
<QTooltip>{{ $t('salesTicketsTable.purchaseRequest') }}</QTooltip>
|
<QTooltip>{{ $t('salesTicketsTable.purchaseRequest') }}</QTooltip>
|
||||||
</QIcon>
|
</QIcon>
|
||||||
<QIcon
|
<QIcon v-if="row?.isTaxDataChecked" name="vn:no036" color="primary" size="xs">
|
||||||
v-if="row?.isTaxDataChecked !== 0"
|
|
||||||
name="vn:no036"
|
|
||||||
color="primary"
|
|
||||||
size="xs"
|
|
||||||
>
|
|
||||||
<QTooltip>{{ $t('salesTicketsTable.noVerifiedData') }}</QTooltip>
|
<QTooltip>{{ $t('salesTicketsTable.noVerifiedData') }}</QTooltip>
|
||||||
</QIcon>
|
</QIcon>
|
||||||
<QIcon v-if="row?.isFreezed" name="vn:frozen" color="primary" size="xs">
|
<QIcon v-if="row?.isFreezed" name="vn:frozen" color="primary" size="xs">
|
||||||
|
|
|
@ -302,6 +302,8 @@ defineExpose({ opts: myOptions, vnSelectRef });
|
||||||
|
|
||||||
function handleKeyDown(event) {
|
function handleKeyDown(event) {
|
||||||
if (event.key === 'Tab' && !event.shiftKey) {
|
if (event.key === 'Tab' && !event.shiftKey) {
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
const inputValue = vnSelectRef.value?.inputValue;
|
const inputValue = vnSelectRef.value?.inputValue;
|
||||||
|
|
||||||
if (inputValue) {
|
if (inputValue) {
|
||||||
|
|
|
@ -26,12 +26,13 @@ const $attrs = computed(() => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const isRequired = computed(() => {
|
const isRequired = computed(() => {
|
||||||
return Object.keys($attrs).includes('required')
|
return Object.keys($attrs).includes('required');
|
||||||
});
|
});
|
||||||
|
|
||||||
const $props = defineProps({
|
const $props = defineProps({
|
||||||
url: { type: String, default: null },
|
url: { type: String, default: null },
|
||||||
saveUrl: {type: String, default: null},
|
saveUrl: { type: String, default: null },
|
||||||
|
userFilter: { type: Object, default: () => {} },
|
||||||
filter: { type: Object, default: () => {} },
|
filter: { type: Object, default: () => {} },
|
||||||
body: { type: Object, default: () => {} },
|
body: { type: Object, default: () => {} },
|
||||||
addNote: { type: Boolean, default: false },
|
addNote: { type: Boolean, default: false },
|
||||||
|
@ -65,7 +66,7 @@ async function insert() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function confirmAndUpdate() {
|
function confirmAndUpdate() {
|
||||||
if(!newNote.text && originalText)
|
if (!newNote.text && originalText)
|
||||||
quasar
|
quasar
|
||||||
.dialog({
|
.dialog({
|
||||||
component: VnConfirm,
|
component: VnConfirm,
|
||||||
|
@ -88,11 +89,17 @@ async function update() {
|
||||||
...body,
|
...body,
|
||||||
...{ notes: newNote.text },
|
...{ notes: newNote.text },
|
||||||
};
|
};
|
||||||
await axios.patch(`${$props.saveUrl ?? `${$props.url}/${$props.body.workerFk}`}`, newBody);
|
await axios.patch(
|
||||||
|
`${$props.saveUrl ?? `${$props.url}/${$props.body.workerFk}`}`,
|
||||||
|
newBody,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
onBeforeRouteLeave((to, from, next) => {
|
onBeforeRouteLeave((to, from, next) => {
|
||||||
if ((newNote.text && !$props.justInput) || (newNote.text !== originalText) && $props.justInput)
|
if (
|
||||||
|
(newNote.text && !$props.justInput) ||
|
||||||
|
(newNote.text !== originalText && $props.justInput)
|
||||||
|
)
|
||||||
quasar.dialog({
|
quasar.dialog({
|
||||||
component: VnConfirm,
|
component: VnConfirm,
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
@ -104,12 +111,11 @@ onBeforeRouteLeave((to, from, next) => {
|
||||||
else next();
|
else next();
|
||||||
});
|
});
|
||||||
|
|
||||||
function fetchData([ data ]) {
|
function fetchData([data]) {
|
||||||
newNote.text = data?.notes;
|
newNote.text = data?.notes;
|
||||||
originalText = data?.notes;
|
originalText = data?.notes;
|
||||||
emit('onFetch', data);
|
emit('onFetch', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<FetchData
|
<FetchData
|
||||||
|
@ -179,7 +185,8 @@ function fetchData([ data ]) {
|
||||||
:url="$props.url"
|
:url="$props.url"
|
||||||
order="created DESC"
|
order="created DESC"
|
||||||
:limit="0"
|
:limit="0"
|
||||||
:user-filter="$props.filter"
|
:user-filter="userFilter"
|
||||||
|
:filter="filter"
|
||||||
auto-load
|
auto-load
|
||||||
ref="vnPaginateRef"
|
ref="vnPaginateRef"
|
||||||
class="show"
|
class="show"
|
||||||
|
@ -218,7 +225,7 @@ function fetchData([ data ]) {
|
||||||
>
|
>
|
||||||
{{
|
{{
|
||||||
observationTypes.find(
|
observationTypes.find(
|
||||||
(ot) => ot.id === note.observationTypeFk
|
(ot) => ot.id === note.observationTypeFk,
|
||||||
)?.description
|
)?.description
|
||||||
}}
|
}}
|
||||||
</QBadge>
|
</QBadge>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed, useAttrs } from 'vue';
|
import { computed } from 'vue';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { useState } from 'src/composables/useState';
|
import { useState } from 'src/composables/useState';
|
||||||
import VnNotes from 'src/components/ui/VnNotes.vue';
|
import VnNotes from 'src/components/ui/VnNotes.vue';
|
||||||
|
@ -7,7 +7,6 @@ import VnNotes from 'src/components/ui/VnNotes.vue';
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const state = useState();
|
const state = useState();
|
||||||
const user = state.getUser();
|
const user = state.getUser();
|
||||||
const $attrs = useAttrs();
|
|
||||||
|
|
||||||
const $props = defineProps({
|
const $props = defineProps({
|
||||||
id: { type: [Number, String], default: null },
|
id: { type: [Number, String], default: null },
|
||||||
|
@ -15,9 +14,7 @@ const $props = defineProps({
|
||||||
});
|
});
|
||||||
const claimId = computed(() => $props.id || route.params.id);
|
const claimId = computed(() => $props.id || route.params.id);
|
||||||
|
|
||||||
const claimFilter = computed(() => {
|
const claimFilter = {
|
||||||
return {
|
|
||||||
where: { claimFk: claimId.value },
|
|
||||||
fields: ['id', 'created', 'workerFk', 'text'],
|
fields: ['id', 'created', 'workerFk', 'text'],
|
||||||
include: {
|
include: {
|
||||||
relation: 'worker',
|
relation: 'worker',
|
||||||
|
@ -31,8 +28,7 @@ const claimFilter = computed(() => {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
});
|
|
||||||
|
|
||||||
const body = {
|
const body = {
|
||||||
claimFk: claimId.value,
|
claimFk: claimId.value,
|
||||||
|
@ -43,7 +39,8 @@ const body = {
|
||||||
<VnNotes
|
<VnNotes
|
||||||
url="claimObservations"
|
url="claimObservations"
|
||||||
:add-note="$props.addNote"
|
:add-note="$props.addNote"
|
||||||
:filter="claimFilter"
|
:user-filter="claimFilter"
|
||||||
|
:filter="{ where: { claimFk: claimId } }"
|
||||||
:body="body"
|
:body="body"
|
||||||
v-bind="$attrs"
|
v-bind="$attrs"
|
||||||
style="overflow-y: auto"
|
style="overflow-y: auto"
|
||||||
|
|
|
@ -1,28 +1,15 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed } from 'vue';
|
|
||||||
import { useRoute } from 'vue-router';
|
|
||||||
import VnNotes from 'src/components/ui/VnNotes.vue';
|
import VnNotes from 'src/components/ui/VnNotes.vue';
|
||||||
|
|
||||||
const route = useRoute();
|
|
||||||
|
|
||||||
const noteFilter = computed(() => {
|
|
||||||
return {
|
|
||||||
order: 'created DESC',
|
|
||||||
where: {
|
|
||||||
clientFk: `${route.params.id}`,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<VnNotes
|
<VnNotes
|
||||||
url="clientObservations"
|
url="clientObservations"
|
||||||
:add-note="true"
|
:add-note="true"
|
||||||
:filter="noteFilter"
|
:filter="{ where: { clientFk: $route.params.id } }"
|
||||||
:body="{ clientFk: route.params.id }"
|
:body="{ clientFk: $route.params.id }"
|
||||||
style="overflow-y: auto"
|
style="overflow-y: auto"
|
||||||
:select-type="true"
|
:select-type="true"
|
||||||
required
|
required
|
||||||
|
order="created DESC"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -37,7 +37,6 @@ const expeditionStateTypes = ref([]);
|
||||||
|
|
||||||
const expeditionsFilter = computed(() => ({
|
const expeditionsFilter = computed(() => ({
|
||||||
where: { ticketFk: route.params.id },
|
where: { ticketFk: route.params.id },
|
||||||
order: ['created DESC'],
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const ticketArrayData = useArrayData('Ticket');
|
const ticketArrayData = useArrayData('Ticket');
|
||||||
|
@ -325,6 +324,7 @@ onMounted(async () => {
|
||||||
"
|
"
|
||||||
:redirect="false"
|
:redirect="false"
|
||||||
order="created DESC"
|
order="created DESC"
|
||||||
|
:filter="expeditionsFilter"
|
||||||
>
|
>
|
||||||
<template #column-freightItemName="{ row }">
|
<template #column-freightItemName="{ row }">
|
||||||
<span class="link" @click.stop>
|
<span class="link" @click.stop>
|
||||||
|
|
|
@ -5,9 +5,9 @@ import VnNotes from 'src/components/ui/VnNotes.vue';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
||||||
const filter = {
|
const userFilter = {
|
||||||
order: 'created DESC',
|
order: 'created DESC',
|
||||||
where: { workerFk: route.params.id },
|
|
||||||
include: {
|
include: {
|
||||||
relation: 'worker',
|
relation: 'worker',
|
||||||
scope: {
|
scope: {
|
||||||
|
@ -22,11 +22,15 @@ const filter = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const body = {
|
const body = { workerFk: route.params.id };
|
||||||
workerFk: route.params.id,
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<VnNotes :add-note="true" url="WorkerObservations" :filter="filter" :body="body" />
|
<VnNotes
|
||||||
|
:add-note="true"
|
||||||
|
url="WorkerObservations"
|
||||||
|
:user-filter="userFilter"
|
||||||
|
:filter="{ where: { workerFk: $route.params.id } }"
|
||||||
|
:body="body"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -8,43 +8,8 @@ describe('TicketFilter', () => {
|
||||||
|
|
||||||
it('use search button', function () {
|
it('use search button', function () {
|
||||||
cy.waitForElement('.q-page');
|
cy.waitForElement('.q-page');
|
||||||
cy.intercept('GET', /\/api\/Tickets\/filter/).as('ticketFilter');
|
cy.get('[data-cy="Customer ID_input"]').type('1105');
|
||||||
cy.searchBtnFilterPanel();
|
cy.searchBtnFilterPanel();
|
||||||
cy.waitRequest('@ticketFilter', ({ request }) => {
|
cy.location('href').should('contain', '#/ticket/15/summary');
|
||||||
const { query } = request;
|
|
||||||
expect(query).to.have.property('from');
|
|
||||||
expect(query).to.have.property('to');
|
|
||||||
});
|
|
||||||
cy.on('uncaught:exception', () => {
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
cy.get('.q-field__control-container > [data-cy="From_date"]')
|
|
||||||
.type(`${today()} `)
|
|
||||||
.type('{enter}');
|
|
||||||
cy.get('.q-notification').should(
|
|
||||||
'contain',
|
|
||||||
`The date range must have both 'from' and 'to'`,
|
|
||||||
);
|
|
||||||
|
|
||||||
cy.get('.q-field__control-container > [data-cy="To_date"]').type(
|
|
||||||
`${today()}{enter}`,
|
|
||||||
);
|
|
||||||
cy.intercept('GET', /\/api\/Tickets\/filter/).as('ticketFilter');
|
|
||||||
cy.searchBtnFilterPanel();
|
|
||||||
cy.wait('@ticketFilter').then(({ request }) => {
|
|
||||||
const { query } = request;
|
|
||||||
expect(query).to.have.property('from');
|
|
||||||
expect(query).to.have.property('to');
|
|
||||||
});
|
|
||||||
cy.location('href').should('contain', '#/ticket/999999');
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
function today(date) {
|
|
||||||
// return new Date().toISOString().split('T')[0];
|
|
||||||
|
|
||||||
return new Intl.DateTimeFormat('es-ES', {
|
|
||||||
day: '2-digit',
|
|
||||||
month: '2-digit',
|
|
||||||
year: 'numeric',
|
|
||||||
}).format(date ?? new Date());
|
|
||||||
}
|
|
||||||
|
|
|
@ -11,12 +11,12 @@ describe('TicketList', () => {
|
||||||
const searchResults = (search) => {
|
const searchResults = (search) => {
|
||||||
if (search) cy.typeSearchbar().type(search);
|
if (search) cy.typeSearchbar().type(search);
|
||||||
cy.dataCy('vn-searchbar').find('input').type('{enter}');
|
cy.dataCy('vn-searchbar').find('input').type('{enter}');
|
||||||
cy.dataCy('ticketListTable').should('exist');
|
// cy.dataCy('ticketListTable').should('exist');
|
||||||
cy.get(firstRow).should('exist');
|
cy.get(firstRow).should('exist');
|
||||||
};
|
};
|
||||||
|
|
||||||
it('should search results', () => {
|
it('should search results', () => {
|
||||||
cy.dataCy('ticketListTable').should('not.exist');
|
// cy.dataCy('ticketListTable').should('not.exist');
|
||||||
cy.get('.q-field__control').should('exist');
|
cy.get('.q-field__control').should('exist');
|
||||||
searchResults();
|
searchResults();
|
||||||
});
|
});
|
||||||
|
@ -40,21 +40,11 @@ describe('TicketList', () => {
|
||||||
it('filter client and create ticket', () => {
|
it('filter client and create ticket', () => {
|
||||||
cy.intercept('GET', /\/api\/Tickets\/filter/).as('ticketSearchbar');
|
cy.intercept('GET', /\/api\/Tickets\/filter/).as('ticketSearchbar');
|
||||||
searchResults();
|
searchResults();
|
||||||
cy.wait('@ticketSearchbar').then(({ request }) => {
|
|
||||||
const { query } = request;
|
|
||||||
expect(query).to.have.property('from');
|
|
||||||
expect(query).to.have.property('to');
|
|
||||||
expect(query).to.not.have.property('clientFk');
|
|
||||||
});
|
|
||||||
cy.intercept('GET', /\/api\/Tickets\/filter/).as('ticketFilter');
|
cy.intercept('GET', /\/api\/Tickets\/filter/).as('ticketFilter');
|
||||||
cy.dataCy('Customer ID_input').clear('1');
|
cy.dataCy('Customer ID_input').clear('1');
|
||||||
cy.dataCy('Customer ID_input').type('1101{enter}');
|
cy.dataCy('Customer ID_input').type('1101{enter}');
|
||||||
cy.wait('@ticketFilter').then(({ request }) => {
|
|
||||||
const { query } = request;
|
|
||||||
expect(query).to.not.have.property('from');
|
|
||||||
expect(query).to.not.have.property('to');
|
|
||||||
expect(query).to.have.property('clientFk');
|
|
||||||
});
|
|
||||||
cy.get('[data-cy="vnTableCreateBtn"] > .q-btn__content > .q-icon').click();
|
cy.get('[data-cy="vnTableCreateBtn"] > .q-btn__content > .q-icon').click();
|
||||||
cy.dataCy('Customer_select').should('have.value', 'Bruce Wayne');
|
cy.dataCy('Customer_select').should('have.value', 'Bruce Wayne');
|
||||||
cy.dataCy('Address_select').click();
|
cy.dataCy('Address_select').click();
|
||||||
|
|
|
@ -112,7 +112,6 @@ describe('TicketSale', () => {
|
||||||
cy.dataCy('ticketSaleTransferBtn').click();
|
cy.dataCy('ticketSaleTransferBtn').click();
|
||||||
cy.dataCy('ticketTransferPopup').should('exist');
|
cy.dataCy('ticketTransferPopup').should('exist');
|
||||||
cy.dataCy('ticketTransferNewTicketBtn').click();
|
cy.dataCy('ticketTransferNewTicketBtn').click();
|
||||||
//check the new ticket has been created succesfully
|
|
||||||
cy.get('.q-item > .q-item__label').should('not.have.text', ' #32');
|
cy.get('.q-item > .q-item__label').should('not.have.text', ' #32');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -138,7 +137,7 @@ describe('TicketSale', () => {
|
||||||
it('update price', () => {
|
it('update price', () => {
|
||||||
const price = Number((Math.random() * 99 + 1).toFixed(2));
|
const price = Number((Math.random() * 99 + 1).toFixed(2));
|
||||||
cy.waitForElement(firstRow);
|
cy.waitForElement(firstRow);
|
||||||
cy.get(':nth-child(10) > .q-btn').click();
|
cy.get('[data-col-field="price"]').find('.q-btn').click();
|
||||||
cy.waitForElement('[data-cy="ticketEditManaProxy"]');
|
cy.waitForElement('[data-cy="ticketEditManaProxy"]');
|
||||||
cy.dataCy('ticketEditManaProxy').should('exist');
|
cy.dataCy('ticketEditManaProxy').should('exist');
|
||||||
cy.waitForElement('[data-cy="Price_input"]');
|
cy.waitForElement('[data-cy="Price_input"]');
|
||||||
|
@ -147,15 +146,14 @@ describe('TicketSale', () => {
|
||||||
cy.dataCy('saveManaBtn').click();
|
cy.dataCy('saveManaBtn').click();
|
||||||
handleVnConfirm();
|
handleVnConfirm();
|
||||||
|
|
||||||
cy.get(':nth-child(10) > .q-btn > .q-btn__content').should(
|
cy.get('[data-col-field="price"]')
|
||||||
'have.text',
|
.find('.q-btn > .q-btn__content')
|
||||||
`€${price}`,
|
.should('have.text', `€${price}`);
|
||||||
);
|
|
||||||
});
|
});
|
||||||
it('update dicount', () => {
|
it('update discount', () => {
|
||||||
const discount = Math.floor(Math.random() * 100) + 1;
|
const discount = Math.floor(Math.random() * 100) + 1;
|
||||||
selectFirstRow();
|
selectFirstRow();
|
||||||
cy.get(':nth-child(11) > .q-btn').click();
|
cy.get('[data-col-field="discount"]').find('.q-btn').click();
|
||||||
cy.waitForElement('[data-cy="ticketEditManaProxy"]');
|
cy.waitForElement('[data-cy="ticketEditManaProxy"]');
|
||||||
cy.dataCy('ticketEditManaProxy').should('exist');
|
cy.dataCy('ticketEditManaProxy').should('exist');
|
||||||
cy.waitForElement('[data-cy="Disc_input"]');
|
cy.waitForElement('[data-cy="Disc_input"]');
|
||||||
|
@ -164,26 +162,24 @@ describe('TicketSale', () => {
|
||||||
cy.dataCy('saveManaBtn').click();
|
cy.dataCy('saveManaBtn').click();
|
||||||
handleVnConfirm();
|
handleVnConfirm();
|
||||||
|
|
||||||
cy.get(':nth-child(11) > .q-btn > .q-btn__content').should(
|
cy.get('[data-col-field="discount"]')
|
||||||
'have.text',
|
.find('.q-btn > .q-btn__content')
|
||||||
`${discount}.00%`,
|
.should('have.text', `${discount}.00%`);
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('change concept', () => {
|
it('change concept', () => {
|
||||||
const quantity = Math.floor(Math.random() * 100) + 1;
|
const concept = Math.floor(Math.random() * 100) + 1;
|
||||||
cy.waitForElement(firstRow);
|
cy.waitForElement(firstRow);
|
||||||
cy.get(':nth-child(8) > .row').click();
|
cy.get('[data-col-field="item"]').click();
|
||||||
cy.get(
|
cy.get('.q-menu')
|
||||||
'.q-menu > [data-v-ca3f07a4=""] > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > [data-cy="undefined_input"]',
|
.find('[data-cy="undefined_input"]')
|
||||||
)
|
.type(concept)
|
||||||
.type(quantity)
|
|
||||||
.type('{enter}');
|
.type('{enter}');
|
||||||
handleVnConfirm();
|
handleVnConfirm();
|
||||||
|
|
||||||
cy.get(':nth-child(8) >.row').should('contain.text', `${quantity}`);
|
cy.get('[data-col-field="item"]').should('contain.text', `${concept}`);
|
||||||
});
|
});
|
||||||
it('changequantity ', () => {
|
it('change quantity ', () => {
|
||||||
const quantity = Math.floor(Math.random() * 100) + 1;
|
const quantity = Math.floor(Math.random() * 100) + 1;
|
||||||
cy.waitForElement(firstRow);
|
cy.waitForElement(firstRow);
|
||||||
cy.dataCy('ticketSaleQuantityInput').clear();
|
cy.dataCy('ticketSaleQuantityInput').clear();
|
||||||
|
@ -200,7 +196,7 @@ describe('TicketSale', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
function handleVnConfirm() {
|
function handleVnConfirm() {
|
||||||
cy.get('[data-cy="VnConfirm_confirm"] > .q-btn__content > .block').click();
|
cy.get('[data-cy="VnConfirm_confirm"]').click();
|
||||||
cy.waitForElement('.q-notification__message');
|
cy.waitForElement('.q-notification__message');
|
||||||
|
|
||||||
cy.get('.q-notification__message').should('be.visible');
|
cy.get('.q-notification__message').should('be.visible');
|
||||||
|
|
Loading…
Reference in New Issue