Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into dev
gitea/salix/dev This commit looks good
Details
gitea/salix/dev This commit looks good
Details
This commit is contained in:
commit
3142087c9d
|
@ -144,6 +144,7 @@ let actions = {
|
||||||
waitToGetProperty: function(selector, property, done) {
|
waitToGetProperty: function(selector, property, done) {
|
||||||
this.wait((selector, property) => {
|
this.wait((selector, property) => {
|
||||||
const element = document.querySelector(selector);
|
const element = document.querySelector(selector);
|
||||||
|
|
||||||
return element && element[property] != null && element[property] !== '';
|
return element && element[property] != null && element[property] !== '';
|
||||||
}, selector, property)
|
}, selector, property)
|
||||||
.getProperty(selector, property)
|
.getProperty(selector, property)
|
||||||
|
|
|
@ -601,6 +601,9 @@ export default {
|
||||||
descriptionInput: 'vn-route-create vn-textfield[field="$ctrl.route.description"] input',
|
descriptionInput: 'vn-route-create vn-textfield[field="$ctrl.route.description"] input',
|
||||||
submitButton: 'vn-route-create vn-submit > input[type="submit"]'
|
submitButton: 'vn-route-create vn-submit > input[type="submit"]'
|
||||||
},
|
},
|
||||||
|
routeDescriptor: {
|
||||||
|
volume: 'vn-route-descriptor vn-label-value[label="Volume"] > section > span'
|
||||||
|
},
|
||||||
routeSummary: {
|
routeSummary: {
|
||||||
routeId: 'vn-route-summary > vn-card > div > vn-horizontal > vn-one:nth-child(1) > vn-label-value:nth-child(1) > section > span'
|
routeId: 'vn-route-summary > vn-card > div > vn-horizontal > vn-one:nth-child(1) > vn-label-value:nth-child(1) > section > span'
|
||||||
},
|
},
|
||||||
|
|
|
@ -110,6 +110,13 @@ describe('Ticket descriptor path', () => {
|
||||||
expect(url.hash).toContain('#!/ticket/17/summary');
|
expect(url.hash).toContain('#!/ticket/17/summary');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it(`should check the state of the stowaway ticket is embarked`, async() => {
|
||||||
|
const state = await nightmare
|
||||||
|
.waitToGetProperty(selectors.ticketDescriptor.stateLabelValue, 'innerText');
|
||||||
|
|
||||||
|
expect(state).toEqual('State Embarcando');
|
||||||
|
});
|
||||||
|
|
||||||
it(`should navigate to the ship ticket using the descriptors ship button`, async() => {
|
it(`should navigate to the ship ticket using the descriptors ship button`, async() => {
|
||||||
const url = await nightmare
|
const url = await nightmare
|
||||||
.waitToClick(selectors.ticketDescriptor.shipButton)
|
.waitToClick(selectors.ticketDescriptor.shipButton)
|
||||||
|
|
|
@ -79,6 +79,13 @@ describe('Route basic Data path', () => {
|
||||||
expect(result).toBeFalsy();
|
expect(result).toBeFalsy();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should check the route volume on the descriptor', async() => {
|
||||||
|
const result = await nightmare
|
||||||
|
.waitToGetProperty(selectors.routeDescriptor.volume, 'innerText');
|
||||||
|
|
||||||
|
expect(result).toEqual('0.9 / 50 m³');
|
||||||
|
});
|
||||||
|
|
||||||
it('should count how many tickets are in route', async() => {
|
it('should count how many tickets are in route', async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.countElement('vn-route-tickets vn-textfield[model="ticket.priority"]');
|
.countElement('vn-route-tickets vn-textfield[model="ticket.priority"]');
|
||||||
|
@ -101,4 +108,11 @@ describe('Route basic Data path', () => {
|
||||||
|
|
||||||
expect(result).toEqual(2);
|
expect(result).toEqual(2);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should confirm the route volume on the descriptor has been updated by the changes made', async() => {
|
||||||
|
const result = await nightmare
|
||||||
|
.waitToGetProperty(selectors.routeDescriptor.volume, 'innerText');
|
||||||
|
|
||||||
|
expect(result).toEqual('0.7 / 50 m³');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue