test: refs #6321 intercept
This commit is contained in:
parent
db777bec72
commit
ebca833d73
|
@ -83,14 +83,13 @@ const styleAttrs = computed(() => {
|
||||||
outlined: true,
|
outlined: true,
|
||||||
rounded: true,
|
rounded: true,
|
||||||
}
|
}
|
||||||
: { eventColor: handleEventColor };
|
: {};
|
||||||
});
|
});
|
||||||
|
|
||||||
const manageDate = (date) => {
|
const manageDate = (date) => {
|
||||||
formattedDate.value = date;
|
formattedDate.value = date;
|
||||||
isPopupOpen.value = false;
|
isPopupOpen.value = false;
|
||||||
};
|
};
|
||||||
const handleEventColor = (date) => (date === Date.now() ? null : 'orange');
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -144,21 +143,6 @@ const handleEventColor = (date) => (date === Date.now() ? null : 'orange');
|
||||||
</QInput>
|
</QInput>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<style lang="scss">
|
|
||||||
.vn-input-date.q-field--standard.q-field--readonly .q-field__control:before {
|
|
||||||
border-bottom-style: solid;
|
|
||||||
}
|
|
||||||
|
|
||||||
.vn-input-date.q-field--outlined.q-field--readonly .q-field__control:before {
|
|
||||||
border-style: solid;
|
|
||||||
}
|
|
||||||
.calendar-event {
|
|
||||||
background-color: red;
|
|
||||||
&.--today {
|
|
||||||
border: 2px solid $info;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<i18n>
|
<i18n>
|
||||||
es:
|
es:
|
||||||
Open date: Abrir fecha
|
Open date: Abrir fecha
|
||||||
|
|
|
@ -61,7 +61,7 @@ function cancel() {
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<QDialog ref="dialogRef" @hide="onDialogHide" persistent>
|
<QDialog ref="dialogRef" @hide="onDialogHide">
|
||||||
<QCard class="q-pa-sm">
|
<QCard class="q-pa-sm">
|
||||||
<QCardSection class="row items-center q-pb-none">
|
<QCardSection class="row items-center q-pb-none">
|
||||||
<QAvatar
|
<QAvatar
|
||||||
|
@ -83,7 +83,7 @@ function cancel() {
|
||||||
/>
|
/>
|
||||||
</QCardSection>
|
</QCardSection>
|
||||||
<QCardSection class="q-pb-none">
|
<QCardSection class="q-pb-none">
|
||||||
<span id="spanHTML" v-if="message !== false" v-html="message" />
|
<span v-if="message !== false" v-html="message" />
|
||||||
</QCardSection>
|
</QCardSection>
|
||||||
<QCardSection class="row items-center q-pt-none">
|
<QCardSection class="row items-center q-pt-none">
|
||||||
<slot name="customHTML"></slot>
|
<slot name="customHTML"></slot>
|
||||||
|
|
|
@ -2,15 +2,38 @@
|
||||||
describe('Ticket Lack list', () => {
|
describe('Ticket Lack list', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
cy.visit(`/#/ticket/negative`);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Filters', () => {});
|
describe('Filters', () => {});
|
||||||
|
|
||||||
describe('Table actions', () => {
|
describe('Table actions', () => {
|
||||||
it('Open record', () => {
|
it('should display only one row in the lack list', () => {
|
||||||
cy.get('.q-virtual-scroll__content > :nth-child(1) > .sticky').click();
|
// Espera a que la solicitud interceptada se complete
|
||||||
|
cy.intercept('GET', /Tickets\/itemLack\?.*$/, {
|
||||||
|
statusCode: 200,
|
||||||
|
body: [
|
||||||
|
{
|
||||||
|
itemFk: 5,
|
||||||
|
longName: 'Ranged weapon pistol 9mm',
|
||||||
|
warehouseFk: 1,
|
||||||
|
producer: null,
|
||||||
|
size: 15,
|
||||||
|
category: null,
|
||||||
|
warehouse: 'Warehouse One',
|
||||||
|
lack: -50,
|
||||||
|
inkFk: 'SLV',
|
||||||
|
timed: '2025-01-25T22:59:00.000Z',
|
||||||
|
minTimed: '23:59',
|
||||||
|
originFk: 'Holand',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}).as('getLack'); // and assign an alias
|
||||||
|
|
||||||
|
cy.visit('/#/ticket/negative');
|
||||||
|
cy.wait('@getLack', { timeout: 10000 });
|
||||||
|
|
||||||
|
// Verifica que solo se muestre una fila en la lista
|
||||||
|
cy.get('.q-virtual-scroll__content > :nth-child(1) > .sticky').click();
|
||||||
cy.location('href').should('contain', '#/ticket/negative/5');
|
cy.location('href').should('contain', '#/ticket/negative/5');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue