diff --git a/db/dump/fixtures.sql b/db/dump/fixtures.sql index 8dfd6c8a8..d5bd7d879 100644 --- a/db/dump/fixtures.sql +++ b/db/dump/fixtures.sql @@ -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()); diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index b4720f4c7..e088f5682 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -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', diff --git a/e2e/paths/05-ticket/06_basic_data_steps.spec.js b/e2e/paths/05-ticket/06_basic_data_steps.spec.js index cca63cd6f..af68eefca 100644 --- a/e2e/paths/05-ticket/06_basic_data_steps.spec.js +++ b/e2e/paths/05-ticket/06_basic_data_steps.spec.js @@ -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); }); });