#777 e2e item.log

This commit is contained in:
Carlos Jimenez Ruiz 2019-03-20 11:47:00 +01:00
parent 9ef74bbf7a
commit c13dba24b9
2 changed files with 10 additions and 11 deletions

View File

@ -293,8 +293,8 @@ export default {
warehouseAutocomplete: 'vn-item-diary vn-autocomplete[field="$ctrl.warehouseFk"]', warehouseAutocomplete: 'vn-item-diary vn-autocomplete[field="$ctrl.warehouseFk"]',
}, },
itemLog: { itemLog: {
firstLineCreatedProperty: 'vn-item-log > vn-log vn-tbody > vn-tr:nth-child(1) > vn-td > vn-one:nth-child(3) > div span:nth-child(3)', fourthLineCreatedProperty: 'vn-item-log > vn-log vn-tbody > vn-tr:nth-child(4) > vn-td > vn-one:nth-child(3) > div span:nth-child(3)',
thirdLineCreatedProperty: 'vn-item-log > vn-log vn-tbody > vn-tr:nth-child(4) > vn-td > vn-one:nth-child(3) > div span:nth-child(3)', fifthLineCreatedProperty: 'vn-item-log > vn-log vn-tbody > vn-tr:nth-child(5) > vn-td > vn-one:nth-child(3) > div span:nth-child(3)',
}, },
ticketSummary: { ticketSummary: {
sale: 'vn-ticket-summary [name="sales"] vn-table > div > vn-tbody > vn-tr', sale: 'vn-ticket-summary [name="sales"] vn-table > div > vn-tbody > vn-tr',

View File

@ -1,8 +1,7 @@
import selectors from '../../helpers/selectors.js'; import selectors from '../../helpers/selectors.js';
import createNightmare from '../../helpers/nightmare'; import createNightmare from '../../helpers/nightmare';
// #777 e2e item.log describe('Item log path', () => {
xdescribe('Item log path', () => {
const nightmare = createNightmare(); const nightmare = createNightmare();
beforeAll(() => { beforeAll(() => {
nightmare nightmare
@ -54,20 +53,20 @@ xdescribe('Item log path', () => {
const url = await nightmare const url = await nightmare
.accessToSearchResult('Knowledge artifact') .accessToSearchResult('Knowledge artifact')
.accessToSection('item.card.log') .accessToSection('item.card.log')
.wait(selectors.itemLog.firstLineCreatedProperty) .waitForURL('/log')
.parsedUrl(); .parsedUrl();
expect(url.hash).toContain('/log'); expect(url.hash).toContain('/log');
}); });
it(`should search for the created item and navigate to it's log section`, async() => { it(`should search for the created item and navigate to it's log section`, async() => {
const firstLineCreatedProperty = await nightmare const fourthLineCreatedProperty = await nightmare
.waitToGetProperty(selectors.itemLog.firstLineCreatedProperty, 'innerText'); .waitToGetProperty(selectors.itemLog.fourthLineCreatedProperty, 'innerText');
const thirdLineCreatedProperty = await nightmare const fifthLineCreatedProperty = await nightmare
.waitToGetProperty(selectors.itemLog.thirdLineCreatedProperty, 'innerText'); .waitToGetProperty(selectors.itemLog.fifthLineCreatedProperty, 'innerText');
expect(firstLineCreatedProperty).toContain('Knoledge artifact'); expect(fourthLineCreatedProperty).toEqual('Knowledge artifact');
expect(thirdLineCreatedProperty).toContain('nos e que'); expect(fifthLineCreatedProperty).toEqual('5080000');
}); });
}); });