forked from verdnatura/salix-front
chore: refs #7663 create test wip
This commit is contained in:
parent
af5e47ed3e
commit
fc5eb20dba
|
@ -1,12 +1,13 @@
|
||||||
/// <reference types="cypress" />
|
/// <reference types="cypress" />
|
||||||
describe('Ticket descriptor', () => {
|
describe('Ticket descriptor', () => {
|
||||||
const toCloneOpt = '[role="menu"] .q-list > :nth-child(5)';
|
const toCloneOpt = '[role="menu"] .q-list > :nth-child(5)';
|
||||||
|
const setWeightOpt = '[role="menu"] .q-list > :nth-child(6)';
|
||||||
const warehouseValue = ':nth-child(1) > :nth-child(6) > .value > span';
|
const warehouseValue = ':nth-child(1) > :nth-child(6) > .value > span';
|
||||||
const summaryHeader = '.summaryHeader > div';
|
const summaryHeader = '.summaryHeader > div';
|
||||||
|
const weight = 25;
|
||||||
|
const ticketId = 1;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
const ticketId = 1;
|
|
||||||
|
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
cy.visit(`/#/ticket/${ticketId}/summary`);
|
cy.visit(`/#/ticket/${ticketId}/summary`);
|
||||||
});
|
});
|
||||||
|
@ -24,4 +25,21 @@ describe('Ticket descriptor', () => {
|
||||||
cy.wrap(owner.trim()).should('eq', 'Bruce Wayne (1101)');
|
cy.wrap(owner.trim()).should('eq', 'Bruce Wayne (1101)');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should set the weight of the ticket', () => {
|
||||||
|
cy.openLeftMenu();
|
||||||
|
cy.openActionsDescriptor();
|
||||||
|
cy.get(setWeightOpt).click();
|
||||||
|
cy.get('.q-dialog input').type(25);
|
||||||
|
cy.clickConfirm();
|
||||||
|
|
||||||
|
cy.get('.q-notification').should('contain', 'Peso establecido');
|
||||||
|
|
||||||
|
cy.intercept('POST', /\/api\/Tickets\/\d+/).as('worker');
|
||||||
|
cy.wait('@worker').then(() =>
|
||||||
|
cy.get(descriptorTitle).should('include.text', 'Jessica')
|
||||||
|
);
|
||||||
|
|
||||||
|
cy.get('@fetchSpy').should('have.been.called');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue