3430-ticket_step-two ticket without negatives #823

Merged
joan merged 31 commits from 3430-ticket_step-two into dev 2022-02-01 08:34:41 +00:00
3 changed files with 7 additions and 7 deletions
Showing only changes of commit 67dc5c2cbc - Show all commits

View File

@ -669,7 +669,6 @@ INSERT INTO `vn`.`ticketTracking`(`ticketFk`, `stateFk`, `workerFk`, `created`)
(24, 16, 21, NOW()),
(27, 3, 21, NOW());
INSERT INTO `vn`.`stowaway`(`id`, `shipFk`, `created`)
VALUES
(12, 13, CURDATE());

View File

@ -563,7 +563,6 @@ export default {
transferQuantityInput: '.vn-popover.shown vn-table > div > vn-tbody > vn-tr > vn-td-editable > span > text',
transferQuantityCell: '.vn-popover.shown vn-table > div > vn-tbody > vn-tr > vn-td-editable',
firstSaleId: 'vn-ticket-sale vn-tbody > vn-tr:nth-child(1) > vn-td:nth-child(6) > span',
firstSaleText: 'vn-table div > vn-tbody > vn-tr:nth-child(1)',
firstSaleClaimIcon: 'vn-ticket-sale vn-table vn-tbody > vn-tr:nth-child(1) vn-icon[icon="icon-claims"]',
firstSaleDescriptorImage: '.vn-popover.shown vn-item-descriptor img',
firstSaleThumbnailImage: 'vn-ticket-sale:nth-child(1) vn-tr:nth-child(1) vn-td:nth-child(3) > img',

View File

@ -8,7 +8,7 @@ describe('Ticket Edit basic data path', () => {
beforeAll(async() => {
browser = await getBrowser();
page = browser.page;
await page.loginAndModule('employee', 'ticket');
await page.loginAndModule('employee', 'ticket');
await page.accessToSearchResult('11');
await page.accessToSection('ticket.card.basicData.stepOne');
});
@ -95,7 +95,7 @@ describe('Ticket Edit basic data path', () => {
const tomorrow = new Date();
tomorrow.setDate(tomorrow.getDate() + 1);
await page.accessToSearchResult('14');
await page.accessToSearchResult('27');
await page.accessToSection('ticket.card.basicData.stepOne');
const originalDate = await page
@ -105,6 +105,7 @@ describe('Ticket Edit basic data path', () => {
await page.autocompleteSearch(selectors.ticketBasicData.agency, 'Silla247');
await page.pickDate(selectors.ticketBasicData.shipped, tomorrow);
await page.waitToClick(selectors.ticketBasicData.nextStepButton);
await page.waitToClick(selectors.ticketBasicData.withoutNegatives);
@ -122,6 +123,7 @@ describe('Ticket Edit basic data path', () => {
it(`should new ticket have one line from splited ticket`, async() => {
const tomorrow = new Date();
tomorrow.setDate(tomorrow.getDate() + 1);
const expectedDay = tomorrow.getDate();
const expectedMonth = tomorrow.getMonth() + 1;
const expectedYear = tomorrow.getFullYear();
@ -140,8 +142,8 @@ describe('Ticket Edit basic data path', () => {
expect(item).toEqual('4');
expect(agency).toEqual('Silla247');
expect(date[0]).toContain(expectedDay);
expect(date[1]).toContain(expectedMonth);
expect(date[2]).toContain(expectedYear);
expect(parseInt(date[0])).toEqual(expectedDay);
expect(parseInt(date[1])).toEqual(expectedMonth);
expect(parseInt(date[2])).toEqual(expectedYear);
});
});