fix: #8349 fixed ItemFixedPrice crashing and it's e2e test not working #1289
|
@ -420,6 +420,10 @@ function handleOnDataSave({ CrudModelRef }) {
|
||||||
'row-key': 'id',
|
'row-key': 'id',
|
||||||
selection: 'multiple',
|
selection: 'multiple',
|
||||||
}"
|
}"
|
||||||
|
:crud-model="{
|
||||||
|
disableInfiniteScroll: true,
|
||||||
|
}"
|
||||||
|
:use-model="true"
|
||||||
|
|||||||
v-model:selected="rowsSelected"
|
v-model:selected="rowsSelected"
|
||||||
:create-as-dialog="false"
|
:create-as-dialog="false"
|
||||||
:create="{
|
:create="{
|
||||||
|
|
|
@ -1,11 +1,14 @@
|
||||||
/// <reference types="cypress" />
|
/// <reference types="cypress" />
|
||||||
function goTo(n = 1) {
|
|
||||||
return `.q-virtual-scroll__content > :nth-child(${n})`;
|
|
||||||
}
|
|
||||||
const firstRow = goTo();
|
|
||||||
`.q-virtual-scroll__content > :nth-child(2)`;
|
|
||||||
describe('Handle Items FixedPrice', () => {
|
describe('Handle Items FixedPrice', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
Cypress.on('uncaught:exception', (err, runnable) => {
|
||||||
|
if (err.message.includes('canceled')) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
|
||||||
cy.viewport(1280, 720);
|
cy.viewport(1280, 720);
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
cy.visit('/#/item/fixed-price', { timeout: 5000 });
|
cy.visit('/#/item/fixed-price', { timeout: 5000 });
|
||||||
|
@ -14,50 +17,68 @@ describe('Handle Items FixedPrice', () => {
|
||||||
'.q-header > .q-toolbar > :nth-child(1) > .q-btn__content > .q-icon'
|
'.q-header > .q-toolbar > :nth-child(1) > .q-btn__content > .q-icon'
|
||||||
).click();
|
).click();
|
||||||
});
|
});
|
||||||
it.skip('filter', function () {
|
it('filter by flower type', function () {
|
||||||
cy.get('.category-filter > :nth-child(1) > .q-btn__content > .q-icon').click();
|
cy.get('.category-filter > :nth-child(2) > .q-btn__content > .q-icon').click();
|
||||||
cy.selectOption('.list > :nth-child(2)', 'Alstroemeria');
|
cy.selectOption('.list > :nth-child(2)', 'Crisantemo');
|
||||||
cy.get('.q-gutter-x-sm > .q-btn > .q-btn__content > .q-icon').click();
|
cy.get('tr.cursor-pointer').should('have.length', 1);
|
||||||
|
|
||||||
cy.addBtnClick();
|
|
||||||
cy.selectOption(`${firstRow} > :nth-child(2)`, '#13');
|
|
||||||
cy.get(`${firstRow} > :nth-child(4)`).find('input').type(1);
|
|
||||||
cy.get(`${firstRow} > :nth-child(5)`).find('input').type('2');
|
|
||||||
cy.selectOption(`${firstRow} > :nth-child(9)`, 'Warehouse One');
|
|
||||||
cy.get('.q-notification__message').should('have.text', 'Data saved');
|
|
||||||
/* ==== End Cypress Studio ==== */
|
|
||||||
});
|
|
||||||
it.skip('Create and delete ', function () {
|
|
||||||
cy.get('.q-gutter-x-sm > .q-btn > .q-btn__content > .q-icon').click();
|
|
||||||
cy.addBtnClick();
|
|
||||||
cy.selectOption(`${firstRow} > :nth-child(2)`, '#11');
|
|
||||||
cy.get(`${firstRow} > :nth-child(4)`).type('1');
|
|
||||||
cy.get(`${firstRow} > :nth-child(5)`).type('2');
|
|
||||||
cy.selectOption(`${firstRow} > :nth-child(9)`, 'Warehouse One');
|
|
||||||
cy.get('.q-notification__message').should('have.text', 'Data saved');
|
|
||||||
cy.get('.q-gutter-x-sm > .q-btn > .q-btn__content > .q-icon').click();
|
|
||||||
cy.get(`${firstRow} > .text-right > .q-btn > .q-btn__content > .q-icon`).click();
|
|
||||||
cy.get(
|
|
||||||
'.q-card__actions > .q-btn--unelevated > .q-btn__content > .block'
|
|
||||||
).click();
|
|
||||||
cy.get('.q-notification__message').should('have.text', 'Data saved');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it.skip('Massive edit', function () {
|
it('filter by buyer and warehouse', function () {
|
||||||
|
cy.selectOption('.list > :nth-child(4)', 'buyerNick');
|
||||||
|
cy.get('tr.cursor-pointer').should('have.length', 2);
|
||||||
|
cy.selectOption('.list > :nth-child(5)', 'Warehouse Two');
|
||||||
|
cy.get('tr.cursor-pointer').should('have.length', 0);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('filter by date', function () {
|
||||||
|
cy.dataCy('Started_inputDate').type('01/01/2001{enter}');
|
||||||
|
cy.get('tr.cursor-pointer').should('have.length', 2);
|
||||||
|
cy.dataCy('Ended_inputDate').type('01/02/2002{enter}')
|
||||||
|
cy.get('tr.cursor-pointer').should('have.length', 0);
|
||||||
|
|
||||||
|
});
|
||||||
|
it('filter checkbox', function () {
|
||||||
|
cy.get('[aria-label="Has Min Price"] > .q-checkbox__inner').click();
|
||||||
|
cy.get('tr.cursor-pointer').should('have.length', 0);
|
||||||
|
cy.get('[aria-label="Has Min Price"] > .q-checkbox__inner').click();
|
||||||
|
cy.get('tr.cursor-pointer').should('have.length', 2);
|
||||||
|
cy.get('[aria-label="Show future items"] > .q-checkbox__inner').click();
|
||||||
|
cy.get('tr.cursor-pointer').should('have.length', 0);
|
||||||
|
cy.get('[aria-label="Show future items"] > .q-checkbox__inner').click();
|
||||||
|
cy.get('tr.cursor-pointer').should('have.length', 2);
|
||||||
|
cy.get('[aria-label="Mine"] > .q-checkbox__inner').click();
|
||||||
|
cy.get('tr.cursor-pointer').should('have.length', 0);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('Create and delete ', function () {
|
||||||
|
cy.get('.q-gutter-x-sm > .q-btn > .q-btn__content').click();
|
||||||
|
cy.dataCy('vnTableCreateBtn').click();
|
||||||
|
cy.get(':nth-child(2) > [data-col-field="rate2"] > .no-padding > .q-td').type("1{enter}");
|
||||||
|
cy.get('.highlight > [data-col-field="rate3"] > .no-padding > .q-td').type("2{enter}");
|
||||||
|
cy.selectOption('.highlight > [data-col-field="itemFk"]', '#11');
|
||||||
|
cy.get('.highlight > [data-col-field="warehouseFk"]').type('Warehouse One');
|
||||||
|
cy.get('.q-menu .q-item').contains('Warehouse One').click();
|
||||||
|
cy.get('.q-notification__message').should('have.text', 'Data saved');
|
||||||
|
cy.get(':nth-child(3) > .text-right > .q-btn').click();
|
||||||
|
cy.dataCy('VnConfirm_confirm').click();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('Massive edit', function () {
|
||||||
cy.get(' .bg-header > :nth-child(1) > .q-checkbox > .q-checkbox__inner ').click();
|
cy.get(' .bg-header > :nth-child(1) > .q-checkbox > .q-checkbox__inner ').click();
|
||||||
cy.get('#subToolbar > .q-btn--standard').click();
|
cy.get('#subToolbar > .q-btn--standard').click();
|
||||||
cy.selectOption("[data-cy='field-to-edit']", 'Min price');
|
cy.selectOption("[data-cy='field-to-edit']", 'Min price');
|
||||||
cy.dataCy('value-to-edit').find('input').type('1');
|
cy.dataCy('value-to-edit').find('input').type('1');
|
||||||
cy.get('.countLines').should('have.text', ' 1 ');
|
cy.get('.countLines').invoke('text').then(parseFloat).should('be.gte', 1);
|
||||||
cy.get('.q-mt-lg > .q-btn--standard').click();
|
cy.get('.q-mt-lg > .q-btn--standard').click();
|
||||||
cy.get('.q-notification__message').should('have.text', 'Data saved');
|
cy.checkNotification('Data saved');
|
||||||
});
|
});
|
||||||
it.skip('Massive remove', function () {
|
it('Massive remove', function () {
|
||||||
cy.get(' .bg-header > :nth-child(1) > .q-checkbox > .q-checkbox__inner ').click();
|
cy.get(' .bg-header > :nth-child(1) > .q-checkbox > .q-checkbox__inner ').click();
|
||||||
cy.get('#subToolbar > .q-btn--flat').click();
|
cy.get('#subToolbar > .q-btn--flat').click();
|
||||||
cy.get(
|
cy.get(
|
||||||
'.q-card__actions > .q-btn--unelevated > .q-btn__content > .block'
|
'.q-card__actions > .q-btn--unelevated > .q-btn__content > .block'
|
||||||
).click();
|
).click();
|
||||||
cy.get('.q-notification__message').should('have.text', 'Data saved');
|
cy.checkNotification('Data saved');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue
Habeis probado los filtros?
Si, funcionan correctamente