0
0
Fork 0

refs #6157 e2e + front

This commit is contained in:
Carlos Satorres 2023-11-20 18:13:26 +01:00
parent ce4fe44b03
commit 1320db7bf0
2 changed files with 17 additions and 11 deletions

View File

@ -1,5 +1,5 @@
<script setup>
import { ref, computed, watchEffect, onMounted } from 'vue';
import { ref, computed, onMounted } from 'vue';
import { useQuasar } from 'quasar';
import { useI18n } from 'vue-i18n';
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 VnConfirm from 'src/components/ui/VnConfirm.vue';
import TicketDescriptorProxy from 'src/pages/Ticket/Card/TicketDescriptorProxy.vue';
import { useArrayData } from 'composables/useArrayData';
const { t } = useI18n();
const quasar = useQuasar();
@ -21,17 +22,14 @@ const claim = ref(null);
const claimRef = ref();
const claimId = route.params.id;
const dialogDestination = ref(false);
const dialogRegularize = ref(false);
const claimDestinationFk = ref(null);
const resolvedStateId = ref(null);
const claimActionsForm = ref();
const rows = ref([]);
const selectedRows = ref([]);
const destinationTypes = ref([]);
const destinations = ref([]);
const totalClaimed = ref(null);
const DEFAULT_MAX_RESPONSABILITY = 5;
const dialogGreuge = ref(false);
const columns = computed(() => [
{
@ -130,8 +128,10 @@ async function regularizeClaim() {
quasar
.dialog({
component: VnConfirm,
title: t('confirmGreuges'),
message: t('confirmGreugesMessage'),
componentProps: {
title: t('confirmGreuges'),
message: t('confirmGreugesMessage'),
},
})
.onOk(async () => await onUpdateGreugeAccept());
} else {
@ -141,6 +141,8 @@ async function regularizeClaim() {
});
}
claimActionsForm.value.reload();
const arrayData = useArrayData('Claim');
await arrayData.refresh();
}
async function updateGreuge(greuges) {

View File

@ -3,6 +3,7 @@ describe('ClaimAction', () => {
const claimId = 2;
const firstRow = 'tbody > :nth-child(1)';
const destinationRow = '.q-item__section > .q-field';
beforeEach(() => {
cy.viewport(1920, 1080);
@ -19,15 +20,18 @@ describe('ClaimAction', () => {
cy.fillRow(firstRow, rowData);
});
// it('should change destination with 2 rows', () => {
// cy.get('[title="Change destination"]').click();
it('should change destination from other button', () => {
const rowData = [true];
// const rowData = ['Basura'];
// cy.fillRow()
// });
cy.fillRow(firstRow, rowData);
cy.get('[title="Change destination"]').click();
cy.selectOption(destinationRow, 'Confeccion');
cy.get('.q-card > .q-card__actions > .q-btn--standard').click();
});
it('should regularize', () => {
cy.get('[title="Regularize"]').click();
cy.clickConfirm();
});
it('should remove the line', () => {