Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 6564-enhanceTicketAdvance
gitea/salix-front/pipeline/pr-dev This commit is unstable Details

This commit is contained in:
Jorge Penadés 2025-03-28 14:53:01 +01:00
commit e73604d908
15 changed files with 212 additions and 189 deletions

View File

@ -57,4 +57,5 @@ function handleClick() {
{{ capitalize(type).replace('-', '') }}
</QTooltip>
</QBtn>
{{ phoneNumber }}
</template>

View File

@ -43,7 +43,7 @@ const val = computed(() => $props.value);
<span style="color: var(--vn-label-color)">{{ label }}</span>
</slot>
</div>
<div class="value">
<div class="value" v-if="value || $slots.value">
<slot name="value">
<span :title="value" style="text-overflow: ellipsis">
{{ dash ? dashIfEmpty(value) : value }}

View File

@ -9,7 +9,7 @@
data-cy="descriptor-more-opts"
>
<QTooltip>
{{ $t('components.cardDescriptor.moreOptions') }}
{{ $t('components.vnDescriptor.moreOptions') }}
</QTooltip>
<QMenu ref="menuRef" data-cy="descriptor-more-opts-menu">
<QList data-cy="descriptor-more-opts_list">

View File

@ -248,7 +248,7 @@ function getBadgeAttrs(row) {
let timeDiff = today - timeTicket;
if (timeDiff > 0) return { color: 'info', 'text-color': 'black' };
if (timeDiff < 0) return { color: 'warning', 'text-color': 'black' };
switch (row.entryTypeCode) {
case 'regularization':
case 'life':
@ -273,7 +273,7 @@ function getBadgeAttrs(row) {
default:
break;
}
if (timeDiff < 0) return { color: 'warning', 'text-color': 'black' };
if (timeDiff > 0) return { color: 'info', 'text-color': 'black' };
return { color: 'transparent' };
}

View File

@ -1,13 +1,14 @@
<script setup>
import { ref, computed } from 'vue';
import { useI18n } from 'vue-i18n';
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
import DepartmentDescriptorProxy from '../Worker/Department/Card/DepartmentDescriptorProxy.vue';
import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue';
import { toDateFormat } from 'src/filters/date.js';
import VnTable from 'src/components/VnTable/VnTable.vue';
import VnInputDate from 'src/components/common/VnInputDate.vue';
import VnRow from 'src/components/ui/VnRow.vue';
import { dateRange } from 'src/filters';
import useOpenURL from 'src/composables/useOpenURL';
const { t } = useI18n();
const dates = dateRange(Date.vnNew());
@ -94,6 +95,7 @@ const columns = computed(() => [
columnClass: 'no-padding',
},
]);
const openTab = (id) => useOpenURL(`#/customer/${id}/summary`);
</script>
<template>
@ -113,6 +115,8 @@ const columns = computed(() => [
:disable-option="{ card: true }"
dense
class="q-px-none"
:row-click="({ id }) => openTab(id)"
:row-ctrl-click="(_, { id }) => openTab(id)"
>
<template #top-left>
<VnRow>
@ -121,12 +125,16 @@ const columns = computed(() => [
</VnRow>
</template>
<template #column-departmentFk="{ row }">
<span class="link" :title="row.department" v-text="row.department" />
<WorkerDescriptorProxy :id="row.departmentFk" dense />
<span @click.stop.prevent class="link" :title="row.department">
{{ row.department }}
<DepartmentDescriptorProxy :id="row.departmentFk" dense
/></span>
</template>
<template #column-clientFk="{ row }">
<span class="link" :title="row.clientName" v-text="row.clientName" />
<CustomerDescriptorProxy :id="row.clientFk" />
<span @click.stop.prevent class="link" :title="row.clientName">
{{ row.clientName }}
<CustomerDescriptorProxy :id="row.clientFk" dense
/></span>
</template>
</VnTable>
</template>

View File

@ -9,6 +9,7 @@ import { toDateFormat, toDateTimeFormat } from 'src/filters/date.js';
import { toCurrency } from 'src/filters';
import { useVnConfirm } from 'composables/useVnConfirm';
import axios from 'axios';
import useOpenURL from 'src/composables/useOpenURL';
const { t } = useI18n();
const { openConfirmationModal } = useVnConfirm();
@ -108,8 +109,7 @@ const removeOrders = async () => {
await table.value.reload();
};
const openTab = (id) =>
window.open(`#/order/${id}/summary`, '_blank', 'noopener, noreferrer');
const openTab = (id) => useOpenURL(`#/order/${id}/summary`);
</script>
<template>
<VnTable
@ -129,6 +129,7 @@ const openTab = (id) =>
}"
default-mode="table"
:row-click="({ id }) => openTab(id)"
:row-ctrl-click="(_, { id }) => openTab(id)"
v-model:selected="selectedRows"
:disable-option="{ card: true }"
>
@ -177,16 +178,16 @@ const openTab = (id) =>
</template>
<template #column-clientFk="{ row }">
<QTd @click.stop>
<span class="link" v-text="row.clientName" :title="row.clientName" />
<CustomerDescriptorProxy :id="row.clientFk" />
</QTd>
<span class="link" @click.stop :title="row.clientName">
{{ row.clientName }}
<CustomerDescriptorProxy :id="row.clientFk" dense
/></span>
</template>
<template #column-departmentFk="{ row }">
<QTd @click.stop>
<span class="link" v-text="row.departmentName" />
<DepartmentDescriptorProxy :id="row.departmentFk" dense />
</QTd>
<span class="link" @click.stop :title="row.departmentName">
{{ row.departmentName }}
<DepartmentDescriptorProxy :id="row.departmentFk" dense
/></span>
</template>
</VnTable>
</template>

View File

@ -449,21 +449,19 @@ const openTab = (id) => useOpenURL(`#/ticket/${id}/sale`);
<span :title="row.province" v-text="row.province" />
</template>
<template #column-state="{ row }">
<div @click.stop.prevent>
<div v-if="row.refFk">
<span class="link">{{ row.refFk }}</span>
<InvoiceOutDescriptorProxy :id="row.invoiceOutId" />
</div>
<QBadge
v-else
:color="stateColors[row.classColor] || 'transparent'"
:text-color="stateColors[row.classColor] ? 'black' : 'white'"
class="q-pa-sm"
style="font-size: 14px"
>
{{ row.state }}
</QBadge>
<div v-if="row.refFk" @click.stop.prevent>
<span class="link">{{ row.refFk }}</span>
<InvoiceOutDescriptorProxy :id="row.invoiceOutId" />
</div>
<QBadge
v-else
:color="stateColors[row.classColor] || 'transparent'"
:text-color="stateColors[row.classColor] ? 'black' : 'white'"
class="q-pa-sm"
style="font-size: 14px"
>
{{ row.state }}
</QBadge>
</template>
<template #column-isFragile="{ row }">
<QIcon v-if="row.isFragile" name="local_bar" color="primary" size="sm">

View File

@ -216,27 +216,23 @@ onMounted(async () => {
:value="toDate(entity.landed)"
/>
<VnLv :label="t('globals.packages')" :value="entity.packages" />
<VnLv :value="entity.address.phone">
<template #label>
{{ t('ticket.summary.consigneePhone') }}
<VnLv :label="t('ticket.summary.consigneePhone')">
<template #value>
<VnLinkPhone :phone-number="entity.address.phone" />
</template>
</VnLv>
<VnLv :value="entity.address.mobile">
<template #label>
{{ t('ticket.summary.consigneeMobile') }}
<VnLv :label="t('ticket.summary.consigneeMobile')">
<template #value>
<VnLinkPhone :phone-number="entity.address.mobile" />
</template>
</VnLv>
<VnLv :value="entity.client.phone">
<template #label>
{{ t('ticket.summary.clientPhone') }}
<VnLv :label="t('ticket.summary.clientPhone')">
<template #value>
<VnLinkPhone :phone-number="entity.client.phone" />
</template>
</VnLv>
<VnLv :value="entity.client.mobile">
<template #label>
{{ t('ticket.summary.clientMobile') }}
<VnLv :label="t('ticket.summary.clientMobile')">
<template #value>
<VnLinkPhone :phone-number="entity.client.mobile" />
</template>
</VnLv>

View File

@ -18,7 +18,6 @@ import { usePrintService } from 'composables/usePrintService';
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
import axios from 'axios';
import RightMenu from 'src/components/common/RightMenu.vue';
import VnPopup from 'src/components/common/VnPopup.vue';
const stateStore = useStateStore();
const { t } = useI18n();
@ -141,7 +140,6 @@ const columns = computed(() => [
label: 'id',
field: 'id',
name: 'id',
align: 'center',
showValue: true,
sortable: true,
},
@ -165,7 +163,7 @@ const columns = computed(() => [
label: t('globals.amount'),
name: 'invoiceAmount',
field: 'entries',
align: 'left',
align: 'right',
showValue: true,
sortable: true,
format: (value) =>
@ -190,7 +188,7 @@ const columns = computed(() => [
label: t('globals.packages'),
field: 'stickers',
name: 'stickers',
align: 'left',
align: 'right',
showValue: true,
sortable: true,
},
@ -198,7 +196,7 @@ const columns = computed(() => [
label: '%',
field: '',
name: 'percentage',
align: 'center',
align: 'right',
showValue: false,
sortable: true,
},
@ -214,7 +212,7 @@ const columns = computed(() => [
label: t('extraCommunity.physicKg'),
field: 'loadedKg',
name: 'loadedKg',
align: 'left',
align: 'right',
showValue: true,
sortable: true,
},
@ -222,7 +220,7 @@ const columns = computed(() => [
label: 'KG Vol.',
field: 'volumeKg',
name: 'volumeKg',
align: 'left',
align: 'right',
showValue: true,
sortable: true,
},
@ -277,7 +275,6 @@ async function getData() {
const onStoreDataChange = () => {
const newData = JSON.parse(JSON.stringify(arrayData.store.data)) || [];
rows.value = newData;
// el objetivo de esto es guardar una copia de los valores iniciales de todas las rows para corroborar si la data cambio antes de guardar los cambios
originalRowDataCopy.value = JSON.parse(JSON.stringify(newData));
};
@ -300,20 +297,17 @@ const openReportPdf = () => {
};
const saveFieldValue = async (val, field, index) => {
// Evitar la solicitud de guardado si el valor no ha cambiado
if (originalRowDataCopy.value[index][field] == val) return;
const id = rows.value[index].id;
const params = { [field]: val };
await axios.patch(`Travels/${id}`, params);
// Actualizar la copia de los datos originales con el nuevo valor
originalRowDataCopy.value[index][field] = val;
await arrayData.fetch({ append: false });
};
const stopEventPropagation = (event, col) => {
// Detener la propagación del evento de los siguientes elementos para evitar el click sobre la row que dispararía la función navigateToTravelId
if (!['ref', 'id', 'cargoSupplierNickname', 'kg'].includes(col.name)) return;
event.preventDefault();
event.stopPropagation();
@ -335,14 +329,12 @@ onMounted(async () => {
await getData();
});
// Handler del evento @dragstart (inicio del drag) y guarda información inicial
const handleDragStart = (event, rowIndex, entryIndex) => {
draggedRowIndex.value = rowIndex;
entryRowIndex.value = entryIndex;
event.dataTransfer.effectAllowed = 'move';
};
// Handler del evento @dragenter (cuando haces drag sobre une elemento y lo arrastras sobre un posible target de drop) y actualiza el targetIndex
const handleDragEnter = (_, targetIndex) => {
targetRowIndex.value = targetIndex;
};
@ -356,11 +348,8 @@ const saveRowDrop = async (targetRowIndex) => {
const moveRow = async (draggedRowIndex, targetRowIndex, entryIndex) => {
try {
if (draggedRowIndex === targetRowIndex) return;
// Remover entry de la row original
draggedEntry.value = rows.value[draggedRowIndex].entries.splice(entryIndex, 1)[0];
//Si la row de destino por alguna razón no tiene la propiedad entry la creamos
if (!rows.value[targetRowIndex].entries) rows.value[targetRowIndex].entries = [];
// Añadir entry a la row de destino
rows.value[targetRowIndex].entries.push(draggedEntry.value);
await saveRowDrop(targetRowIndex);
@ -370,13 +359,11 @@ const moveRow = async (draggedRowIndex, targetRowIndex, entryIndex) => {
}
};
// Handler de cuando haces un drop tanto dentro como fuera de la tabla para limpiar acciones y data
const handleDragEnd = () => {
stopScroll();
cleanDragAndDropData();
};
// Handler del evento @drop (cuando soltas el elemento draggeado sobre un target)
const handleDrop = () => {
if (
!draggedRowIndex.value &&
@ -399,7 +386,6 @@ const cleanDragAndDropData = () => {
const scrollInterval = ref(null);
const startScroll = (direction) => {
// Iniciar el scroll en la dirección especificada
if (!scrollInterval.value) {
scrollInterval.value = requestAnimationFrame(() => scroll(direction));
}
@ -413,14 +399,12 @@ const stopScroll = () => {
};
const scroll = (direction) => {
// Controlar el desplazamiento en la dirección especificada
const yOffset = direction === 'up' ? -2 : 2;
window.scrollBy(0, yOffset);
const windowHeight = window.innerHeight;
const documentHeight = document.body.offsetHeight;
// Verificar si se alcanzaron los límites de la ventana para detener el desplazamiento
if (
(direction === 'up' && window.scrollY > 0) ||
(direction === 'down' && windowHeight + window.scrollY < documentHeight)
@ -431,13 +415,10 @@ const scroll = (direction) => {
}
};
// Handler del scroll mientras se hace el drag de una row
const handleDragScroll = (event) => {
// Obtener la posición y dimensiones del cursor
const y = event.clientY;
const windowHeight = window.innerHeight;
// Verificar si el cursor está cerca del borde superior o inferior de la ventana
const nearTop = y < 150;
const nearBottom = y > windowHeight - 100;
@ -547,7 +528,7 @@ watch(route, () => {
? `${props.row.percentageKg}%`
: '-'
"
class="text-left q-py-xs q-px-sm"
class="text-right q-py-xs q-px-sm"
:color="getColor(props.row.percentageKg)"
/>
<span
@ -566,7 +547,6 @@ watch(route, () => {
]"
v-text="col.value"
/>
<!-- Main Row Descriptors -->
<TravelDescriptorProxy
v-if="col.name === 'id'"
:id="props.row.id"
@ -597,7 +577,7 @@ watch(route, () => {
index === props.row.entries.length - 1,
}"
>
<QTd>
<QTd class="text-right">
<QBtn dense flat class="link">{{ entry.id }} </QBtn>
<EntryDescriptorProxy :id="entry.id" />
</QTd>
@ -605,7 +585,7 @@ watch(route, () => {
<QBtn flat class="link" dense>{{ entry.supplierName }}</QBtn>
<SupplierDescriptorProxy :id="entry.supplierFk" />
</QTd>
<QTd>
<QTd class="text-center">
<QIcon
v-if="entry.isCustomInspectionRequired"
name="warning"
@ -615,40 +595,27 @@ watch(route, () => {
>
</QIcon>
</QTd>
<QTd>
<QTd class="text-right">
<span>{{ toCurrency(entry.invoiceAmount) }}</span>
</QTd>
<QTd>
<span>{{ entry.reference }}</span>
</QTd>
<QTd>
<QTd class="text-right">
<span>{{ entry.stickers }}</span>
</QTd>
<QTd />
<QTd></QTd>
<QTd>
<QTd class="text-right">
<span>{{ entry.loadedkg }}</span>
</QTd>
<QTd>
<QTd class="text-right">
<span>{{ entry.volumeKg }}</span>
</QTd>
<QTd />
<QTd />
<QTd />
<QTd />
<QTd>
<QBtn
v-if="entry.evaNotes"
icon="comment"
size="md"
flat
color="primary"
>
<VnPopup
:title="t('globals.observations')"
:content="entry.evaNotes"
/>
</QBtn>
<QTd :colspan="5" class="text-right">
<span>
{{ entry.evaNotes }}
</span>
</QTd>
</QTr>
</template>
@ -664,9 +631,6 @@ watch(route, () => {
:deep(.q-table) {
border-collapse: collapse;
th {
padding: 0;
}
tbody tr td {
&:nth-child(1) {
max-width: 65px;
@ -675,6 +639,10 @@ watch(route, () => {
padding: 0;
}
}
thead > tr > th {
padding: 3px;
color: var(--vn-label-color);
}
}
.q-td :deep(input) {

View File

@ -0,0 +1,36 @@
import { describe, it, expect, vi } from 'vitest';
import { ref, nextTick } from 'vue';
import { stateQueryGuard } from 'src/router/hooks';
import { useStateQueryStore } from 'src/stores/useStateQueryStore';
vi.mock('src/stores/useStateQueryStore', () => {
const isLoading = ref(true);
return {
useStateQueryStore: () => ({
isLoading: () => isLoading,
setLoading: isLoading,
}),
};
});
describe('hooks', () => {
describe('stateQueryGuard', () => {
const foo = { name: 'foo' };
it('should wait until the state query is not loading and then call next()', async () => {
const next = vi.fn();
stateQueryGuard(foo, { name: 'bar' }, next);
expect(next).not.toHaveBeenCalled();
useStateQueryStore().setLoading.value = false;
await nextTick();
expect(next).toHaveBeenCalled();
});
it('should ignore if both routes are the same', () => {
const next = vi.fn();
stateQueryGuard(foo, foo, next);
expect(next).toHaveBeenCalled();
});
});
});

95
src/router/hooks.js Normal file
View File

@ -0,0 +1,95 @@
import { useRole } from 'src/composables/useRole';
import { useUserConfig } from 'src/composables/useUserConfig';
import { useTokenConfig } from 'src/composables/useTokenConfig';
import { useAcl } from 'src/composables/useAcl';
import { isLoggedIn } from 'src/utils/session';
import { useSession } from 'src/composables/useSession';
import { useStateQueryStore } from 'src/stores/useStateQueryStore';
import { watch } from 'vue';
import { i18n } from 'src/boot/i18n';
let session = null;
const { t, te } = i18n.global;
export async function navigationGuard(to, from, next, Router, state) {
if (!session) session = useSession();
const outLayout = Router.options.routes[0].children.map((r) => r.name);
if (!session.isLoggedIn() && !outLayout.includes(to.name)) {
return next({ name: 'Login', query: { redirect: to.fullPath } });
}
if (isLoggedIn()) {
const stateRoles = state.getRoles().value;
if (stateRoles.length === 0) {
await useRole().fetch();
await useAcl().fetch();
await useUserConfig().fetch();
await useTokenConfig().fetch();
}
const matches = to.matched;
const hasRequiredAcls = matches.every((route) => {
const meta = route.meta;
if (!meta?.acls) return true;
return useAcl().hasAny(meta.acls);
});
if (!hasRequiredAcls) return next({ path: '/' });
}
next();
}
export async function stateQueryGuard(to, from, next) {
if (to.name !== from.name) {
const stateQuery = useStateQueryStore();
await waitUntilFalse(stateQuery.isLoading());
}
next();
}
export function setPageTitle(to) {
let title = t(`login.title`);
const matches = to.matched;
if (matches && matches.length > 1) {
const module = matches[1];
const moduleTitle = module.meta?.title;
if (moduleTitle) {
title = t(`globals.pageTitles.${moduleTitle}`);
}
}
const childPage = to.meta;
const childPageTitle = childPage?.title;
if (childPageTitle && matches.length > 2) {
if (title != '') title += ': ';
const moduleLocale = `globals.pageTitles.${childPageTitle}`;
const pageTitle = te(moduleLocale)
? t(moduleLocale)
: t(`globals.pageTitles.${childPageTitle}`);
const idParam = to.params?.id;
const idPageTitle = `${idParam} - ${pageTitle}`;
const builtTitle = idParam ? idPageTitle : pageTitle;
title += builtTitle;
}
document.title = title;
}
function waitUntilFalse(ref) {
return new Promise((resolve) => {
if (!ref.value) return resolve();
const stop = watch(
ref,
(val) => {
if (!val) {
stop();
resolve();
}
},
{ immediate: true },
);
});
}

View File

@ -6,101 +6,25 @@ import {
createWebHashHistory,
} from 'vue-router';
import routes from './routes';
import { i18n } from 'src/boot/i18n';
import { useState } from 'src/composables/useState';
import { useRole } from 'src/composables/useRole';
import { useUserConfig } from 'src/composables/useUserConfig';
import { useTokenConfig } from 'src/composables/useTokenConfig';
import { useAcl } from 'src/composables/useAcl';
import { isLoggedIn } from 'src/utils/session';
import { useSession } from 'src/composables/useSession';
import { navigationGuard, setPageTitle, stateQueryGuard } from './hooks';
let session = null;
const { t, te } = i18n.global;
const createHistory = process.env.SERVER
? createMemoryHistory
: process.env.VUE_ROUTER_MODE === 'history'
? createWebHistory
: createWebHashHistory;
const webHistory =
process.env.VUE_ROUTER_MODE === 'history' ? createWebHistory : createWebHashHistory;
const createHistory = process.env.SERVER ? createMemoryHistory : webHistory;
const Router = createRouter({
scrollBehavior: () => ({ left: 0, top: 0 }),
routes,
// Leave this as is and make changes in quasar.conf.js instead!
// quasar.conf.js -> build -> vueRouterMode
// quasar.conf.js -> build -> publicPath
history: createHistory(process.env.VUE_ROUTER_BASE),
});
/*
* If not building with SSR mode, you can
* directly export the Router instantiation;
*
* The function below can be async too; either use
* async/await or return a Promise which resolves
* with the Router instance.
*/
export { Router };
export default defineRouter(function (/* { store, ssrContext } */) {
export default defineRouter(() => {
const state = useState();
Router.beforeEach(async (to, from, next) => {
if (!session) session = useSession();
const outLayout = Router.options.routes[0].children.map((r) => r.name);
if (!session.isLoggedIn() && !outLayout.includes(to.name)) {
return next({ name: 'Login', query: { redirect: to.fullPath } });
}
if (isLoggedIn()) {
const stateRoles = state.getRoles().value;
if (stateRoles.length === 0) {
await useRole().fetch();
await useAcl().fetch();
await useUserConfig().fetch();
await useTokenConfig().fetch();
}
const matches = to.matched;
const hasRequiredAcls = matches.every((route) => {
const meta = route.meta;
if (!meta?.acls) return true;
return useAcl().hasAny(meta.acls);
});
if (!hasRequiredAcls) return next({ path: '/' });
}
next();
});
Router.afterEach((to) => {
let title = t(`login.title`);
const matches = to.matched;
if (matches && matches.length > 1) {
const module = matches[1];
const moduleTitle = module.meta && module.meta.title;
if (moduleTitle) {
title = t(`globals.pageTitles.${moduleTitle}`);
}
}
const childPage = to.meta;
const childPageTitle = childPage && childPage.title;
if (childPageTitle && matches.length > 2) {
if (title != '') title += ': ';
const moduleLocale = `globals.pageTitles.${childPageTitle}`;
const pageTitle = te(moduleLocale)
? t(moduleLocale)
: t(`globals.pageTitles.${childPageTitle}`);
const idParam = to.params && to.params.id;
const idPageTitle = `${idParam} - ${pageTitle}`;
const builtTitle = idParam ? idPageTitle : pageTitle;
title += builtTitle;
}
document.title = title;
});
Router.beforeEach((to, from, next) => navigationGuard(to, from, next, Router, state));
Router.beforeEach(stateQueryGuard);
Router.afterEach(setPageTitle);
Router.onError(({ message }) => {
const errorMessages = [

View File

@ -1,6 +1,6 @@
Cypress.Commands.add('selectTravel', (warehouse = '1') => {
cy.get('i[data-cy="Travel_icon"]').click();
cy.get('input[data-cy="Warehouse Out_select"]').type(warehouse);
cy.selectOption('input[data-cy="Warehouse Out_select"]', warehouse);
cy.get('div[role="listbox"] > div > div[role="option"]').eq(0).click();
cy.get('button[data-cy="save-filter-travel-form"]').click();
cy.get('tr').eq(1).click();
@ -9,7 +9,6 @@ Cypress.Commands.add('selectTravel', (warehouse = '1') => {
Cypress.Commands.add('deleteEntry', () => {
cy.get('[data-cy="descriptor-more-opts"]').should('be.visible').click();
cy.waitForElement('div[data-cy="delete-entry"]').click();
cy.url().should('include', 'list');
});
Cypress.Commands.add('createEntry', () => {

View File

@ -28,12 +28,8 @@ describe('EntryDescriptor', () => {
cy.get('.q-notification__message')
.eq(2)
.should('have.text', 'Entry prices recalculated');
cy.get('[data-cy="descriptor-more-opts"]').click();
cy.deleteEntry();
cy.log(previousUrl);
cy.visit(previousUrl);
cy.waitForElement('[data-cy="entry-buys"]');

View File

@ -44,11 +44,12 @@ describe('EntryList', () => {
},
);
checkBadgeDate(
// fix on task https://redmine.verdnatura.es/issues/8638
/* checkBadgeDate(
'td[data-col-field="landed"] > div .bg-info',
(badgeDate, compareDate) => {
expect(badgeDate.getTime()).to.be.lessThan(compareDate.getTime());
},
);
); */
});
});