forked from verdnatura/salix-front
refs #6157 e2e + front
This commit is contained in:
parent
ce4fe44b03
commit
1320db7bf0
|
@ -1,5 +1,5 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed, watchEffect, onMounted } from 'vue';
|
import { ref, computed, onMounted } from 'vue';
|
||||||
import { useQuasar } from 'quasar';
|
import { useQuasar } from 'quasar';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
|
@ -12,6 +12,7 @@ import FetchData from 'src/components/FetchData.vue';
|
||||||
import VnSelectFilter from 'src/components/common/VnSelectFilter.vue';
|
import VnSelectFilter from 'src/components/common/VnSelectFilter.vue';
|
||||||
import VnConfirm from 'src/components/ui/VnConfirm.vue';
|
import VnConfirm from 'src/components/ui/VnConfirm.vue';
|
||||||
import TicketDescriptorProxy from 'src/pages/Ticket/Card/TicketDescriptorProxy.vue';
|
import TicketDescriptorProxy from 'src/pages/Ticket/Card/TicketDescriptorProxy.vue';
|
||||||
|
import { useArrayData } from 'composables/useArrayData';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const quasar = useQuasar();
|
const quasar = useQuasar();
|
||||||
|
@ -21,17 +22,14 @@ const claim = ref(null);
|
||||||
const claimRef = ref();
|
const claimRef = ref();
|
||||||
const claimId = route.params.id;
|
const claimId = route.params.id;
|
||||||
const dialogDestination = ref(false);
|
const dialogDestination = ref(false);
|
||||||
const dialogRegularize = ref(false);
|
|
||||||
const claimDestinationFk = ref(null);
|
const claimDestinationFk = ref(null);
|
||||||
const resolvedStateId = ref(null);
|
const resolvedStateId = ref(null);
|
||||||
const claimActionsForm = ref();
|
const claimActionsForm = ref();
|
||||||
const rows = ref([]);
|
const rows = ref([]);
|
||||||
const selectedRows = ref([]);
|
const selectedRows = ref([]);
|
||||||
const destinationTypes = ref([]);
|
const destinationTypes = ref([]);
|
||||||
const destinations = ref([]);
|
|
||||||
const totalClaimed = ref(null);
|
const totalClaimed = ref(null);
|
||||||
const DEFAULT_MAX_RESPONSABILITY = 5;
|
const DEFAULT_MAX_RESPONSABILITY = 5;
|
||||||
const dialogGreuge = ref(false);
|
|
||||||
|
|
||||||
const columns = computed(() => [
|
const columns = computed(() => [
|
||||||
{
|
{
|
||||||
|
@ -130,8 +128,10 @@ async function regularizeClaim() {
|
||||||
quasar
|
quasar
|
||||||
.dialog({
|
.dialog({
|
||||||
component: VnConfirm,
|
component: VnConfirm,
|
||||||
|
componentProps: {
|
||||||
title: t('confirmGreuges'),
|
title: t('confirmGreuges'),
|
||||||
message: t('confirmGreugesMessage'),
|
message: t('confirmGreugesMessage'),
|
||||||
|
},
|
||||||
})
|
})
|
||||||
.onOk(async () => await onUpdateGreugeAccept());
|
.onOk(async () => await onUpdateGreugeAccept());
|
||||||
} else {
|
} else {
|
||||||
|
@ -141,6 +141,8 @@ async function regularizeClaim() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
claimActionsForm.value.reload();
|
claimActionsForm.value.reload();
|
||||||
|
const arrayData = useArrayData('Claim');
|
||||||
|
await arrayData.refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
async function updateGreuge(greuges) {
|
async function updateGreuge(greuges) {
|
||||||
|
|
|
@ -3,6 +3,7 @@ describe('ClaimAction', () => {
|
||||||
const claimId = 2;
|
const claimId = 2;
|
||||||
|
|
||||||
const firstRow = 'tbody > :nth-child(1)';
|
const firstRow = 'tbody > :nth-child(1)';
|
||||||
|
const destinationRow = '.q-item__section > .q-field';
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.viewport(1920, 1080);
|
cy.viewport(1920, 1080);
|
||||||
|
@ -19,15 +20,18 @@ describe('ClaimAction', () => {
|
||||||
cy.fillRow(firstRow, rowData);
|
cy.fillRow(firstRow, rowData);
|
||||||
});
|
});
|
||||||
|
|
||||||
// it('should change destination with 2 rows', () => {
|
it('should change destination from other button', () => {
|
||||||
// cy.get('[title="Change destination"]').click();
|
const rowData = [true];
|
||||||
|
|
||||||
// const rowData = ['Basura'];
|
cy.fillRow(firstRow, rowData);
|
||||||
// cy.fillRow()
|
cy.get('[title="Change destination"]').click();
|
||||||
// });
|
cy.selectOption(destinationRow, 'Confeccion');
|
||||||
|
cy.get('.q-card > .q-card__actions > .q-btn--standard').click();
|
||||||
|
});
|
||||||
|
|
||||||
it('should regularize', () => {
|
it('should regularize', () => {
|
||||||
cy.get('[title="Regularize"]').click();
|
cy.get('[title="Regularize"]').click();
|
||||||
|
cy.clickConfirm();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should remove the line', () => {
|
it('should remove the line', () => {
|
||||||
|
|
Loading…
Reference in New Issue