#6321 - Negative ticket #158
|
@ -40,12 +40,10 @@ describe('Ticket Lack detail', () => {
|
||||||
}).as('getItemLack'); // and assign an alias
|
}).as('getItemLack'); // and assign an alias
|
||||||
|
|
||||||
cy.visit('/#/ticket/negative/5');
|
cy.visit('/#/ticket/negative/5');
|
||||||
|
cy.wait('@getItemLack');
|
||||||
});
|
});
|
||||||
describe('Table actions', () => {
|
describe('Table actions', () => {
|
||||||
it('should display only one row in the lack list', () => {
|
it.skip('should display only one row in the lack list', () => {
|
||||||
cy.visit('/#/ticket/negative/5');
|
|
||||||
|
|
||||||
cy.wait('@getItemLack');
|
|
||||||
cy.location('href').should('contain', '#/ticket/negative/5');
|
cy.location('href').should('contain', '#/ticket/negative/5');
|
||||||
|
|
||||||
cy.get('[data-cy="changeItem"]').should('be.disabled');
|
cy.get('[data-cy="changeItem"]').should('be.disabled');
|
||||||
|
@ -63,23 +61,118 @@ describe('Ticket Lack detail', () => {
|
||||||
cy.get('[data-cy="transferLines"]').should('be.enabled');
|
cy.get('[data-cy="transferLines"]').should('be.enabled');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
describe('Update quantity', () => {
|
describe.skip('Update quantity', () => {
|
||||||
it('Update from popover', () => {});
|
it('Update from popover', () => {});
|
||||||
it('Update from table', () => {});
|
it('Update from table', () => {});
|
||||||
});
|
});
|
||||||
describe('Update state', () => {
|
describe.skip('Update state', () => {
|
||||||
it('Update from popover', () => {});
|
it('Update from popover', () => {});
|
||||||
it('Update from table', () => {});
|
it('Update from table', () => {});
|
||||||
});
|
});
|
||||||
describe('Ticket transfer', () => {
|
describe.skip('Ticket transfer', () => {
|
||||||
describe('Split ticket if ', () => {
|
describe('Split ticket if ', () => {
|
||||||
it('Ticket has less or equal than 1 row', () => {});
|
it('Ticket has less or equal than 1 row', () => {});
|
||||||
it('Ticket has more than 1 row', () => {});
|
it('Ticket has more than 1 row', () => {});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
describe('Item proposal', () => {
|
describe.only('Item proposal', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
cy.get('tr.cursor-pointer > :nth-child(1)').click();
|
||||||
|
|
||||||
|
cy.intercept('GET', /\/api\/Items\/getSimilar\?.*$/, {
|
||||||
|
statusCode: 200,
|
||||||
|
body: [
|
||||||
|
{
|
||||||
|
id: 1,
|
||||||
|
longName: 'Ranged weapon longbow 50cm',
|
||||||
|
subName: 'Stark Industries',
|
||||||
|
tag5: 'Color',
|
||||||
|
value5: 'Brown',
|
||||||
|
match5: 0,
|
||||||
|
match6: 0,
|
||||||
|
match7: 0,
|
||||||
|
match8: 1,
|
||||||
|
tag6: 'Categoria',
|
||||||
|
value6: '+1 precission',
|
||||||
|
tag7: 'Tallos',
|
||||||
|
value7: '1',
|
||||||
|
tag8: null,
|
||||||
|
value8: null,
|
||||||
|
available: 20,
|
||||||
|
calc_id: 6,
|
||||||
|
counter: 0,
|
||||||
|
minQuantity: 1,
|
||||||
|
visible: null,
|
||||||
|
price2: 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 2,
|
||||||
|
longName: 'Ranged weapon longbow 100cm',
|
||||||
|
subName: 'Stark Industries',
|
||||||
|
tag5: 'Color',
|
||||||
|
value5: 'Brown',
|
||||||
|
match5: 0,
|
||||||
|
match6: 1,
|
||||||
|
match7: 0,
|
||||||
|
match8: 1,
|
||||||
|
tag6: 'Categoria',
|
||||||
|
value6: '+1 precission',
|
||||||
|
tag7: 'Tallos',
|
||||||
|
value7: '1',
|
||||||
|
tag8: null,
|
||||||
|
value8: null,
|
||||||
|
available: 50,
|
||||||
|
calc_id: 6,
|
||||||
|
counter: 1,
|
||||||
|
minQuantity: 5,
|
||||||
|
visible: null,
|
||||||
|
price2: 10,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 3,
|
||||||
|
longName: 'Ranged weapon longbow 200cm',
|
||||||
|
subName: 'Stark Industries',
|
||||||
|
tag5: 'Color',
|
||||||
|
value5: 'Brown',
|
||||||
|
match5: 1,
|
||||||
|
match6: 1,
|
||||||
|
match7: 1,
|
||||||
|
match8: 1,
|
||||||
|
tag6: 'Categoria',
|
||||||
|
value6: '+1 precission',
|
||||||
|
tag7: 'Tallos',
|
||||||
|
value7: '1',
|
||||||
|
tag8: null,
|
||||||
|
value8: null,
|
||||||
|
available: 185,
|
||||||
|
calc_id: 6,
|
||||||
|
counter: 10,
|
||||||
|
minQuantity: 10,
|
||||||
|
visible: null,
|
||||||
|
price2: 100,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}).as('getItemGetSimilar');
|
||||||
|
cy.get('[data-cy="itemProposal"]').click();
|
||||||
|
cy.wait('@getItemGetSimilar');
|
||||||
|
});
|
||||||
describe('Replace item if', () => {
|
describe('Replace item if', () => {
|
||||||
it('Quantity is less than available', () => {});
|
it.only('Quantity is less than available', () => {
|
||||||
|
/* ==== Generated with Cypress Studio ==== */
|
||||||
|
cy.get(
|
||||||
|
':nth-child(2) > .text-left > .q-td > [data-cy="replaceBtn"]',
|
||||||
|
).should('not.have.class', 'fill-icon');
|
||||||
|
cy.get(
|
||||||
|
':nth-child(2) > .text-left > .q-td > [data-cy="replaceBtn"] > .q-btn__content > .q-icon',
|
||||||
|
).click();
|
||||||
|
cy.get(
|
||||||
|
':nth-child(2) > .text-left > .q-td > [data-cy="replaceBtn"]',
|
||||||
|
).should('have.class', 'fill-icon');
|
||||||
|
cy.get(
|
||||||
|
':nth-child(2) > .text-left > .q-td > [data-cy="replaceBtn"] > .q-btn__content > .q-icon',
|
||||||
|
).click();
|
||||||
|
/* ==== End Cypress Studio ==== */
|
||||||
|
});
|
||||||
it('Quantity is equal than available', () => {});
|
it('Quantity is equal than available', () => {});
|
||||||
it('Quantity is more than available', () => {});
|
it('Quantity is more than available', () => {});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue