2024-10-02 20:50:57 +00:00
|
|
|
/// <reference types="cypress" />
|
2024-11-17 15:27:05 +00:00
|
|
|
function goTo(n = 1) {
|
|
|
|
return `.q-virtual-scroll__content > :nth-child(${n})`;
|
|
|
|
}
|
|
|
|
const firstRow = goTo();
|
|
|
|
`.q-virtual-scroll__content > :nth-child(2)`;
|
2024-10-02 20:50:57 +00:00
|
|
|
describe('Handle Items FixedPrice', () => {
|
2024-10-02 20:49:26 +00:00
|
|
|
beforeEach(() => {
|
|
|
|
cy.viewport(1280, 720);
|
|
|
|
cy.login('developer');
|
|
|
|
cy.visit('/#/item/fixed-price', { timeout: 5000 });
|
|
|
|
cy.waitForElement('.q-table');
|
|
|
|
cy.get(
|
|
|
|
'.q-header > .q-toolbar > :nth-child(1) > .q-btn__content > .q-icon'
|
|
|
|
).click();
|
2024-11-17 15:27:05 +00:00
|
|
|
});
|
|
|
|
it('filter', function () {
|
|
|
|
cy.get('.category-filter > :nth-child(1) > .q-btn__content > .q-icon').click();
|
|
|
|
cy.selectOption('.list > :nth-child(2)', 'Alstroemeria');
|
2024-10-02 20:49:26 +00:00
|
|
|
cy.get('.q-gutter-x-sm > .q-btn > .q-btn__content > .q-icon').click();
|
2024-11-17 15:27:05 +00:00
|
|
|
|
2024-10-02 20:49:26 +00:00
|
|
|
cy.get('.q-page-sticky > div > .q-btn > .q-btn__content > .q-icon').click();
|
2024-11-17 15:27:05 +00:00
|
|
|
cy.selectOption(`${firstRow} > :nth-child(2)`, '#13');
|
|
|
|
cy.get(`${firstRow} > :nth-child(4)`).type('1');
|
|
|
|
cy.get(`${firstRow} > :nth-child(5)`).type('2');
|
|
|
|
cy.selectOption(`${firstRow} > :nth-child(9)`, 'Warehouse One');
|
2024-10-02 20:49:26 +00:00
|
|
|
cy.get('.q-notification__message').should('have.text', 'Data saved');
|
2024-11-17 15:27:05 +00:00
|
|
|
/* ==== End Cypress Studio ==== */
|
|
|
|
});
|
|
|
|
it('Create and delete ', function () {
|
|
|
|
cy.get('.q-gutter-x-sm > .q-btn > .q-btn__content > .q-icon').click();
|
|
|
|
cy.get('.q-page-sticky > div > .q-btn > .q-btn__content > .q-icon').click();
|
|
|
|
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();
|
2024-10-02 20:49:26 +00:00
|
|
|
cy.get(
|
2024-11-17 15:27:05 +00:00
|
|
|
'.q-card__actions > .q-btn--unelevated > .q-btn__content > .block'
|
2024-10-02 20:49:26 +00:00
|
|
|
).click();
|
2024-11-17 15:27:05 +00:00
|
|
|
cy.get('.q-notification__message').should('have.text', 'Data saved');
|
|
|
|
});
|
|
|
|
|
|
|
|
it('Massive edit', function () {
|
|
|
|
cy.get(' .bg-header > :nth-child(1) > .q-checkbox > .q-checkbox__inner ').click();
|
|
|
|
cy.get('#subToolbar > .q-btn--standard').click();
|
|
|
|
cy.selectOption('.vn-row > :nth-child(2)', 'Min price');
|
|
|
|
cy.get('.vn-row > :nth-child(3)').type('1');
|
|
|
|
cy.get('.countLines').should('have.text', ' 1 ');
|
|
|
|
cy.get('.q-mt-lg > .q-btn--standard').click();
|
|
|
|
cy.get('.q-notification__message').should('have.text', 'Data saved');
|
|
|
|
});
|
|
|
|
it('Massive remove', function () {
|
|
|
|
cy.get(' .bg-header > :nth-child(1) > .q-checkbox > .q-checkbox__inner ').click();
|
|
|
|
cy.get('#subToolbar > .q-btn--flat').click();
|
2024-10-02 20:49:26 +00:00
|
|
|
cy.get(
|
|
|
|
'.q-card__actions > .q-btn--unelevated > .q-btn__content > .block'
|
|
|
|
).click();
|
|
|
|
cy.get('.q-notification__message').should('have.text', 'Data saved');
|
|
|
|
});
|
|
|
|
});
|