This commit is contained in:
parent
3622eda589
commit
349829e5ed
|
@ -778,8 +778,8 @@ export default {
|
|||
ipt: 'vn-autocomplete[label="Destination IPT"]',
|
||||
tableIpt: 'vn-autocomplete[name="ipt"]',
|
||||
tableFutureIpt: 'vn-autocomplete[name="futureIpt"]',
|
||||
futureState: 'vn-autocomplete[label="Origin Grouped State"]',
|
||||
state: 'vn-autocomplete[label="Destination Grouped State"]',
|
||||
futureState: 'vn-check[label="Pending Origin"]',
|
||||
state: 'vn-check[label="Pending Destination"]',
|
||||
warehouseFk: 'vn-autocomplete[label="Warehouse"]',
|
||||
tableButtonSearch: 'vn-button[vn-tooltip="Search"]',
|
||||
moveButton: 'vn-button[vn-tooltip="Advance tickets"]',
|
||||
|
|
|
@ -50,7 +50,7 @@ describe('Ticket Advance path', () => {
|
|||
await page.waitToClick(selectors.ticketAdvance.openAdvancedSearchButton);
|
||||
await page.autocompleteSearch(selectors.ticketAdvance.ipt, 'Horizontal');
|
||||
await page.waitToClick(selectors.ticketAdvance.submit);
|
||||
await page.waitForNumberOfElements(selectors.ticketAdvance.table, 0);
|
||||
await page.waitForNumberOfElements(selectors.ticketAdvance.table, 1);
|
||||
|
||||
await page.waitToClick(selectors.ticketAdvance.openAdvancedSearchButton);
|
||||
await page.clearInput(selectors.ticketAdvance.ipt);
|
||||
|
@ -62,7 +62,7 @@ describe('Ticket Advance path', () => {
|
|||
await page.waitToClick(selectors.ticketAdvance.openAdvancedSearchButton);
|
||||
await page.autocompleteSearch(selectors.ticketAdvance.futureIpt, 'Horizontal');
|
||||
await page.waitToClick(selectors.ticketAdvance.submit);
|
||||
await page.waitForNumberOfElements(selectors.ticketAdvance.table, 0);
|
||||
await page.waitForNumberOfElements(selectors.ticketAdvance.table, 1);
|
||||
|
||||
await page.waitToClick(selectors.ticketAdvance.openAdvancedSearchButton);
|
||||
await page.clearInput(selectors.ticketAdvance.futureIpt);
|
||||
|
@ -70,26 +70,36 @@ describe('Ticket Advance path', () => {
|
|||
await page.waitForNumberOfElements(selectors.ticketAdvance.table, 1);
|
||||
});
|
||||
|
||||
it('should search with the origin grouped state', async() => {
|
||||
it('should search with the origin pending state', async() => {
|
||||
await page.waitToClick(selectors.ticketAdvance.openAdvancedSearchButton);
|
||||
await page.autocompleteSearch(selectors.ticketAdvance.futureState, 'Free');
|
||||
await page.waitToClick(selectors.ticketAdvance.futureState);
|
||||
await page.waitToClick(selectors.ticketAdvance.submit);
|
||||
await page.waitForNumberOfElements(selectors.ticketAdvance.table, 1);
|
||||
|
||||
await page.waitToClick(selectors.ticketAdvance.openAdvancedSearchButton);
|
||||
await page.clearInput(selectors.ticketAdvance.futureState);
|
||||
await page.waitToClick(selectors.ticketAdvance.futureState);
|
||||
await page.waitToClick(selectors.ticketAdvance.submit);
|
||||
await page.waitForNumberOfElements(selectors.ticketAdvance.table, 0);
|
||||
|
||||
await page.waitToClick(selectors.ticketAdvance.openAdvancedSearchButton);
|
||||
await page.waitToClick(selectors.ticketAdvance.futureState);
|
||||
await page.waitToClick(selectors.ticketAdvance.submit);
|
||||
await page.waitForNumberOfElements(selectors.ticketAdvance.table, 1);
|
||||
});
|
||||
|
||||
it('should search with the destination grouped state', async() => {
|
||||
await page.waitToClick(selectors.ticketAdvance.openAdvancedSearchButton);
|
||||
await page.autocompleteSearch(selectors.ticketAdvance.state, 'Free');
|
||||
await page.waitToClick(selectors.ticketAdvance.state);
|
||||
await page.waitToClick(selectors.ticketAdvance.submit);
|
||||
await page.waitForNumberOfElements(selectors.ticketAdvance.table, 0);
|
||||
|
||||
await page.waitToClick(selectors.ticketAdvance.openAdvancedSearchButton);
|
||||
await page.clearInput(selectors.ticketAdvance.state);
|
||||
await page.waitToClick(selectors.ticketAdvance.state);
|
||||
await page.waitToClick(selectors.ticketAdvance.submit);
|
||||
await page.waitForNumberOfElements(selectors.ticketAdvance.table, 1);
|
||||
|
||||
await page.waitToClick(selectors.ticketAdvance.openAdvancedSearchButton);
|
||||
await page.waitToClick(selectors.ticketAdvance.state);
|
||||
await page.waitToClick(selectors.ticketAdvance.submit);
|
||||
await page.waitForNumberOfElements(selectors.ticketAdvance.table, 1);
|
||||
});
|
||||
|
@ -116,42 +126,7 @@ describe('Ticket Advance path', () => {
|
|||
await page.waitForNumberOfElements(selectors.ticketAdvance.table, 1);
|
||||
});
|
||||
|
||||
it('should search in smart-table with stock', async() => {
|
||||
await page.waitToClick(selectors.ticketAdvance.tableButtonSearch);
|
||||
await page.write(selectors.ticketAdvance.tableStock, '5');
|
||||
await page.waitForNumberOfElements(selectors.ticketAdvance.table, 2);
|
||||
|
||||
await page.waitToClick(selectors.ticketAdvance.tableButtonSearch);
|
||||
await page.waitToClick(selectors.ticketAdvance.openAdvancedSearchButton);
|
||||
await page.waitToClick(selectors.ticketAdvance.submit);
|
||||
await page.waitForNumberOfElements(selectors.ticketAdvance.table, 1);
|
||||
});
|
||||
|
||||
it('should search in smart-table with especified Lines', async() => {
|
||||
await page.waitToClick(selectors.ticketAdvance.tableButtonSearch);
|
||||
await page.write(selectors.ticketAdvance.tableLines, '0');
|
||||
await page.keyboard.press('Enter');
|
||||
await page.waitForNumberOfElements(selectors.ticketAdvance.table, 1);
|
||||
|
||||
await page.waitToClick(selectors.ticketAdvance.tableButtonSearch);
|
||||
await page.waitToClick(selectors.ticketAdvance.openAdvancedSearchButton);
|
||||
await page.waitToClick(selectors.ticketAdvance.submit);
|
||||
await page.waitForNumberOfElements(selectors.ticketAdvance.table, 1);
|
||||
});
|
||||
|
||||
it('should search in smart-table with especified Liters', async() => {
|
||||
await page.waitToClick(selectors.ticketAdvance.tableButtonSearch);
|
||||
await page.write(selectors.ticketAdvance.tableLiters, '0');
|
||||
await page.keyboard.press('Enter');
|
||||
await page.waitForNumberOfElements(selectors.ticketAdvance.table, 1);
|
||||
|
||||
await page.waitToClick(selectors.ticketAdvance.tableButtonSearch);
|
||||
await page.waitToClick(selectors.ticketAdvance.openAdvancedSearchButton);
|
||||
await page.waitToClick(selectors.ticketAdvance.submit);
|
||||
await page.waitForNumberOfElements(selectors.ticketAdvance.table, 1);
|
||||
});
|
||||
|
||||
it('should check the three last tickets and move to the future', async() => {
|
||||
it('should check the one ticket and move to the present', async() => {
|
||||
await page.waitToClick(selectors.ticketAdvance.multiCheck);
|
||||
await page.waitToClick(selectors.ticketAdvance.moveButton);
|
||||
await page.waitToClick(selectors.ticketAdvance.acceptButton);
|
||||
|
|
|
@ -29,7 +29,7 @@ describe('TicketFuture getTicketsAdvance()', () => {
|
|||
}
|
||||
});
|
||||
|
||||
it('should return the tickets matching the origin grouped state', async() => {
|
||||
it('should return the tickets matching the origin pending state', async() => {
|
||||
const tx = await models.Ticket.beginTransaction({});
|
||||
|
||||
try {
|
||||
|
@ -39,7 +39,7 @@ describe('TicketFuture getTicketsAdvance()', () => {
|
|||
dateFuture: tomorrow,
|
||||
dateToAdvance: today,
|
||||
warehouseFk: 1,
|
||||
state: 'OK'
|
||||
futureIsNotValidated: true
|
||||
};
|
||||
|
||||
const ctx = {req: {accessToken: {userId: 9}}, args};
|
||||
|
@ -54,7 +54,7 @@ describe('TicketFuture getTicketsAdvance()', () => {
|
|||
}
|
||||
});
|
||||
|
||||
it('should return the tickets matching the destination grouped state', async() => {
|
||||
it('should return the tickets matching the destination pending state', async() => {
|
||||
const tx = await models.Ticket.beginTransaction({});
|
||||
|
||||
try {
|
||||
|
@ -64,13 +64,13 @@ describe('TicketFuture getTicketsAdvance()', () => {
|
|||
dateFuture: tomorrow,
|
||||
dateToAdvance: today,
|
||||
warehouseFk: 1,
|
||||
futureState: 'FREE'
|
||||
isNotValidated: true
|
||||
};
|
||||
|
||||
const ctx = {req: {accessToken: {userId: 9}}, args};
|
||||
const result = await models.Ticket.getTicketsAdvance(ctx, options);
|
||||
|
||||
expect(result.length).toBeGreaterThan(0);
|
||||
expect(result.length).toEqual(0);
|
||||
|
||||
await tx.rollback();
|
||||
} catch (e) {
|
||||
|
@ -89,7 +89,7 @@ describe('TicketFuture getTicketsAdvance()', () => {
|
|||
dateFuture: tomorrow,
|
||||
dateToAdvance: today,
|
||||
warehouseFk: 1,
|
||||
ipt: 'Vertical'
|
||||
ipt: 'V'
|
||||
};
|
||||
|
||||
const ctx = {req: {accessToken: {userId: 9}}, args};
|
||||
|
@ -114,7 +114,7 @@ describe('TicketFuture getTicketsAdvance()', () => {
|
|||
dateFuture: tomorrow,
|
||||
dateToAdvance: today,
|
||||
warehouseFk: 1,
|
||||
tfIpt: 'Vertical'
|
||||
tfIpt: 'V'
|
||||
};
|
||||
|
||||
const ctx = {req: {accessToken: {userId: 9}}, args};
|
||||
|
|
Loading…
Reference in New Issue