salix-front/test/cypress/integration/item/ItemFixedPrice.spec.js

36 lines
1.4 KiB
JavaScript
Raw Normal View History

2024-10-02 20:50:57 +00:00
/// <reference types="cypress" />
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');
});
2024-10-02 20:50:57 +00:00
it('Create and delete', function () {
2024-10-02 20:49:26 +00:00
cy.get(
'.q-header > .q-toolbar > :nth-child(1) > .q-btn__content > .q-icon'
).click();
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(
'.q-virtual-scroll__content > :nth-child(2) > :nth-child(1)',
'#15'
);
cy.get('.q-virtual-scroll__content > :nth-child(2) > :nth-child(3)').type('1');
cy.get('.q-virtual-scroll__content > :nth-child(2) > :nth-child(4)').type('2');
cy.selectOption(
'.q-virtual-scroll__content > :nth-child(2) > :nth-child(8)',
'Warehouse One'
);
cy.get('.q-notification__message').should('have.text', 'Data saved');
cy.get(
'.q-virtual-scroll__content > :nth-child(2) > .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');
});
});