Merge branch 'test' of https://gitea.verdnatura.es/verdnatura/salix-front into dev
This commit is contained in:
commit
421970ba45
|
@ -192,6 +192,7 @@ const debtWarning = computed(() => {
|
|||
query: {
|
||||
createForm: JSON.stringify({
|
||||
clientFk: entity.id,
|
||||
addressId: entity.defaultAddressFk,
|
||||
}),
|
||||
},
|
||||
}"
|
||||
|
|
|
@ -125,7 +125,7 @@ onMounted(async () => {
|
|||
inventoriedDate.value =
|
||||
(await axios.get('Configs/findOne')).data?.inventoried || today;
|
||||
|
||||
if (query.warehouseFk) ref.warehouseFk = query.warehouseFk;
|
||||
if (query.warehouseFk) ref.warehouseFk = +query.warehouseFk;
|
||||
else if (!ref.warehouseFk && user.value) ref.warehouseFk = user.value.warehouseFk;
|
||||
if (ref.date) showWhatsBeforeInventory.value = true;
|
||||
ref.itemFk = route.params.id;
|
||||
|
@ -143,7 +143,7 @@ onMounted(async () => {
|
|||
const fetchItemBalances = async () => await arrayDataItemBalances.fetch({});
|
||||
|
||||
const getBadgeAttrs = (_date) => {
|
||||
const isSameDate = date.isSameDate(today.value, _date);
|
||||
const isSameDate = date.isSameDate(today, _date);
|
||||
const attrs = {
|
||||
'text-color': isSameDate ? 'black' : 'white',
|
||||
color: isSameDate ? 'warning' : 'transparent',
|
||||
|
@ -153,8 +153,6 @@ const getBadgeAttrs = (_date) => {
|
|||
|
||||
const scrollToToday = async () => {
|
||||
await nextTick();
|
||||
const today = Date.vnNew();
|
||||
today.setHours(0, 0, 0, 0);
|
||||
const todayCell = document.querySelector(`td[data-date="${today.toISOString()}"]`);
|
||||
if (todayCell) {
|
||||
todayCell.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
|
|
|
@ -81,7 +81,7 @@ const columns = computed(() => [
|
|||
label: t('module.created'),
|
||||
component: 'date',
|
||||
cardVisible: true,
|
||||
format: (row) => toDateTimeFormat(row?.landed),
|
||||
format: (row) => toDateTimeFormat(row?.created),
|
||||
columnField: {
|
||||
component: null,
|
||||
},
|
||||
|
|
|
@ -62,7 +62,7 @@ describe('Client list', () => {
|
|||
it('Client founded create order', () => {
|
||||
const search = 'Jessica Jones';
|
||||
cy.searchByLabel('Name', search);
|
||||
cy.openActionDescriptor('New order');
|
||||
cy.clickButtonWith('icon', 'icon-basketadd');
|
||||
cy.waitForElement('#formModel');
|
||||
cy.waitForElement('.q-form');
|
||||
cy.checkValueForm(1, search);
|
||||
|
|
|
@ -289,40 +289,13 @@ Cypress.Commands.add('openActionDescriptor', (opt) => {
|
|||
cy.openActionsDescriptor();
|
||||
const listItem = '[role="menu"] .q-list .q-item';
|
||||
cy.contains(listItem, opt).click();
|
||||
1;
|
||||
});
|
||||
|
||||
Cypress.Commands.add('openActionsDescriptor', () => {
|
||||
cy.get('[data-cy="descriptor-more-opts"]').click();
|
||||
});
|
||||
|
||||
Cypress.Commands.add('clickButtonsDescriptor', (id) => {
|
||||
cy.get(`.actions > .q-card__actions> .q-btn:nth-child(${id})`)
|
||||
.invoke('removeAttr', 'target')
|
||||
.click();
|
||||
});
|
||||
|
||||
Cypress.Commands.add('openActionDescriptor', (opt) => {
|
||||
cy.openActionsDescriptor();
|
||||
const listItem = '[role="menu"] .q-list .q-item';
|
||||
cy.contains(listItem, opt).click();
|
||||
1;
|
||||
});
|
||||
|
||||
Cypress.Commands.add('clickButtonsDescriptor', (id) => {
|
||||
cy.get(`.actions > .q-card__actions> .q-btn:nth-child(${id})`)
|
||||
.invoke('removeAttr', 'target')
|
||||
.click();
|
||||
});
|
||||
|
||||
Cypress.Commands.add('openActionDescriptor', (opt) => {
|
||||
cy.openActionsDescriptor();
|
||||
const listItem = '[role="menu"] .q-list .q-item';
|
||||
cy.contains(listItem, opt).click();
|
||||
1;
|
||||
});
|
||||
|
||||
Cypress.Commands.add('clickButtonsDescriptor', (id) => {
|
||||
Cypress.Commands.add('clickButtonDescriptor', (id) => {
|
||||
cy.get(`.actions > .q-card__actions> .q-btn:nth-child(${id})`)
|
||||
.invoke('removeAttr', 'target')
|
||||
.click();
|
||||
|
@ -374,3 +347,21 @@ Cypress.Commands.add('addBtnClick', () => {
|
|||
.and('be.visible')
|
||||
.click();
|
||||
});
|
||||
|
||||
Cypress.Commands.add('clickButtonWith', (type, value) => {
|
||||
switch (type) {
|
||||
case 'icon':
|
||||
cy.clickButtonWithIcon(value);
|
||||
break;
|
||||
|
||||
default:
|
||||
cy.clickButtonWithText(value);
|
||||
break;
|
||||
}
|
||||
});
|
||||
Cypress.Commands.add('clickButtonWithIcon', (iconClass) => {
|
||||
cy.get(`.q-icon.${iconClass}`).parent().click();
|
||||
});
|
||||
Cypress.Commands.add('clickButtonWithText', (buttonText) => {
|
||||
cy.get('.q-btn').contains(buttonText).click();
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue