#759 e2e ticket component
This commit is contained in:
parent
cacfa3988e
commit
11787ec2e1
|
@ -1,47 +1,49 @@
|
||||||
|
/* eslint no-invalid-this: "off" */
|
||||||
|
|
||||||
import config from './config.js';
|
import config from './config.js';
|
||||||
import Nightmare from 'nightmare';
|
import Nightmare from 'nightmare';
|
||||||
import {URL} from 'url';
|
import {URL} from 'url';
|
||||||
|
|
||||||
Nightmare.action('login', function(userName, done) {
|
Nightmare.action('login', function(userName, done) {
|
||||||
this.goto(`${config.url}auth/?apiKey=salix`)
|
this.goto(`${config.url}auth/?apiKey=salix`)
|
||||||
.wait(`vn-login input[name=user]`)
|
.wait(`vn-login input[name=user]`)
|
||||||
.write(`vn-login input[name=user]`, userName)
|
.write(`vn-login input[name=user]`, userName)
|
||||||
.write(`vn-login input[name=password]`, 'nightmare')
|
.write(`vn-login input[name=password]`, 'nightmare')
|
||||||
.click(`vn-login input[type=submit]`)
|
.click(`vn-login input[type=submit]`)
|
||||||
// FIXME: Wait for dom to be ready: https://github.com/segmentio/nightmare/issues/481
|
// FIXME: Wait for dom to be ready: https://github.com/segmentio/nightmare/issues/481
|
||||||
.wait(1000)
|
.wait(1000)
|
||||||
.then(done);
|
.then(done);
|
||||||
});
|
});
|
||||||
|
|
||||||
Nightmare.action('changeLanguageToEnglish', function(done) {
|
Nightmare.action('changeLanguageToEnglish', function(done) {
|
||||||
this.wait('#lang')
|
this.wait('#lang')
|
||||||
.evaluate(selector => {
|
.evaluate((selector) => {
|
||||||
return document.querySelector(selector).title;
|
return document.querySelector(selector).title;
|
||||||
}, '#lang')
|
}, '#lang')
|
||||||
.then(title => {
|
.then((title) => {
|
||||||
if (title === 'Change language') {
|
if (title === 'Change language') {
|
||||||
this.then(done);
|
this.then(done);
|
||||||
} else {
|
} else {
|
||||||
this.click('#lang')
|
this.click('#lang')
|
||||||
.click('vn-main-menu [vn-id="langs-menu"] ul > li[name="en"]')
|
.click('vn-main-menu [vn-id="langs-menu"] ul > li[name="en"]')
|
||||||
.then(done);
|
.then(done);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
Nightmare.action('waitForLogin', function(userName, done) {
|
Nightmare.action('waitForLogin', function(userName, done) {
|
||||||
this.login(userName)
|
this.login(userName)
|
||||||
.waitForURL('#!/')
|
.waitForURL('#!/')
|
||||||
.url()
|
.url()
|
||||||
.changeLanguageToEnglish()
|
.changeLanguageToEnglish()
|
||||||
.then(done);
|
.then(done);
|
||||||
});
|
});
|
||||||
|
|
||||||
Nightmare.action('parsedUrl', function(done) {
|
Nightmare.action('parsedUrl', function(done) {
|
||||||
this.url()
|
this.url()
|
||||||
.then(url => {
|
.then((url) => {
|
||||||
done(null, new URL(url));
|
done(null, new URL(url));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
Nightmare.action('getProperty', function(selector, property, done) {
|
Nightmare.action('getProperty', function(selector, property, done) {
|
||||||
|
@ -50,107 +52,116 @@ Nightmare.action('getProperty', function(selector, property, done) {
|
||||||
}, done, selector, property);
|
}, done, selector, property);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Nightmare.action('waitPropertyLength', function(selector, property, minLength, done) {
|
||||||
|
this.wait((selector, property, minLength) => {
|
||||||
|
const element = document.querySelector(selector);
|
||||||
|
return element && element[property] != null && element[property] !== '' && element[property].length >= minLength;
|
||||||
|
}, selector, property, minLength)
|
||||||
|
.getProperty(selector, property)
|
||||||
|
.then((result) => done(null, result), done);
|
||||||
|
});
|
||||||
|
|
||||||
Nightmare.action('waitProperty', function(selector, property, done) {
|
Nightmare.action('waitProperty', function(selector, property, done) {
|
||||||
this.wait((selector, property) => {
|
this.wait((selector, property) => {
|
||||||
let 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)
|
||||||
.then(result => done(null, result), done);
|
.then((result) => done(null, result), done);
|
||||||
});
|
});
|
||||||
|
|
||||||
Nightmare.action('getInnerText', function(selector, done) {
|
Nightmare.action('getInnerText', function(selector, done) {
|
||||||
this.wait(selector)
|
this.wait(selector)
|
||||||
.evaluate_now(function(elementToSelect) {
|
.evaluate_now(function(elementToSelect) {
|
||||||
return document.querySelector(elementToSelect).innerText;
|
return document.querySelector(elementToSelect).innerText;
|
||||||
}, done, selector);
|
}, done, selector);
|
||||||
});
|
});
|
||||||
|
|
||||||
Nightmare.action('getInputValue', function(selector, done) {
|
Nightmare.action('getInputValue', function(selector, done) {
|
||||||
this.wait(selector)
|
this.wait(selector)
|
||||||
.evaluate_now(function(elementToSelect) {
|
.evaluate_now(function(elementToSelect) {
|
||||||
return document.querySelector(elementToSelect).value;
|
return document.querySelector(elementToSelect).value;
|
||||||
}, done, selector);
|
}, done, selector);
|
||||||
});
|
});
|
||||||
|
|
||||||
Nightmare.action('clearInput', function(selector, done) {
|
Nightmare.action('clearInput', function(selector, done) {
|
||||||
let backSpaces = [];
|
const backSpaces = [];
|
||||||
for (let i = 0; i < 50; i += 1) {
|
for (let i = 0; i < 50; i += 1) {
|
||||||
backSpaces.push('\u0008');
|
backSpaces.push('\u0008');
|
||||||
}
|
}
|
||||||
this.wait(selector)
|
this.wait(selector)
|
||||||
.type(selector, backSpaces.join(''))
|
.type(selector, backSpaces.join(''))
|
||||||
.then(done);
|
.then(done);
|
||||||
});
|
});
|
||||||
|
|
||||||
Nightmare.action('write', function(selector, text, done) {
|
Nightmare.action('write', function(selector, text, done) {
|
||||||
this.wait(selector)
|
this.wait(selector)
|
||||||
.type(selector, text)
|
.type(selector, text)
|
||||||
.then(done);
|
.then(done);
|
||||||
});
|
});
|
||||||
|
|
||||||
Nightmare.action('waitToClick', function(selector, done) {
|
Nightmare.action('waitToClick', function(selector, done) {
|
||||||
this.wait(selector)
|
this.wait(selector)
|
||||||
.click(selector)
|
.click(selector)
|
||||||
.then(done);
|
.then(done);
|
||||||
});
|
});
|
||||||
|
|
||||||
Nightmare.action('isVisible', function(selector, done) {
|
Nightmare.action('isVisible', function(selector, done) {
|
||||||
this.wait(selector)
|
this.wait(selector)
|
||||||
.evaluate_now(elementSelector => {
|
.evaluate_now((elementSelector) => {
|
||||||
const selectorMatches = document.querySelectorAll(elementSelector);
|
const selectorMatches = document.querySelectorAll(elementSelector);
|
||||||
const element = selectorMatches[0];
|
const element = selectorMatches[0];
|
||||||
if (selectorMatches.length > 1) {
|
if (selectorMatches.length > 1) {
|
||||||
throw new Error(`multiple matches of ${elementSelector} found`);
|
throw new Error(`multiple matches of ${elementSelector} found`);
|
||||||
}
|
|
||||||
let isVisible = false;
|
|
||||||
if (element) {
|
|
||||||
const eventHandler = event => {
|
|
||||||
event.preventDefault();
|
|
||||||
isVisible = true;
|
|
||||||
};
|
|
||||||
element.addEventListener('mouseover', eventHandler);
|
|
||||||
const elementBoundaries = element.getBoundingClientRect();
|
|
||||||
const x = elementBoundaries.left + element.offsetWidth / 2;
|
|
||||||
const y = elementBoundaries.top + element.offsetHeight / 2;
|
|
||||||
const elementInCenter = document.elementFromPoint(x, y);
|
|
||||||
const elementInTopLeft = document.elementFromPoint(elementBoundaries.left, elementBoundaries.top);
|
|
||||||
const elementInBottomRight = document.elementFromPoint(elementBoundaries.right, elementBoundaries.bottom);
|
|
||||||
const e = new MouseEvent('mouseover', {
|
|
||||||
view: window,
|
|
||||||
bubbles: true,
|
|
||||||
cancelable: true
|
|
||||||
});
|
|
||||||
if (elementInCenter) {
|
|
||||||
elementInCenter.dispatchEvent(e);
|
|
||||||
}
|
}
|
||||||
if (elementInTopLeft) {
|
let isVisible = false;
|
||||||
elementInTopLeft.dispatchEvent(e);
|
if (element) {
|
||||||
|
const eventHandler = (event) => {
|
||||||
|
event.preventDefault();
|
||||||
|
isVisible = true;
|
||||||
|
};
|
||||||
|
element.addEventListener('mouseover', eventHandler);
|
||||||
|
const elementBoundaries = element.getBoundingClientRect();
|
||||||
|
const x = elementBoundaries.left + element.offsetWidth / 2;
|
||||||
|
const y = elementBoundaries.top + element.offsetHeight / 2;
|
||||||
|
const elementInCenter = document.elementFromPoint(x, y);
|
||||||
|
const elementInTopLeft = document.elementFromPoint(elementBoundaries.left, elementBoundaries.top);
|
||||||
|
const elementInBottomRight = document.elementFromPoint(elementBoundaries.right, elementBoundaries.bottom);
|
||||||
|
const e = new MouseEvent('mouseover', {
|
||||||
|
view: window,
|
||||||
|
bubbles: true,
|
||||||
|
cancelable: true,
|
||||||
|
});
|
||||||
|
if (elementInCenter) {
|
||||||
|
elementInCenter.dispatchEvent(e);
|
||||||
|
}
|
||||||
|
if (elementInTopLeft) {
|
||||||
|
elementInTopLeft.dispatchEvent(e);
|
||||||
|
}
|
||||||
|
if (elementInBottomRight) {
|
||||||
|
elementInBottomRight.dispatchEvent(e);
|
||||||
|
}
|
||||||
|
element.removeEventListener('mouseover', eventHandler);
|
||||||
}
|
}
|
||||||
if (elementInBottomRight) {
|
return isVisible;
|
||||||
elementInBottomRight.dispatchEvent(e);
|
}, done, selector);
|
||||||
}
|
|
||||||
element.removeEventListener('mouseover', eventHandler);
|
|
||||||
}
|
|
||||||
return isVisible;
|
|
||||||
}, done, selector);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
Nightmare.action('selectText', function(selector, done) {
|
Nightmare.action('selectText', function(selector, done) {
|
||||||
this.wait(selector)
|
this.wait(selector)
|
||||||
.evaluate(elementToSelect => {
|
.evaluate((elementToSelect) => {
|
||||||
const range = document.createRange();
|
const range = document.createRange();
|
||||||
range.selectNodeContents(document.querySelector(elementToSelect));
|
range.selectNodeContents(document.querySelector(elementToSelect));
|
||||||
const sel = window.getSelection();
|
const sel = window.getSelection();
|
||||||
sel.removeAllRanges();
|
sel.removeAllRanges();
|
||||||
sel.addRange(range);
|
sel.addRange(range);
|
||||||
}, selector)
|
}, selector)
|
||||||
.mouseup(selector)
|
.mouseup(selector)
|
||||||
.then(done);
|
.then(done);
|
||||||
});
|
});
|
||||||
|
|
||||||
Nightmare.action('countElement', function(selector, done) {
|
Nightmare.action('countElement', function(selector, done) {
|
||||||
this.evaluate_now(selector => {
|
this.evaluate_now((selector) => {
|
||||||
return document.querySelectorAll(selector).length;
|
return document.querySelectorAll(selector).length;
|
||||||
}, done, selector);
|
}, done, selector);
|
||||||
});
|
});
|
||||||
|
@ -159,103 +170,103 @@ Nightmare.action('waitForNumberOfElements', function(selector, count, done) {
|
||||||
this.wait((resultSelector, expectedCount) => {
|
this.wait((resultSelector, expectedCount) => {
|
||||||
return document.querySelectorAll(resultSelector).length === expectedCount;
|
return document.querySelectorAll(resultSelector).length === expectedCount;
|
||||||
}, selector, count)
|
}, selector, count)
|
||||||
.then(done);
|
.then(done);
|
||||||
});
|
});
|
||||||
|
|
||||||
Nightmare.action('waitForClassNotPresent', function(selector, className, done) {
|
Nightmare.action('waitForClassNotPresent', function(selector, className, done) {
|
||||||
this.wait(selector)
|
this.wait(selector)
|
||||||
.wait((resultSelector, targetClass) => {
|
.wait((resultSelector, targetClass) => {
|
||||||
if (!document.querySelector(resultSelector).classList.contains(targetClass)) {
|
if (!document.querySelector(resultSelector).classList.contains(targetClass)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}, selector, className)
|
}, selector, className)
|
||||||
.then(done);
|
.then(done);
|
||||||
});
|
});
|
||||||
|
|
||||||
Nightmare.action('waitForClassPresent', function(selector, className, done) {
|
Nightmare.action('waitForClassPresent', function(selector, className, done) {
|
||||||
this.wait(selector)
|
this.wait(selector)
|
||||||
.wait((resultSelector, targetClass) => {
|
.wait((resultSelector, targetClass) => {
|
||||||
if (document.querySelector(resultSelector).classList.contains(targetClass)) {
|
if (document.querySelector(resultSelector).classList.contains(targetClass)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}, selector, className)
|
}, selector, className)
|
||||||
.then(done);
|
.then(done);
|
||||||
});
|
});
|
||||||
|
|
||||||
Nightmare.action('waitForTextInElement', function(selector, name, done) {
|
Nightmare.action('waitForTextInElement', function(selector, name, done) {
|
||||||
this.wait(selector)
|
this.wait(selector)
|
||||||
.wait((resultSelector, expectedText) => {
|
.wait((resultSelector, expectedText) => {
|
||||||
return document.querySelector(resultSelector).innerText.toLowerCase().includes(expectedText.toLowerCase());
|
return document.querySelector(resultSelector).innerText.toLowerCase().includes(expectedText.toLowerCase());
|
||||||
}, selector, name)
|
}, selector, name)
|
||||||
.then(done);
|
.then(done);
|
||||||
});
|
});
|
||||||
|
|
||||||
Nightmare.action('waitForTextInInput', function(selector, name, done) {
|
Nightmare.action('waitForTextInInput', function(selector, name, done) {
|
||||||
this.wait(selector)
|
this.wait(selector)
|
||||||
.wait((resultSelector, expectedText) => {
|
.wait((resultSelector, expectedText) => {
|
||||||
return document.querySelector(resultSelector).value.toLowerCase().includes(expectedText.toLowerCase());
|
return document.querySelector(resultSelector).value.toLowerCase().includes(expectedText.toLowerCase());
|
||||||
}, selector, name)
|
}, selector, name)
|
||||||
.then(done);
|
.then(done);
|
||||||
});
|
});
|
||||||
|
|
||||||
Nightmare.action('waitForInnerText', function(selector, done) {
|
Nightmare.action('waitForInnerText', function(selector, done) {
|
||||||
this.wait(selector)
|
this.wait(selector)
|
||||||
.wait(selector => {
|
.wait((selector) => {
|
||||||
let innerText = document.querySelector(selector).innerText;
|
const innerText = document.querySelector(selector).innerText;
|
||||||
return innerText != null && innerText != '';
|
return innerText != null && innerText != '';
|
||||||
}, selector)
|
}, selector)
|
||||||
.evaluate_now(selector => {
|
.evaluate_now((selector) => {
|
||||||
return document.querySelector(selector).innerText;
|
return document.querySelector(selector).innerText;
|
||||||
}, done, selector);
|
}, done, selector);
|
||||||
});
|
});
|
||||||
|
|
||||||
Nightmare.action('waitForEmptyInnerText', function(selector, done) {
|
Nightmare.action('waitForEmptyInnerText', function(selector, done) {
|
||||||
this.wait(selector => {
|
this.wait((selector) => {
|
||||||
return document.querySelector(selector).innerText == '';
|
return document.querySelector(selector).innerText == '';
|
||||||
}, selector)
|
}, selector)
|
||||||
.then(done);
|
.then(done);
|
||||||
});
|
});
|
||||||
|
|
||||||
Nightmare.action('waitForURL', function(hashURL, done) {
|
Nightmare.action('waitForURL', function(hashURL, done) {
|
||||||
this.wait(hash => {
|
this.wait((hash) => {
|
||||||
return document.location.hash.includes(hash);
|
return document.location.hash.includes(hash);
|
||||||
}, hashURL)
|
}, hashURL)
|
||||||
.then(done);
|
.then(done);
|
||||||
});
|
});
|
||||||
|
|
||||||
Nightmare.action('waitForShapes', function(selector, done) {
|
Nightmare.action('waitForShapes', function(selector, done) {
|
||||||
this.wait(selector)
|
this.wait(selector)
|
||||||
.evaluate_now(selector => {
|
.evaluate_now((selector) => {
|
||||||
let shapes = document.querySelectorAll(selector);
|
const shapes = document.querySelectorAll(selector);
|
||||||
let shapesList = [];
|
const shapesList = [];
|
||||||
|
|
||||||
for (let shape of shapes) {
|
for (const shape of shapes) {
|
||||||
shapesList.push(shape.innerText);
|
shapesList.push(shape.innerText);
|
||||||
}
|
}
|
||||||
|
|
||||||
return shapesList;
|
return shapesList;
|
||||||
}, done, selector);
|
}, done, selector);
|
||||||
});
|
});
|
||||||
|
|
||||||
Nightmare.action('waitForSnackbar', function(done) {
|
Nightmare.action('waitForSnackbar', function(done) {
|
||||||
this.wait(500).waitForShapes('vn-snackbar .shape .text')
|
this.wait(500).waitForShapes('vn-snackbar .shape .text')
|
||||||
.then(shapes => {
|
.then((shapes) => {
|
||||||
done(null, shapes);
|
done(null, shapes);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
Nightmare.action('waitForLastShape', function(selector, done) {
|
Nightmare.action('waitForLastShape', function(selector, done) {
|
||||||
this.wait(selector)
|
this.wait(selector)
|
||||||
.evaluate_now(selector => {
|
.evaluate_now((selector) => {
|
||||||
let shape = document.querySelector(selector);
|
const shape = document.querySelector(selector);
|
||||||
|
|
||||||
return shape.innerText;
|
return shape.innerText;
|
||||||
}, done, selector);
|
}, done, selector);
|
||||||
});
|
});
|
||||||
|
|
||||||
Nightmare.action('waitForLastSnackbar', function(done) {
|
Nightmare.action('waitForLastSnackbar', function(done) {
|
||||||
this.wait(500).waitForLastShape('vn-snackbar .shape .text')
|
this.wait(500).waitForLastShape('vn-snackbar .shape .text')
|
||||||
.then(shapes => {
|
.then((shapes) => {
|
||||||
done(null, shapes);
|
done(null, shapes);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
// eslint max-len: ["error", 500]
|
|
||||||
// eslint key-spacing: ["error", 500]
|
|
||||||
import components from './components_selectors.js';
|
import components from './components_selectors.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -9,18 +7,18 @@ export default {
|
||||||
applicationsMenuVisible: `vn-main-menu [vn-id="apps-menu"] ul`,
|
applicationsMenuVisible: `vn-main-menu [vn-id="apps-menu"] ul`,
|
||||||
clientsButton: `vn-main-menu [vn-id="apps-menu"] ul > li[ui-sref="client.index"]`,
|
clientsButton: `vn-main-menu [vn-id="apps-menu"] ul > li[ui-sref="client.index"]`,
|
||||||
ticketsButton: `vn-main-menu [vn-id="apps-menu"] ul > li[ui-sref="ticket.index"]`,
|
ticketsButton: `vn-main-menu [vn-id="apps-menu"] ul > li[ui-sref="ticket.index"]`,
|
||||||
claimsButton: `vn-main-menu [vn-id="apps-menu"] ul > li[ui-sref="claim.index"]`
|
claimsButton: `vn-main-menu [vn-id="apps-menu"] ul > li[ui-sref="claim.index"]`,
|
||||||
},
|
},
|
||||||
moduleAccessView: {
|
moduleAccessView: {
|
||||||
clientsSectionButton: `vn-home a[ui-sref="client.index"]`,
|
clientsSectionButton: `vn-home a[ui-sref="client.index"]`,
|
||||||
itemsSectionButton: `vn-home a[ui-sref="item.index"]`,
|
itemsSectionButton: `vn-home a[ui-sref="item.index"]`,
|
||||||
ticketsSectionButton: `vn-home a[ui-sref="ticket.index"]`
|
ticketsSectionButton: `vn-home a[ui-sref="ticket.index"]`,
|
||||||
},
|
},
|
||||||
clientsIndex: {
|
clientsIndex: {
|
||||||
searchClientInput: `${components.vnTextfield}`,
|
searchClientInput: `${components.vnTextfield}`,
|
||||||
searchButton: `vn-searchbar vn-icon[icon="search"]`,
|
searchButton: `vn-searchbar vn-icon[icon="search"]`,
|
||||||
searchResult: `vn-item-client a`,
|
searchResult: `vn-item-client a`,
|
||||||
createClientButton: `${components.vnFloatButton}`
|
createClientButton: `${components.vnFloatButton}`,
|
||||||
},
|
},
|
||||||
createClientView: {
|
createClientView: {
|
||||||
name: `${components.vnTextfield}[name="name"]`,
|
name: `${components.vnTextfield}[name="name"]`,
|
||||||
|
@ -31,7 +29,7 @@ export default {
|
||||||
salesPersonInput: `vn-autocomplete[field="$ctrl.client.salesPersonFk"] input`,
|
salesPersonInput: `vn-autocomplete[field="$ctrl.client.salesPersonFk"] input`,
|
||||||
salesBruceBannerOption: `vn-autocomplete[field="$ctrl.client.salesPersonFk"] vn-drop-down ul > li:nth-child(1)`,
|
salesBruceBannerOption: `vn-autocomplete[field="$ctrl.client.salesPersonFk"] vn-drop-down ul > li:nth-child(1)`,
|
||||||
createButton: `${components.vnSubmit}`,
|
createButton: `${components.vnSubmit}`,
|
||||||
cancelButton: `vn-button[href="#!/client/index"]`
|
cancelButton: `vn-button[href="#!/client/index"]`,
|
||||||
},
|
},
|
||||||
clientBasicData: {
|
clientBasicData: {
|
||||||
basicDataButton: `vn-menu-item a[ui-sref="client.card.basicData"]`,
|
basicDataButton: `vn-menu-item a[ui-sref="client.card.basicData"]`,
|
||||||
|
@ -46,7 +44,7 @@ export default {
|
||||||
channelInput: `vn-autocomplete[field="$ctrl.client.contactChannelFk"] input`,
|
channelInput: `vn-autocomplete[field="$ctrl.client.contactChannelFk"] input`,
|
||||||
channelMetropolisOption: `vn-autocomplete[field="$ctrl.client.contactChannelFk"] vn-drop-down ul > li:nth-child(3)`,
|
channelMetropolisOption: `vn-autocomplete[field="$ctrl.client.contactChannelFk"] vn-drop-down ul > li:nth-child(3)`,
|
||||||
channelRumorsOption: `vn-autocomplete[field="$ctrl.client.contactChannelFk"] vn-drop-down ul > li:nth-child(4)`,
|
channelRumorsOption: `vn-autocomplete[field="$ctrl.client.contactChannelFk"] vn-drop-down ul > li:nth-child(4)`,
|
||||||
saveButton: `${components.vnSubmit}`
|
saveButton: `${components.vnSubmit}`,
|
||||||
},
|
},
|
||||||
clientFiscalData: {
|
clientFiscalData: {
|
||||||
fiscalDataButton: `vn-menu-item a[ui-sref="client.card.fiscalData"]`,
|
fiscalDataButton: `vn-menu-item a[ui-sref="client.card.fiscalData"]`,
|
||||||
|
@ -73,7 +71,7 @@ export default {
|
||||||
invoiceByMailCheckboxLabel: `vn-check[label='Invoice by mail'] > label`,
|
invoiceByMailCheckboxLabel: `vn-check[label='Invoice by mail'] > label`,
|
||||||
invoiceByMailCheckboxInput: `vn-check[label='Invoice by mail'] input`,
|
invoiceByMailCheckboxInput: `vn-check[label='Invoice by mail'] input`,
|
||||||
viesCheckboxInput: `vn-check[label='Vies'] > label > input`,
|
viesCheckboxInput: `vn-check[label='Vies'] > label > input`,
|
||||||
saveButton: `${components.vnSubmit}`
|
saveButton: `${components.vnSubmit}`,
|
||||||
},
|
},
|
||||||
clientPayMethod: {
|
clientPayMethod: {
|
||||||
payMethodButton: `vn-menu-item a[ui-sref="client.card.billingData"]`,
|
payMethodButton: `vn-menu-item a[ui-sref="client.card.billingData"]`,
|
||||||
|
@ -90,7 +88,7 @@ export default {
|
||||||
newBankEntityName: 'vn-client-billing-data > vn-dialog vn-textfield[label="Name"] input',
|
newBankEntityName: 'vn-client-billing-data > vn-dialog vn-textfield[label="Name"] input',
|
||||||
newBankEntityBIC: 'vn-client-billing-data > vn-dialog vn-textfield[label="Swift / BIC"] input',
|
newBankEntityBIC: 'vn-client-billing-data > vn-dialog vn-textfield[label="Swift / BIC"] input',
|
||||||
acceptBankEntityButton: 'vn-client-billing-data > vn-dialog button[response="ACCEPT"]',
|
acceptBankEntityButton: 'vn-client-billing-data > vn-dialog button[response="ACCEPT"]',
|
||||||
saveButton: `${components.vnSubmit}`
|
saveButton: `${components.vnSubmit}`,
|
||||||
},
|
},
|
||||||
clientAddresses: {
|
clientAddresses: {
|
||||||
addressesButton: `vn-menu-item a[ui-sref="client.card.address.index"]`,
|
addressesButton: `vn-menu-item a[ui-sref="client.card.address.index"]`,
|
||||||
|
@ -123,27 +121,27 @@ export default {
|
||||||
thirdObservationDescriptionInput: `vn-client-address-edit [name=observations] :nth-child(3) [model="observation.description"] input`,
|
thirdObservationDescriptionInput: `vn-client-address-edit [name=observations] :nth-child(3) [model="observation.description"] input`,
|
||||||
addObservationButton: `vn-client-address-edit vn-icon-button[icon="add_circle"]`,
|
addObservationButton: `vn-client-address-edit vn-icon-button[icon="add_circle"]`,
|
||||||
saveButton: `${components.vnSubmit}`,
|
saveButton: `${components.vnSubmit}`,
|
||||||
cancelButton: `button[ui-sref="client.card.address.index"]`
|
cancelButton: `button[ui-sref="client.card.address.index"]`,
|
||||||
},
|
},
|
||||||
clientWebAccess: {
|
clientWebAccess: {
|
||||||
webAccessButton: `vn-menu-item a[ui-sref="client.card.webAccess"]`,
|
webAccessButton: `vn-menu-item a[ui-sref="client.card.webAccess"]`,
|
||||||
enableWebAccessCheckbox: `vn-check[label='Enable web access'] > label > input`,
|
enableWebAccessCheckbox: `vn-check[label='Enable web access'] > label > input`,
|
||||||
userNameInput: `${components.vnTextfield}[name="name"]`,
|
userNameInput: `${components.vnTextfield}[name="name"]`,
|
||||||
saveButton: `${components.vnSubmit}`
|
saveButton: `${components.vnSubmit}`,
|
||||||
},
|
},
|
||||||
clientNotes: {
|
clientNotes: {
|
||||||
notesButton: `vn-menu-item a[ui-sref="client.card.note.index"]`,
|
notesButton: `vn-menu-item a[ui-sref="client.card.note.index"]`,
|
||||||
addNoteFloatButton: `${components.vnFloatButton}`,
|
addNoteFloatButton: `${components.vnFloatButton}`,
|
||||||
noteInput: `vn-textarea[label="Note"]`,
|
noteInput: `vn-textarea[label="Note"]`,
|
||||||
saveButton: `${components.vnSubmit}`,
|
saveButton: `${components.vnSubmit}`,
|
||||||
firstNoteText: 'vn-client-note .text'
|
firstNoteText: 'vn-client-note .text',
|
||||||
},
|
},
|
||||||
clientCredit: {
|
clientCredit: {
|
||||||
creditButton: `vn-menu-item a[ui-sref="client.card.credit.index"]`,
|
creditButton: `vn-menu-item a[ui-sref="client.card.credit.index"]`,
|
||||||
addCreditFloatButton: `${components.vnFloatButton}`,
|
addCreditFloatButton: `${components.vnFloatButton}`,
|
||||||
creditInput: `${components.vnTextfield}[name="credit"]`,
|
creditInput: `${components.vnTextfield}[name="credit"]`,
|
||||||
saveButton: `${components.vnSubmit}`,
|
saveButton: `${components.vnSubmit}`,
|
||||||
firstCreditText: 'vn-client-credit-index vn-card > div vn-table vn-tbody > vn-tr'
|
firstCreditText: 'vn-client-credit-index vn-card > div vn-table vn-tbody > vn-tr',
|
||||||
},
|
},
|
||||||
clientGreuge: {
|
clientGreuge: {
|
||||||
greugeButton: `vn-menu-item a[ui-sref="client.card.greuge.index"]`,
|
greugeButton: `vn-menu-item a[ui-sref="client.card.greuge.index"]`,
|
||||||
|
@ -153,15 +151,15 @@ export default {
|
||||||
typeInput: `vn-autocomplete[field="$ctrl.greuge.greugeTypeFk"] input`,
|
typeInput: `vn-autocomplete[field="$ctrl.greuge.greugeTypeFk"] input`,
|
||||||
typeSecondOption: `vn-autocomplete[field="$ctrl.greuge.greugeTypeFk"] vn-drop-down ul > li`,
|
typeSecondOption: `vn-autocomplete[field="$ctrl.greuge.greugeTypeFk"] vn-drop-down ul > li`,
|
||||||
saveButton: `${components.vnSubmit}`,
|
saveButton: `${components.vnSubmit}`,
|
||||||
firstGreugeText: 'vn-client-greuge-index vn-card > div vn-table vn-tbody > vn-tr'
|
firstGreugeText: 'vn-client-greuge-index vn-card > div vn-table vn-tbody > vn-tr',
|
||||||
},
|
},
|
||||||
clientMandate: {
|
clientMandate: {
|
||||||
mandateButton: `vn-menu-item a[ui-sref="client.card.mandate"]`,
|
mandateButton: `vn-menu-item a[ui-sref="client.card.mandate"]`,
|
||||||
firstMandateText: 'vn-client-mandate vn-card > div vn-table vn-tbody > vn-tr'
|
firstMandateText: 'vn-client-mandate vn-card > div vn-table vn-tbody > vn-tr',
|
||||||
},
|
},
|
||||||
clientInvoices: {
|
clientInvoices: {
|
||||||
invoicesButton: `vn-menu-item a[ui-sref="client.card.invoice"]`,
|
invoicesButton: `vn-menu-item a[ui-sref="client.card.invoice"]`,
|
||||||
firstInvoiceText: 'vn-client-invoice vn-card > div vn-table vn-tbody > vn-tr'
|
firstInvoiceText: 'vn-client-invoice vn-card > div vn-table vn-tbody > vn-tr',
|
||||||
},
|
},
|
||||||
itemsIndex: {
|
itemsIndex: {
|
||||||
goBackToModuleIndexButton: `vn-ticket-descriptor a[href="#!/ticket/index"]`,
|
goBackToModuleIndexButton: `vn-ticket-descriptor a[href="#!/ticket/index"]`,
|
||||||
|
@ -172,7 +170,7 @@ export default {
|
||||||
acceptClonationAlertButton: `vn-item-index [vn-id="clone"] [response="ACCEPT"]`,
|
acceptClonationAlertButton: `vn-item-index [vn-id="clone"] [response="ACCEPT"]`,
|
||||||
searchItemInput: `${components.vnTextfield}`,
|
searchItemInput: `${components.vnTextfield}`,
|
||||||
searchButton: `vn-searchbar vn-icon[icon="search"]`,
|
searchButton: `vn-searchbar vn-icon[icon="search"]`,
|
||||||
closeItemSummaryPreview: 'vn-item-index [vn-id="preview"] button.close'
|
closeItemSummaryPreview: 'vn-item-index [vn-id="preview"] button.close',
|
||||||
},
|
},
|
||||||
itemCreateView: {
|
itemCreateView: {
|
||||||
name: `${components.vnTextfield}[name="name"]`,
|
name: `${components.vnTextfield}[name="name"]`,
|
||||||
|
@ -183,7 +181,7 @@ export default {
|
||||||
originSelect: `vn-autocomplete[field="$ctrl.item.originFk"] input`,
|
originSelect: `vn-autocomplete[field="$ctrl.item.originFk"] input`,
|
||||||
originSelectOptionOne: `vn-autocomplete[field="$ctrl.item.originFk"] vn-drop-down ul > li:nth-child(2)`,
|
originSelectOptionOne: `vn-autocomplete[field="$ctrl.item.originFk"] vn-drop-down ul > li:nth-child(2)`,
|
||||||
createButton: `${components.vnSubmit}`,
|
createButton: `${components.vnSubmit}`,
|
||||||
cancelButton: `button[ui-sref="item.index"]`
|
cancelButton: `button[ui-sref="item.index"]`,
|
||||||
|
|
||||||
},
|
},
|
||||||
itemBasicData: {
|
itemBasicData: {
|
||||||
|
@ -201,7 +199,7 @@ export default {
|
||||||
expenceSelectOptionThree: `vn-autocomplete[field="$ctrl.item.expenceFk"] vn-drop-down ul > li:nth-child(3)`,
|
expenceSelectOptionThree: `vn-autocomplete[field="$ctrl.item.expenceFk"] vn-drop-down ul > li:nth-child(3)`,
|
||||||
longNameInput: `vn-textfield[label="Full name"] input`,
|
longNameInput: `vn-textfield[label="Full name"] input`,
|
||||||
isActiveCheckbox: `vn-check[label='Active'] > label > input`,
|
isActiveCheckbox: `vn-check[label='Active'] > label > input`,
|
||||||
submitBasicDataButton: `${components.vnSubmit}`
|
submitBasicDataButton: `${components.vnSubmit}`,
|
||||||
},
|
},
|
||||||
itemTags: {
|
itemTags: {
|
||||||
goToItemIndexButton: 'vn-item-descriptor [ui-sref="item.index"]',
|
goToItemIndexButton: 'vn-item-descriptor [ui-sref="item.index"]',
|
||||||
|
@ -231,7 +229,7 @@ export default {
|
||||||
seventhValueInput: `vn-item-tags vn-horizontal:nth-child(8) > vn-textfield[label="Value"] input`,
|
seventhValueInput: `vn-item-tags vn-horizontal:nth-child(8) > vn-textfield[label="Value"] input`,
|
||||||
seventhRelevancyInput: `vn-horizontal:nth-child(8) > vn-textfield[label="Relevancy"] input`,
|
seventhRelevancyInput: `vn-horizontal:nth-child(8) > vn-textfield[label="Relevancy"] input`,
|
||||||
addItemTagButton: `vn-icon-button[icon="add_circle"]`,
|
addItemTagButton: `vn-icon-button[icon="add_circle"]`,
|
||||||
submitItemTagsButton: `${components.vnSubmit}`
|
submitItemTagsButton: `${components.vnSubmit}`,
|
||||||
},
|
},
|
||||||
itemTax: {
|
itemTax: {
|
||||||
taxButton: `vn-menu-item a[ui-sref="item.card.tax"]`,
|
taxButton: `vn-menu-item a[ui-sref="item.card.tax"]`,
|
||||||
|
@ -241,14 +239,14 @@ export default {
|
||||||
secondClassSelectOptionOne: `vn-horizontal:nth-child(3) > vn-autocomplete vn-drop-down ul > li:nth-child(1)`,
|
secondClassSelectOptionOne: `vn-horizontal:nth-child(3) > vn-autocomplete vn-drop-down ul > li:nth-child(1)`,
|
||||||
thirdClassSelect: `vn-horizontal:nth-child(4) > vn-autocomplete[field="tax.taxClassFk"] input`,
|
thirdClassSelect: `vn-horizontal:nth-child(4) > vn-autocomplete[field="tax.taxClassFk"] input`,
|
||||||
thirdClassSelectOptionTwo: `vn-horizontal:nth-child(4) > vn-autocomplete vn-drop-down ul > li:nth-child(2)`,
|
thirdClassSelectOptionTwo: `vn-horizontal:nth-child(4) > vn-autocomplete vn-drop-down ul > li:nth-child(2)`,
|
||||||
submitTaxButton: `${components.vnSubmit}`
|
submitTaxButton: `${components.vnSubmit}`,
|
||||||
},
|
},
|
||||||
itemBarcodes: {
|
itemBarcodes: {
|
||||||
barcodeButton: `vn-menu-item a[ui-sref="item.card.itemBarcode"]`,
|
barcodeButton: `vn-menu-item a[ui-sref="item.card.itemBarcode"]`,
|
||||||
addBarcodeButton: `vn-icon[icon="add_circle"]`,
|
addBarcodeButton: `vn-icon[icon="add_circle"]`,
|
||||||
thirdCodeInput: `vn-item-barcode vn-horizontal:nth-child(4) > ${components.vnTextfield}`,
|
thirdCodeInput: `vn-item-barcode vn-horizontal:nth-child(4) > ${components.vnTextfield}`,
|
||||||
submitBarcodesButton: `${components.vnSubmit}`,
|
submitBarcodesButton: `${components.vnSubmit}`,
|
||||||
firstCodeRemoveButton: `vn-item-barcode vn-horizontal vn-none vn-icon[icon="remove_circle_outline"]`
|
firstCodeRemoveButton: `vn-item-barcode vn-horizontal vn-none vn-icon[icon="remove_circle_outline"]`,
|
||||||
},
|
},
|
||||||
itemNiches: {
|
itemNiches: {
|
||||||
nicheButton: `vn-menu-item a[ui-sref="item.card.niche"]`,
|
nicheButton: `vn-menu-item a[ui-sref="item.card.niche"]`,
|
||||||
|
@ -262,7 +260,7 @@ export default {
|
||||||
thirdWarehouseSelect: `vn-horizontal:nth-child(4) > vn-autocomplete[field="niche.warehouseFk"] input`,
|
thirdWarehouseSelect: `vn-horizontal:nth-child(4) > vn-autocomplete[field="niche.warehouseFk"] input`,
|
||||||
thirdWarehouseSelectFourthOption: `vn-horizontal:nth-child(4) > vn-autocomplete[field="niche.warehouseFk"] vn-drop-down ul > li:nth-child(4)`,
|
thirdWarehouseSelectFourthOption: `vn-horizontal:nth-child(4) > vn-autocomplete[field="niche.warehouseFk"] vn-drop-down ul > li:nth-child(4)`,
|
||||||
thirdCodeInput: `vn-horizontal:nth-child(4) > vn-textfield[label="Code"] input`,
|
thirdCodeInput: `vn-horizontal:nth-child(4) > vn-textfield[label="Code"] input`,
|
||||||
submitNichesButton: `${components.vnSubmit}`
|
submitNichesButton: `${components.vnSubmit}`,
|
||||||
},
|
},
|
||||||
itemBotanical: {
|
itemBotanical: {
|
||||||
botanicalButton: `vn-menu-item a[ui-sref="item.card.botanical"]`,
|
botanicalButton: `vn-menu-item a[ui-sref="item.card.botanical"]`,
|
||||||
|
@ -273,7 +271,7 @@ export default {
|
||||||
speciesSelect: `vn-autocomplete[field="$ctrl.botanical.specieFk"] input`,
|
speciesSelect: `vn-autocomplete[field="$ctrl.botanical.specieFk"] input`,
|
||||||
speciesSelectOptionOne: `vn-autocomplete[field="$ctrl.botanical.specieFk"] vn-drop-down ul > li:nth-child(1)`,
|
speciesSelectOptionOne: `vn-autocomplete[field="$ctrl.botanical.specieFk"] vn-drop-down ul > li:nth-child(1)`,
|
||||||
speciesSelectOptionTwo: `vn-autocomplete[field="$ctrl.botanical.specieFk"] vn-drop-down ul > li:nth-child(2)`,
|
speciesSelectOptionTwo: `vn-autocomplete[field="$ctrl.botanical.specieFk"] vn-drop-down ul > li:nth-child(2)`,
|
||||||
submitBotanicalButton: `${components.vnSubmit}`
|
submitBotanicalButton: `${components.vnSubmit}`,
|
||||||
},
|
},
|
||||||
itemSummary: {
|
itemSummary: {
|
||||||
basicData: `vn-item-summary vn-vertical[name="basicData"]`,
|
basicData: `vn-item-summary vn-vertical[name="basicData"]`,
|
||||||
|
@ -281,14 +279,14 @@ export default {
|
||||||
tags: `vn-item-summary vn-vertical[name="tags"]`,
|
tags: `vn-item-summary vn-vertical[name="tags"]`,
|
||||||
niche: `vn-item-summary vn-vertical[name="niche"]`,
|
niche: `vn-item-summary vn-vertical[name="niche"]`,
|
||||||
botanical: `vn-item-summary vn-vertical[name="botanical"]`,
|
botanical: `vn-item-summary vn-vertical[name="botanical"]`,
|
||||||
barcode: `vn-item-summary vn-vertical[name="barcode"]`
|
barcode: `vn-item-summary vn-vertical[name="barcode"]`,
|
||||||
},
|
},
|
||||||
ticketsIndex: {
|
ticketsIndex: {
|
||||||
searchResult: `vn-ticket-index vn-card > div > vn-table > div > vn-tbody > a.vn-tr`,
|
searchResult: `vn-ticket-index vn-card > div > vn-table > div > vn-tbody > a.vn-tr`,
|
||||||
searchResultDate: `vn-ticket-index vn-table vn-tbody > a:nth-child(1) > vn-td:nth-child(4)`,
|
searchResultDate: `vn-ticket-index vn-table vn-tbody > a:nth-child(1) > vn-td:nth-child(4)`,
|
||||||
searchResultAddress: `vn-ticket-index vn-table vn-tbody > a:nth-child(1) > vn-td:nth-child(6)`,
|
searchResultAddress: `vn-ticket-index vn-table vn-tbody > a:nth-child(1) > vn-td:nth-child(6)`,
|
||||||
searchTicketInput: `vn-ticket-index ${components.vnTextfield}`,
|
searchTicketInput: `vn-ticket-index ${components.vnTextfield}`,
|
||||||
searchButton: `vn-ticket-index vn-searchbar vn-icon[icon="search"]`
|
searchButton: `vn-ticket-index vn-searchbar vn-icon[icon="search"]`,
|
||||||
},
|
},
|
||||||
ticketNotes: {
|
ticketNotes: {
|
||||||
notesButton: `vn-menu-item a[ui-sref="ticket.card.observation"]`,
|
notesButton: `vn-menu-item a[ui-sref="ticket.card.observation"]`,
|
||||||
|
@ -297,12 +295,12 @@ export default {
|
||||||
firstNoteSelect: `vn-autocomplete[field="observation.observationTypeFk"] input`,
|
firstNoteSelect: `vn-autocomplete[field="observation.observationTypeFk"] input`,
|
||||||
firstNoteSelectSecondOption: `vn-autocomplete[field="observation.observationTypeFk"] vn-drop-down ul > li:nth-child(2)`,
|
firstNoteSelectSecondOption: `vn-autocomplete[field="observation.observationTypeFk"] vn-drop-down ul > li:nth-child(2)`,
|
||||||
firstDescriptionInput: `vn-textfield[label="Description"] input`,
|
firstDescriptionInput: `vn-textfield[label="Description"] input`,
|
||||||
submitNotesButton: `${components.vnSubmit}`
|
submitNotesButton: `${components.vnSubmit}`,
|
||||||
},
|
},
|
||||||
ticketExpedition: {
|
ticketExpedition: {
|
||||||
expeditionButton: `vn-menu-item a[ui-sref="ticket.card.expedition"]`,
|
expeditionButton: `vn-menu-item a[ui-sref="ticket.card.expedition"]`,
|
||||||
secondExpeditionRemoveButton: `vn-ticket-expedition vn-table div > vn-tbody > vn-tr:nth-child(2) > vn-td:nth-child(1) > vn-icon-button[icon="delete"]`,
|
secondExpeditionRemoveButton: `vn-ticket-expedition vn-table div > vn-tbody > vn-tr:nth-child(2) > vn-td:nth-child(1) > vn-icon-button[icon="delete"]`,
|
||||||
secondExpeditionText: `vn-ticket-expedition vn-table div > vn-tbody > vn-tr:nth-child(2)`
|
secondExpeditionText: `vn-ticket-expedition vn-table div > vn-tbody > vn-tr:nth-child(2)`,
|
||||||
},
|
},
|
||||||
ticketPackages: {
|
ticketPackages: {
|
||||||
packagesButton: `vn-menu-item a[ui-sref="ticket.card.package.index"]`,
|
packagesButton: `vn-menu-item a[ui-sref="ticket.card.package.index"]`,
|
||||||
|
@ -312,7 +310,7 @@ export default {
|
||||||
firstRemovePackageButton: `vn-icon[vn-tooltip="Remove package"]`,
|
firstRemovePackageButton: `vn-icon[vn-tooltip="Remove package"]`,
|
||||||
addPackageButton: `vn-icon-button[vn-tooltip="Add package"]`,
|
addPackageButton: `vn-icon-button[vn-tooltip="Add package"]`,
|
||||||
clearPackageSelectButton: `vn-autocomplete[label="Package"] > div > div > div > vn-icon > i`,
|
clearPackageSelectButton: `vn-autocomplete[label="Package"] > div > div > div > vn-icon > i`,
|
||||||
savePackagesButton: `${components.vnSubmit}`
|
savePackagesButton: `${components.vnSubmit}`,
|
||||||
},
|
},
|
||||||
ticketSales: {
|
ticketSales: {
|
||||||
saleLine: `vn-table div > vn-tbody > vn-tr`,
|
saleLine: `vn-table div > vn-tbody > vn-tr`,
|
||||||
|
@ -360,7 +358,7 @@ export default {
|
||||||
moreMenuUnmarkResevedOption: 'vn-ticket-sale vn-drop-down > vn-popover ul > li:nth-child(5)',
|
moreMenuUnmarkResevedOption: 'vn-ticket-sale vn-drop-down > vn-popover ul > li:nth-child(5)',
|
||||||
moreMenuUpdateDiscount: 'vn-ticket-sale vn-drop-down > vn-popover ul > li:nth-child(6)',
|
moreMenuUpdateDiscount: 'vn-ticket-sale vn-drop-down > vn-popover ul > li:nth-child(6)',
|
||||||
moreMenuUpdateDiscountInput: 'vn-ticket-sale vn-dialog.shown vn-ticket-sale-edit-discount input',
|
moreMenuUpdateDiscountInput: 'vn-ticket-sale vn-dialog.shown vn-ticket-sale-edit-discount input',
|
||||||
moreMenuCreateClaim: 'vn-ticket-sale vn-drop-down > vn-popover ul > li:nth-child(1)'
|
moreMenuCreateClaim: 'vn-ticket-sale vn-drop-down > vn-popover ul > li:nth-child(1)',
|
||||||
},
|
},
|
||||||
ticketTracking: {
|
ticketTracking: {
|
||||||
trackingButton: `vn-left-menu a[ui-sref="ticket.card.tracking.index"]`,
|
trackingButton: `vn-left-menu a[ui-sref="ticket.card.tracking.index"]`,
|
||||||
|
@ -368,7 +366,7 @@ export default {
|
||||||
stateSelect: 'vn-ticket-tracking-edit vn-autocomplete[field="$ctrl.ticket.stateFk"] input',
|
stateSelect: 'vn-ticket-tracking-edit vn-autocomplete[field="$ctrl.ticket.stateFk"] input',
|
||||||
stateSelectInput: 'vn-ticket-tracking-edit vn-autocomplete > vn-drop-down > vn-popover vn-textfield input',
|
stateSelectInput: 'vn-ticket-tracking-edit vn-autocomplete > vn-drop-down > vn-popover vn-textfield input',
|
||||||
stateSelectFirstResult: 'vn-ticket-tracking-edit vn-autocomplete > vn-drop-down > vn-popover ul > li:nth-child(1)',
|
stateSelectFirstResult: 'vn-ticket-tracking-edit vn-autocomplete > vn-drop-down > vn-popover ul > li:nth-child(1)',
|
||||||
saveButton: `${components.vnSubmit}`
|
saveButton: `${components.vnSubmit}`,
|
||||||
},
|
},
|
||||||
ticketBasicData: {
|
ticketBasicData: {
|
||||||
basicDataButton: `vn-menu-item a[ui-sref="ticket.card.data.stepOne"]`,
|
basicDataButton: `vn-menu-item a[ui-sref="ticket.card.data.stepOne"]`,
|
||||||
|
@ -383,18 +381,24 @@ export default {
|
||||||
stepTwoTotalPriceDif: `vn-ticket-data-step-two > form > vn-card > div > vn-horizontal > table > tfoot > tr > td:nth-child(4)`,
|
stepTwoTotalPriceDif: `vn-ticket-data-step-two > form > vn-card > div > vn-horizontal > table > tfoot > tr > td:nth-child(4)`,
|
||||||
chargesReason: `vn-autocomplete[field="$ctrl.ticket.option"] input`,
|
chargesReason: `vn-autocomplete[field="$ctrl.ticket.option"] input`,
|
||||||
chargesReasonFourthOption: `vn-autocomplete[field="$ctrl.ticket.option"] vn-drop-down ul > li:nth-child(4)`,
|
chargesReasonFourthOption: `vn-autocomplete[field="$ctrl.ticket.option"] vn-drop-down ul > li:nth-child(4)`,
|
||||||
chargesReasonFirstOption: `vn-autocomplete[field="$ctrl.ticket.option"] vn-drop-down ul > li:nth-child(1)`
|
chargesReasonFirstOption: `vn-autocomplete[field="$ctrl.ticket.option"] vn-drop-down ul > li:nth-child(1)`,
|
||||||
|
},
|
||||||
|
ticketComponents: {
|
||||||
|
componentsButton: `vn-menu-item a[ui-sref="ticket.card.components"]`,
|
||||||
|
base: 'vn-ticket-components tfoot > tr:nth-child(1) > td',
|
||||||
|
margin: 'vn-ticket-components tfoot > tr:nth-child(2) > td',
|
||||||
|
total: 'vn-ticket-components tfoot > tr:nth-child(3) > td',
|
||||||
},
|
},
|
||||||
createStateView: {
|
createStateView: {
|
||||||
stateInput: `vn-autocomplete[field="$ctrl.ticket.stateFk"] > div > div > input`,
|
stateInput: `vn-autocomplete[field="$ctrl.ticket.stateFk"] > div > div > input`,
|
||||||
stateInputOptionOne: `vn-autocomplete[field="$ctrl.ticket.stateFk"] vn-drop-down ul > li:nth-child(1)`,
|
stateInputOptionOne: `vn-autocomplete[field="$ctrl.ticket.stateFk"] vn-drop-down ul > li:nth-child(1)`,
|
||||||
clearStateInputButton: `vn-autocomplete[field="$ctrl.ticket.stateFk"] > div > div > div > vn-icon > i`,
|
clearStateInputButton: `vn-autocomplete[field="$ctrl.ticket.stateFk"] > div > div > div > vn-icon > i`,
|
||||||
saveStateButton: `${components.vnSubmit}`
|
saveStateButton: `${components.vnSubmit}`,
|
||||||
},
|
},
|
||||||
claimsIndex: {
|
claimsIndex: {
|
||||||
searchClaimInput: `vn-claim-index ${components.vnTextfield}`,
|
searchClaimInput: `vn-claim-index ${components.vnTextfield}`,
|
||||||
searchResult: `vn-claim-index vn-card > div > vn-table > div > vn-tbody > vn-tr`,
|
searchResult: `vn-claim-index vn-card > div > vn-table > div > vn-tbody > vn-tr`,
|
||||||
searchButton: `vn-claim-index vn-searchbar vn-icon[icon="search"]`
|
searchButton: `vn-claim-index vn-searchbar vn-icon[icon="search"]`,
|
||||||
},
|
},
|
||||||
claimBasicData: {
|
claimBasicData: {
|
||||||
basicDataButton: `vn-menu-item a[ui-sref="claim.card.basicData"]`,
|
basicDataButton: `vn-menu-item a[ui-sref="claim.card.basicData"]`,
|
||||||
|
@ -404,10 +408,10 @@ export default {
|
||||||
isPaidWithManaCheckbox: `vn-check[field="$ctrl.claim.isChargedToMana"] > label > input`,
|
isPaidWithManaCheckbox: `vn-check[field="$ctrl.claim.isChargedToMana"] > label > input`,
|
||||||
responsabilityInputRange: `vn-input-range`,
|
responsabilityInputRange: `vn-input-range`,
|
||||||
observationInput: `vn-textarea[label="Observation"] textarea`,
|
observationInput: `vn-textarea[label="Observation"] textarea`,
|
||||||
saveButton: `${components.vnSubmit}`
|
saveButton: `${components.vnSubmit}`,
|
||||||
},
|
},
|
||||||
claimDetails: {
|
claimDetails: {
|
||||||
detailsButton: `vn-menu-item a[ui-sref="claim.card.detail"]`,
|
detailsButton: `vn-menu-item a[ui-sref="claim.card.detail"]`,
|
||||||
addItemButton: `vn-claim-detail a vn-float-button`
|
addItemButton: `vn-claim-detail a vn-float-button`,
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,122 +3,122 @@ import createNightmare from '../../helpers/nightmare';
|
||||||
|
|
||||||
describe('Client', () => {
|
describe('Client', () => {
|
||||||
describe('create path', () => {
|
describe('create path', () => {
|
||||||
let nightmare = createNightmare();
|
const nightmare = createNightmare();
|
||||||
|
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.waitForLogin('employee');
|
.waitForLogin('employee');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should access to the clients index by clicking the clients button', async() => {
|
it('should access to the clients index by clicking the clients button', async () => {
|
||||||
let url = await nightmare
|
const url = await nightmare
|
||||||
.click(selectors.moduleAccessView.clientsSectionButton)
|
.click(selectors.moduleAccessView.clientsSectionButton)
|
||||||
.wait(selectors.clientsIndex.createClientButton)
|
.wait(selectors.clientsIndex.createClientButton)
|
||||||
.parsedUrl();
|
.parsedUrl();
|
||||||
|
|
||||||
expect(url.hash).toEqual('#!/client/index');
|
expect(url.hash).toEqual('#!/client/index');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should search for the user Carol Danvers to confirm it isn't created yet`, async() => {
|
it(`should search for the user Carol Danvers to confirm it isn't created yet`, async () => {
|
||||||
let result = await nightmare
|
const result = await nightmare
|
||||||
.wait(selectors.clientsIndex.searchResult)
|
.wait(selectors.clientsIndex.searchResult)
|
||||||
.type(selectors.clientsIndex.searchClientInput, 'Carol Danvers')
|
.type(selectors.clientsIndex.searchClientInput, 'Carol Danvers')
|
||||||
.click(selectors.clientsIndex.searchButton)
|
.click(selectors.clientsIndex.searchButton)
|
||||||
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 0)
|
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 0)
|
||||||
.countElement(selectors.clientsIndex.searchResult);
|
.countElement(selectors.clientsIndex.searchResult);
|
||||||
|
|
||||||
expect(result).toEqual(0);
|
expect(result).toEqual(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should access to the create client view by clicking the create-client floating button', async() => {
|
it('should access to the create client view by clicking the create-client floating button', async () => {
|
||||||
let url = await nightmare
|
const url = await nightmare
|
||||||
.click(selectors.clientsIndex.createClientButton)
|
.click(selectors.clientsIndex.createClientButton)
|
||||||
.wait(selectors.createClientView.createButton)
|
.wait(selectors.createClientView.createButton)
|
||||||
.parsedUrl();
|
.parsedUrl();
|
||||||
|
|
||||||
expect(url.hash).toEqual('#!/client/create');
|
expect(url.hash).toEqual('#!/client/create');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should return to the client index by clicking the cancel button', async() => {
|
it('should return to the client index by clicking the cancel button', async () => {
|
||||||
let url = await nightmare
|
const url = await nightmare
|
||||||
.click(selectors.createClientView.cancelButton)
|
.click(selectors.createClientView.cancelButton)
|
||||||
.wait(selectors.clientsIndex.createClientButton)
|
.wait(selectors.clientsIndex.createClientButton)
|
||||||
.parsedUrl();
|
.parsedUrl();
|
||||||
|
|
||||||
expect(url.hash).toEqual('#!/client/index');
|
expect(url.hash).toEqual('#!/client/index');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should now access to the create client view by clicking the create-client floating button', async() => {
|
it('should now access to the create client view by clicking the create-client floating button', async () => {
|
||||||
let url = await nightmare
|
const url = await nightmare
|
||||||
.click(selectors.clientsIndex.createClientButton)
|
.click(selectors.clientsIndex.createClientButton)
|
||||||
.wait(selectors.createClientView.createButton)
|
.wait(selectors.createClientView.createButton)
|
||||||
.parsedUrl();
|
.parsedUrl();
|
||||||
|
|
||||||
expect(url.hash).toEqual('#!/client/create');
|
expect(url.hash).toEqual('#!/client/create');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should receive an error when clicking the create button having all the form fields empty', async() => {
|
it('should receive an error when clicking the create button having all the form fields empty', async () => {
|
||||||
let result = await nightmare
|
const result = await nightmare
|
||||||
.click(selectors.createClientView.createButton)
|
.click(selectors.createClientView.createButton)
|
||||||
.waitForLastSnackbar();
|
.waitForLastSnackbar();
|
||||||
|
|
||||||
expect(result).toEqual('Some fields are invalid');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should receive an error when clicking the create button having name and Business name fields empty', async() => {
|
|
||||||
let result = await nightmare
|
|
||||||
.type(selectors.createClientView.taxNumber, '74451390E')
|
|
||||||
.type(selectors.createClientView.userName, 'CaptainMarvel')
|
|
||||||
.type(selectors.createClientView.email, 'CarolDanvers@verdnatura.es')
|
|
||||||
.waitToClick(selectors.createClientView.salesPersonInput)
|
|
||||||
.waitToClick(selectors.createClientView.salesBruceBannerOption)
|
|
||||||
.click(selectors.createClientView.createButton)
|
|
||||||
.waitForLastSnackbar();
|
|
||||||
|
|
||||||
expect(result).toEqual('Some fields are invalid');
|
expect(result).toEqual('Some fields are invalid');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should attempt to create a new user with all it's data but wrong email`, async() => {
|
it('should receive an error when clicking the create button having name and Business name fields empty', async () => {
|
||||||
let result = await nightmare
|
const result = await nightmare
|
||||||
.type(selectors.createClientView.name, 'Carol Danvers')
|
.type(selectors.createClientView.taxNumber, '74451390E')
|
||||||
.type(selectors.createClientView.socialName, 'AVG tax')
|
.type(selectors.createClientView.userName, 'CaptainMarvel')
|
||||||
.clearInput(selectors.createClientView.email)
|
.type(selectors.createClientView.email, 'CarolDanvers@verdnatura.es')
|
||||||
.type(selectors.createClientView.email, 'incorrect email format')
|
.waitToClick(selectors.createClientView.salesPersonInput)
|
||||||
.click(selectors.createClientView.createButton)
|
.waitToClick(selectors.createClientView.salesBruceBannerOption)
|
||||||
.waitForLastSnackbar();
|
.click(selectors.createClientView.createButton)
|
||||||
|
.waitForLastSnackbar();
|
||||||
|
|
||||||
expect(result).toEqual('Some fields are invalid');
|
expect(result).toEqual('Some fields are invalid');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should create a new user with all correct data`, async() => {
|
it(`should attempt to create a new user with all it's data but wrong email`, async () => {
|
||||||
let result = await nightmare
|
const result = await nightmare
|
||||||
.clearInput(selectors.createClientView.email)
|
.type(selectors.createClientView.name, 'Carol Danvers')
|
||||||
.type(selectors.createClientView.email, 'caroldanvers@verdnatura.es')
|
.type(selectors.createClientView.socialName, 'AVG tax')
|
||||||
.click(selectors.createClientView.createButton)
|
.clearInput(selectors.createClientView.email)
|
||||||
.waitForLastSnackbar();
|
.type(selectors.createClientView.email, 'incorrect email format')
|
||||||
|
.click(selectors.createClientView.createButton)
|
||||||
|
.waitForLastSnackbar();
|
||||||
|
|
||||||
|
expect(result).toEqual('Some fields are invalid');
|
||||||
|
});
|
||||||
|
|
||||||
|
it(`should create a new user with all correct data`, async () => {
|
||||||
|
const result = await nightmare
|
||||||
|
.clearInput(selectors.createClientView.email)
|
||||||
|
.type(selectors.createClientView.email, 'caroldanvers@verdnatura.es')
|
||||||
|
.click(selectors.createClientView.createButton)
|
||||||
|
.waitForLastSnackbar();
|
||||||
|
|
||||||
expect(result).toEqual('Data saved!');
|
expect(result).toEqual('Data saved!');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should click on the Clients button of the top bar menu', async() => {
|
it('should click on the Clients button of the top bar menu', async () => {
|
||||||
let url = await nightmare
|
const url = await nightmare
|
||||||
.waitToClick(selectors.globalItems.applicationsMenuButton)
|
.waitToClick(selectors.globalItems.applicationsMenuButton)
|
||||||
.wait(selectors.globalItems.applicationsMenuVisible)
|
.wait(selectors.globalItems.applicationsMenuVisible)
|
||||||
.waitToClick(selectors.globalItems.clientsButton)
|
.waitToClick(selectors.globalItems.clientsButton)
|
||||||
.wait(selectors.clientsIndex.createClientButton)
|
.wait(selectors.clientsIndex.createClientButton)
|
||||||
.parsedUrl();
|
.parsedUrl();
|
||||||
|
|
||||||
expect(url.hash).toEqual('#!/client/index');
|
expect(url.hash).toEqual('#!/client/index');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should search for the user Carol Danvers to confirm it exists`, async() => {
|
it(`should search for the user Carol Danvers to confirm it exists`, async () => {
|
||||||
let result = await nightmare
|
const result = await nightmare
|
||||||
.wait(selectors.clientsIndex.searchResult)
|
.wait(selectors.clientsIndex.searchResult)
|
||||||
.type(selectors.clientsIndex.searchClientInput, 'Carol Danvers')
|
.type(selectors.clientsIndex.searchClientInput, 'Carol Danvers')
|
||||||
.click(selectors.clientsIndex.searchButton)
|
.click(selectors.clientsIndex.searchButton)
|
||||||
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)
|
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)
|
||||||
.countElement(selectors.clientsIndex.searchResult);
|
.countElement(selectors.clientsIndex.searchResult);
|
||||||
|
|
||||||
expect(result).toEqual(1);
|
expect(result).toEqual(1);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -7,76 +7,76 @@ describe('Ticket', () => {
|
||||||
|
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.waitForLogin('employee');
|
.waitForLogin('employee');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should access to the tickets index by clicking the tickets button', done => {
|
it('should access to the tickets index by clicking the tickets button', (done) => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.click(selectors.moduleAccessView.ticketsSectionButton)
|
.click(selectors.moduleAccessView.ticketsSectionButton)
|
||||||
.wait(selectors.ticketsIndex.searchResult)
|
.wait(selectors.ticketsIndex.searchResult)
|
||||||
.parsedUrl()
|
.parsedUrl()
|
||||||
.then(url => {
|
.then((url) => {
|
||||||
expect(url.hash).toEqual('#!/ticket/index');
|
expect(url.hash).toEqual('#!/ticket/index');
|
||||||
done();
|
done();
|
||||||
}).catch(done.fail);
|
}).catch(done.fail);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should search for the ticket with id 1', done => {
|
it('should search for the ticket with id 1', (done) => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.wait(selectors.ticketsIndex.searchTicketInput)
|
.wait(selectors.ticketsIndex.searchTicketInput)
|
||||||
.type(selectors.ticketsIndex.searchTicketInput, 'id:1')
|
.type(selectors.ticketsIndex.searchTicketInput, 'id:1')
|
||||||
.click(selectors.ticketsIndex.searchButton)
|
.click(selectors.ticketsIndex.searchButton)
|
||||||
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
|
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
|
||||||
.countElement(selectors.ticketsIndex.searchResult)
|
.countElement(selectors.ticketsIndex.searchResult)
|
||||||
.then(result => {
|
.then((result) => {
|
||||||
expect(result).toEqual(1);
|
expect(result).toEqual(1);
|
||||||
done();
|
done();
|
||||||
}).catch(done.fail);
|
}).catch(done.fail);
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should click on the search result to access to the ticket notes`, done => {
|
it(`should click on the search result to access to the ticket notes`, (done) => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.waitForTextInElement(selectors.ticketsIndex.searchResult, '1')
|
.waitForTextInElement(selectors.ticketsIndex.searchResult, '1')
|
||||||
.waitToClick(selectors.ticketsIndex.searchResult)
|
.waitToClick(selectors.ticketsIndex.searchResult)
|
||||||
.waitToClick(selectors.ticketNotes.notesButton)
|
.waitToClick(selectors.ticketNotes.notesButton)
|
||||||
.waitForURL('observation')
|
.waitForURL('observation')
|
||||||
.url()
|
.url()
|
||||||
.then(url => {
|
.then((url) => {
|
||||||
expect(url).toContain('observation');
|
expect(url).toContain('observation');
|
||||||
done();
|
done();
|
||||||
}).catch(done.fail);
|
}).catch(done.fail);
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should click create a new note and delete a former one`, done => {
|
it(`should click create a new note and delete a former one`, (done) => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.waitToClick(selectors.ticketNotes.firstNoteRemoveButton)
|
.waitToClick(selectors.ticketNotes.firstNoteRemoveButton)
|
||||||
.waitToClick(selectors.ticketNotes.addNoteButton)
|
.waitToClick(selectors.ticketNotes.addNoteButton)
|
||||||
.waitToClick(selectors.ticketNotes.firstNoteSelect)
|
.waitToClick(selectors.ticketNotes.firstNoteSelect)
|
||||||
.waitToClick(selectors.ticketNotes.firstNoteSelectSecondOption)
|
.waitToClick(selectors.ticketNotes.firstNoteSelectSecondOption)
|
||||||
.type(selectors.ticketNotes.firstDescriptionInput, 'description')
|
.type(selectors.ticketNotes.firstDescriptionInput, 'description')
|
||||||
.click(selectors.ticketNotes.submitNotesButton)
|
.click(selectors.ticketNotes.submitNotesButton)
|
||||||
.waitForLastSnackbar()
|
.waitForLastSnackbar()
|
||||||
.then(result => {
|
.then((result) => {
|
||||||
expect(result).toEqual('Data saved!');
|
expect(result).toEqual('Data saved!');
|
||||||
done();
|
done();
|
||||||
}).catch(done.fail);
|
}).catch(done.fail);
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should confirm the note is the expected one`, done => {
|
it(`should confirm the note is the expected one`, (done) => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.click(selectors.ticketPackages.packagesButton)
|
.click(selectors.ticketPackages.packagesButton)
|
||||||
.wait(selectors.ticketPackages.firstPackageSelect)
|
.wait(selectors.ticketPackages.firstPackageSelect)
|
||||||
.click(selectors.ticketNotes.notesButton)
|
.click(selectors.ticketNotes.notesButton)
|
||||||
.waitProperty(selectors.ticketNotes.firstNoteSelect, 'value')
|
.waitProperty(selectors.ticketNotes.firstNoteSelect, 'value')
|
||||||
.then(result => {
|
.then((result) => {
|
||||||
expect(result).toEqual('observation one');
|
expect(result).toEqual('observation one');
|
||||||
return nightmare
|
return nightmare
|
||||||
.getProperty(selectors.ticketNotes.firstDescriptionInput, 'value');
|
.getProperty(selectors.ticketNotes.firstDescriptionInput, 'value');
|
||||||
})
|
})
|
||||||
.then(result => {
|
.then((result) => {
|
||||||
expect(result).toEqual('description');
|
expect(result).toEqual('description');
|
||||||
done();
|
done();
|
||||||
}).catch(done.fail);
|
}).catch(done.fail);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -7,59 +7,59 @@ describe('Ticket', () => {
|
||||||
|
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.waitForLogin('production');
|
.waitForLogin('production');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should access to the tickets index by clicking the tickets button', done => {
|
it('should access to the tickets index by clicking the tickets button', (done) => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.click(selectors.moduleAccessView.ticketsSectionButton)
|
.click(selectors.moduleAccessView.ticketsSectionButton)
|
||||||
.wait(selectors.ticketsIndex.searchResult)
|
.wait(selectors.ticketsIndex.searchResult)
|
||||||
.parsedUrl()
|
.parsedUrl()
|
||||||
.then(url => {
|
.then((url) => {
|
||||||
expect(url.hash).toEqual('#!/ticket/index');
|
expect(url.hash).toEqual('#!/ticket/index');
|
||||||
done();
|
done();
|
||||||
}).catch(done.fail);
|
}).catch(done.fail);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should search for the ticket with id 1', done => {
|
it('should search for the ticket with id 1', (done) => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.wait(selectors.ticketsIndex.searchTicketInput)
|
.wait(selectors.ticketsIndex.searchTicketInput)
|
||||||
.type(selectors.ticketsIndex.searchTicketInput, 'id:1')
|
.type(selectors.ticketsIndex.searchTicketInput, 'id:1')
|
||||||
.click(selectors.ticketsIndex.searchButton)
|
.click(selectors.ticketsIndex.searchButton)
|
||||||
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
|
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
|
||||||
.countElement(selectors.ticketsIndex.searchResult)
|
.countElement(selectors.ticketsIndex.searchResult)
|
||||||
.then(result => {
|
.then((result) => {
|
||||||
expect(result).toEqual(1);
|
expect(result).toEqual(1);
|
||||||
done();
|
done();
|
||||||
}).catch(done.fail);
|
}).catch(done.fail);
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should click on the search result to access to the ticket expeditions`, done => {
|
it(`should click on the search result to access to the ticket expeditions`, (done) => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.waitForTextInElement(selectors.ticketsIndex.searchResult, '1')
|
.waitForTextInElement(selectors.ticketsIndex.searchResult, '1')
|
||||||
.waitToClick(selectors.ticketsIndex.searchResult)
|
.waitToClick(selectors.ticketsIndex.searchResult)
|
||||||
.waitToClick(selectors.ticketExpedition.expeditionButton)
|
.waitToClick(selectors.ticketExpedition.expeditionButton)
|
||||||
.waitForURL('expedition')
|
.waitForURL('expedition')
|
||||||
.url()
|
.url()
|
||||||
.then(url => {
|
.then((url) => {
|
||||||
expect(url).toContain('expedition');
|
expect(url).toContain('expedition');
|
||||||
done();
|
done();
|
||||||
}).catch(done.fail);
|
}).catch(done.fail);
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should delete a former expedition and confirm the remaining expedition is the expected one`, done => {
|
it(`should delete a former expedition and confirm the remaining expedition is the expected one`, (done) => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.waitToClick(selectors.ticketExpedition.secondExpeditionRemoveButton)
|
.waitToClick(selectors.ticketExpedition.secondExpeditionRemoveButton)
|
||||||
.click(selectors.ticketPackages.packagesButton)
|
.click(selectors.ticketPackages.packagesButton)
|
||||||
.wait(selectors.ticketPackages.firstPackageSelect)
|
.wait(selectors.ticketPackages.firstPackageSelect)
|
||||||
.click(selectors.ticketExpedition.expeditionButton)
|
.click(selectors.ticketExpedition.expeditionButton)
|
||||||
.wait(selectors.ticketExpedition.secondExpeditionText)
|
.wait(selectors.ticketExpedition.secondExpeditionText)
|
||||||
.getInnerText(selectors.ticketExpedition.secondExpeditionText)
|
.getInnerText(selectors.ticketExpedition.secondExpeditionText)
|
||||||
.then(value => {
|
.then((value) => {
|
||||||
expect(value).toContain('Iron Patriot');
|
expect(value).toContain('Iron Patriot');
|
||||||
expect(value).toContain('root');
|
expect(value).toContain('root');
|
||||||
done();
|
done();
|
||||||
}).catch(done.fail);
|
}).catch(done.fail);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -6,135 +6,111 @@ describe('Ticket List sale path', () => {
|
||||||
|
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.waitForLogin('employee');
|
.waitForLogin('employee');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should click on the Tickets button of the top bar menu', done => {
|
it('should click on the Tickets button of the top bar menu', async () => {
|
||||||
return nightmare
|
const url = await nightmare
|
||||||
.waitToClick(selectors.globalItems.applicationsMenuButton)
|
.waitToClick(selectors.globalItems.applicationsMenuButton)
|
||||||
.wait(selectors.globalItems.applicationsMenuVisible)
|
.wait(selectors.globalItems.applicationsMenuVisible)
|
||||||
.waitToClick(selectors.globalItems.ticketsButton)
|
.waitToClick(selectors.globalItems.ticketsButton)
|
||||||
.wait(selectors.ticketsIndex.searchResult)
|
.wait(selectors.ticketsIndex.searchResult)
|
||||||
.parsedUrl()
|
.parsedUrl();
|
||||||
.then(url => {
|
|
||||||
expect(url.hash).toEqual('#!/ticket/index');
|
expect(url.hash).toEqual('#!/ticket/index');
|
||||||
done();
|
|
||||||
}).catch(done.fail);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should search for the ticket 1', done => {
|
it('should search for the ticket 1', async () => {
|
||||||
return nightmare
|
const result = await nightmare
|
||||||
.wait(selectors.ticketsIndex.searchResult)
|
.wait(selectors.ticketsIndex.searchResult)
|
||||||
.type(selectors.ticketsIndex.searchTicketInput, 'id:1')
|
.type(selectors.ticketsIndex.searchTicketInput, 'id:1')
|
||||||
.click(selectors.ticketsIndex.searchButton)
|
.click(selectors.ticketsIndex.searchButton)
|
||||||
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
|
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
|
||||||
.countElement(selectors.ticketsIndex.searchResult)
|
.countElement(selectors.ticketsIndex.searchResult);
|
||||||
.then(result => {
|
|
||||||
expect(result).toEqual(1);
|
expect(result).toEqual(1);
|
||||||
done();
|
|
||||||
}).catch(done.fail);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should click on the search result to access to the ticket's sale`, done => {
|
it(`should click on the search result to access to the ticket's sale`, async () => {
|
||||||
return nightmare
|
const url = await nightmare
|
||||||
.waitForTextInElement(selectors.ticketsIndex.searchResult, 'address 21')
|
.waitForTextInElement(selectors.ticketsIndex.searchResult, 'address 21')
|
||||||
.waitToClick(selectors.ticketsIndex.searchResult)
|
.waitToClick(selectors.ticketsIndex.searchResult)
|
||||||
.waitToClick(selectors.ticketSales.saleButton)
|
.waitToClick(selectors.ticketSales.saleButton)
|
||||||
.waitForURL('sale')
|
.waitForURL('sale')
|
||||||
.url()
|
.url();
|
||||||
.then(url => {
|
|
||||||
expect(url).toContain('sale');
|
expect(url).toContain('sale');
|
||||||
done();
|
|
||||||
}).catch(done.fail);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should confirm the first ticket sale contains the colour', done => {
|
it('should confirm the first ticket sale contains the colour', async () => {
|
||||||
return nightmare
|
const value = await nightmare
|
||||||
.wait(selectors.ticketSales.firstSaleText)
|
.wait(selectors.ticketSales.firstSaleText)
|
||||||
.getInnerText(selectors.ticketSales.firstSaleColour)
|
.getInnerText(selectors.ticketSales.firstSaleColour);
|
||||||
.then(value => {
|
|
||||||
expect(value).toContain('Yellow');
|
expect(value).toContain('Yellow');
|
||||||
done();
|
|
||||||
}).catch(done.fail);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should confirm the first ticket sale contains the lenght', done => {
|
it('should confirm the first ticket sale contains the lenght', async () => {
|
||||||
return nightmare
|
const value = await nightmare
|
||||||
.wait(selectors.ticketSales.firstSaleText)
|
.wait(selectors.ticketSales.firstSaleText)
|
||||||
.getInnerText(selectors.ticketSales.firstSaleText)
|
.getInnerText(selectors.ticketSales.firstSaleText);
|
||||||
.then(value => {
|
|
||||||
expect(value).toContain('5');
|
expect(value).toContain('5');
|
||||||
done();
|
|
||||||
}).catch(done.fail);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should confirm the first ticket sale contains the price', done => {
|
it('should confirm the first ticket sale contains the price', async () => {
|
||||||
return nightmare
|
const value = await nightmare
|
||||||
.wait(selectors.ticketSales.firstSaleText)
|
.wait(selectors.ticketSales.firstSaleText)
|
||||||
.getInnerText(selectors.ticketSales.firstSalePrice)
|
.getInnerText(selectors.ticketSales.firstSalePrice);
|
||||||
.then(value => {
|
|
||||||
expect(value).toContain('9.10');
|
expect(value).toContain('9.10');
|
||||||
done();
|
|
||||||
}).catch(done.fail);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should confirm the first ticket sale contains the discount', done => {
|
it('should confirm the first ticket sale contains the discount', async () => {
|
||||||
return nightmare
|
const value = await nightmare
|
||||||
.wait(selectors.ticketSales.firstSaleText)
|
.wait(selectors.ticketSales.firstSaleText)
|
||||||
.getInnerText(selectors.ticketSales.firstSaleDiscount)
|
.getInnerText(selectors.ticketSales.firstSaleDiscount);
|
||||||
.then(value => {
|
|
||||||
expect(value).toContain('0 %');
|
expect(value).toContain('0 %');
|
||||||
done();
|
|
||||||
}).catch(done.fail);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should confirm the first ticket sale contains the total import', done => {
|
it('should confirm the first ticket sale contains the total import', async () => {
|
||||||
return nightmare
|
const value = await nightmare
|
||||||
.wait(selectors.ticketSales.firstSaleText)
|
.wait(selectors.ticketSales.firstSaleText)
|
||||||
.getInnerText(selectors.ticketSales.firstSaleImport)
|
.getInnerText(selectors.ticketSales.firstSaleImport);
|
||||||
.then(value => {
|
|
||||||
expect(value).toContain('45.50');
|
expect(value).toContain('45.50');
|
||||||
done();
|
|
||||||
}).catch(done.fail);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should confirm the second ticket sale contains the colour', done => {
|
it('should confirm the second ticket sale contains the colour', async () => {
|
||||||
return nightmare
|
const value = await nightmare
|
||||||
.wait(selectors.ticketSales.secondSaleText)
|
.wait(selectors.ticketSales.secondSaleText)
|
||||||
.getInnerText(selectors.ticketSales.secondSaleColour)
|
.getInnerText(selectors.ticketSales.secondSaleColour);
|
||||||
.then(value => {
|
|
||||||
expect(value).toContain('Red');
|
expect(value).toContain('Red');
|
||||||
done();
|
|
||||||
}).catch(done.fail);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should confirm the second ticket sale contains the price', done => {
|
it('should confirm the second ticket sale contains the price', async () => {
|
||||||
return nightmare
|
const value = await nightmare
|
||||||
.wait(selectors.ticketSales.secondSaleText)
|
.wait(selectors.ticketSales.secondSaleText)
|
||||||
.getInnerText(selectors.ticketSales.secondSalePrice)
|
.getInnerText(selectors.ticketSales.secondSalePrice);
|
||||||
.then(value => {
|
|
||||||
expect(value).toContain('1.07');
|
expect(value).toContain('1.07');
|
||||||
done();
|
|
||||||
}).catch(done.fail);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should confirm the second ticket sale contains the discount', done => {
|
it('should confirm the second ticket sale contains the discount', async () => {
|
||||||
return nightmare
|
const value = await nightmare
|
||||||
.wait(selectors.ticketSales.secondSaleText)
|
.wait(selectors.ticketSales.secondSaleText)
|
||||||
.getInnerText(selectors.ticketSales.secondSaleDiscount)
|
.getInnerText(selectors.ticketSales.secondSaleDiscount);
|
||||||
.then(value => {
|
|
||||||
expect(value).toContain('0 %');
|
expect(value).toContain('0 %');
|
||||||
done();
|
|
||||||
}).catch(done.fail);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should confirm the second ticket sale contains the total import', done => {
|
it('should confirm the second ticket sale contains the total import', async () => {
|
||||||
return nightmare
|
const value = await nightmare
|
||||||
.wait(selectors.ticketSales.secondSaleText)
|
.wait(selectors.ticketSales.secondSaleText)
|
||||||
.getInnerText(selectors.ticketSales.secondSaleImport)
|
.getInnerText(selectors.ticketSales.secondSaleImport);
|
||||||
.then(value => {
|
|
||||||
expect(value).toContain('10.70');
|
expect(value).toContain('10.70');
|
||||||
done();
|
|
||||||
}).catch(done.fail);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -6,131 +6,131 @@ describe('Ticket Create packages path', () => {
|
||||||
|
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.waitForLogin('employee');
|
.waitForLogin('employee');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should click on the Tickets button of the top bar menu', done => {
|
it('should click on the Tickets button of the top bar menu', (done) => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.waitToClick(selectors.globalItems.applicationsMenuButton)
|
.waitToClick(selectors.globalItems.applicationsMenuButton)
|
||||||
.wait(selectors.globalItems.applicationsMenuVisible)
|
.wait(selectors.globalItems.applicationsMenuVisible)
|
||||||
.waitToClick(selectors.globalItems.ticketsButton)
|
.waitToClick(selectors.globalItems.ticketsButton)
|
||||||
.wait(selectors.ticketsIndex.searchResult)
|
.wait(selectors.ticketsIndex.searchResult)
|
||||||
.parsedUrl()
|
.parsedUrl()
|
||||||
.then(url => {
|
.then((url) => {
|
||||||
expect(url.hash).toEqual('#!/ticket/index');
|
expect(url.hash).toEqual('#!/ticket/index');
|
||||||
done();
|
done();
|
||||||
}).catch(done.fail);
|
}).catch(done.fail);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should search for the ticket 1', done => {
|
it('should search for the ticket 1', (done) => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.wait(selectors.ticketsIndex.searchResult)
|
.wait(selectors.ticketsIndex.searchResult)
|
||||||
.type(selectors.ticketsIndex.searchTicketInput, 'id:1')
|
.type(selectors.ticketsIndex.searchTicketInput, 'id:1')
|
||||||
.click(selectors.ticketsIndex.searchButton)
|
.click(selectors.ticketsIndex.searchButton)
|
||||||
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
|
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
|
||||||
.countElement(selectors.ticketsIndex.searchResult)
|
.countElement(selectors.ticketsIndex.searchResult)
|
||||||
.then(result => {
|
.then((result) => {
|
||||||
expect(result).toEqual(1);
|
expect(result).toEqual(1);
|
||||||
done();
|
done();
|
||||||
}).catch(done.fail);
|
}).catch(done.fail);
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should click on the search result to access to the ticket packages`, done => {
|
it(`should click on the search result to access to the ticket packages`, (done) => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.waitForTextInElement(selectors.ticketsIndex.searchResultAddress, 'address 21')
|
.waitForTextInElement(selectors.ticketsIndex.searchResultAddress, 'address 21')
|
||||||
.waitToClick(selectors.ticketsIndex.searchResult)
|
.waitToClick(selectors.ticketsIndex.searchResult)
|
||||||
.waitToClick(selectors.ticketPackages.packagesButton)
|
.waitToClick(selectors.ticketPackages.packagesButton)
|
||||||
.waitForURL('package/index')
|
.waitForURL('package/index')
|
||||||
.url()
|
.url()
|
||||||
.then(url => {
|
.then((url) => {
|
||||||
expect(url).toContain('package/index');
|
expect(url).toContain('package/index');
|
||||||
done();
|
done();
|
||||||
}).catch(done.fail);
|
}).catch(done.fail);
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should delete the first package and receive and error to save a new one with blank quantity`, done => {
|
it(`should delete the first package and receive and error to save a new one with blank quantity`, (done) => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.waitToClick(selectors.ticketPackages.firstRemovePackageButton)
|
.waitToClick(selectors.ticketPackages.firstRemovePackageButton)
|
||||||
.waitToClick(selectors.ticketPackages.addPackageButton)
|
.waitToClick(selectors.ticketPackages.addPackageButton)
|
||||||
.waitToClick(selectors.ticketPackages.firstPackageSelect)
|
.waitToClick(selectors.ticketPackages.firstPackageSelect)
|
||||||
.waitToClick(selectors.ticketPackages.firstPackageSelectOptionTwo)
|
.waitToClick(selectors.ticketPackages.firstPackageSelectOptionTwo)
|
||||||
.click(selectors.ticketPackages.savePackagesButton)
|
.click(selectors.ticketPackages.savePackagesButton)
|
||||||
.waitForLastSnackbar()
|
.waitForLastSnackbar()
|
||||||
.then(result => {
|
.then((result) => {
|
||||||
expect(result).toEqual('Some fields are invalid');
|
expect(result).toEqual('Some fields are invalid');
|
||||||
done();
|
done();
|
||||||
}).catch(done.fail);
|
}).catch(done.fail);
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should attempt create a new package but receive an error if quantity is a string`, done => {
|
it(`should attempt create a new package but receive an error if quantity is a string`, (done) => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.type(selectors.ticketPackages.firstQuantityInput, 'ninety 9')
|
.type(selectors.ticketPackages.firstQuantityInput, 'ninety 9')
|
||||||
.click(selectors.ticketPackages.savePackagesButton)
|
.click(selectors.ticketPackages.savePackagesButton)
|
||||||
.waitForLastSnackbar()
|
.waitForLastSnackbar()
|
||||||
.then(result => {
|
.then((result) => {
|
||||||
expect(result).toEqual('Some fields are invalid');
|
expect(result).toEqual('Some fields are invalid');
|
||||||
done();
|
done();
|
||||||
}).catch(done.fail);
|
}).catch(done.fail);
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should attempt create a new package but receive an error if quantity is 0`, done => {
|
it(`should attempt create a new package but receive an error if quantity is 0`, (done) => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.clearInput(selectors.ticketPackages.firstQuantityInput)
|
.clearInput(selectors.ticketPackages.firstQuantityInput)
|
||||||
.type(selectors.ticketPackages.firstQuantityInput, 0)
|
.type(selectors.ticketPackages.firstQuantityInput, 0)
|
||||||
.click(selectors.ticketPackages.savePackagesButton)
|
.click(selectors.ticketPackages.savePackagesButton)
|
||||||
.waitForLastSnackbar()
|
.waitForLastSnackbar()
|
||||||
.then(result => {
|
.then((result) => {
|
||||||
expect(result).toEqual('Some fields are invalid');
|
expect(result).toEqual('Some fields are invalid');
|
||||||
done();
|
done();
|
||||||
}).catch(done.fail);
|
}).catch(done.fail);
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should attempt create a new package but receive an error if package is blank`, done => {
|
it(`should attempt create a new package but receive an error if package is blank`, (done) => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.clearInput(selectors.ticketPackages.firstQuantityInput)
|
.clearInput(selectors.ticketPackages.firstQuantityInput)
|
||||||
.type(selectors.ticketPackages.firstQuantityInput, 99)
|
.type(selectors.ticketPackages.firstQuantityInput, 99)
|
||||||
.click(selectors.ticketPackages.clearPackageSelectButton)
|
.click(selectors.ticketPackages.clearPackageSelectButton)
|
||||||
.click(selectors.ticketPackages.savePackagesButton)
|
.click(selectors.ticketPackages.savePackagesButton)
|
||||||
.waitForLastSnackbar()
|
.waitForLastSnackbar()
|
||||||
.then(result => {
|
.then((result) => {
|
||||||
expect(result).toEqual('Package cannot be blank');
|
expect(result).toEqual('Package cannot be blank');
|
||||||
done();
|
done();
|
||||||
}).catch(done.fail);
|
}).catch(done.fail);
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should create a new package with correct data`, done => {
|
it(`should create a new package with correct data`, (done) => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.waitToClick(selectors.ticketPackages.firstPackageSelect)
|
.waitToClick(selectors.ticketPackages.firstPackageSelect)
|
||||||
.waitToClick(selectors.ticketPackages.firstPackageSelectOptionTwo)
|
.waitToClick(selectors.ticketPackages.firstPackageSelectOptionTwo)
|
||||||
.waitForTextInInput(selectors.ticketPackages.firstPackageSelect, 'Legendary Box')
|
.waitForTextInInput(selectors.ticketPackages.firstPackageSelect, 'Legendary Box')
|
||||||
.click(selectors.ticketPackages.savePackagesButton)
|
.click(selectors.ticketPackages.savePackagesButton)
|
||||||
.waitForLastSnackbar()
|
.waitForLastSnackbar()
|
||||||
.then(result => {
|
.then((result) => {
|
||||||
expect(result).toEqual('Data saved!');
|
expect(result).toEqual('Data saved!');
|
||||||
done();
|
done();
|
||||||
}).catch(done.fail);
|
}).catch(done.fail);
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should confirm the first select is the expected one`, done => {
|
it(`should confirm the first select is the expected one`, (done) => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.click(selectors.ticketSales.saleButton)
|
.click(selectors.ticketSales.saleButton)
|
||||||
.wait(selectors.ticketSales.firstPackageSelect)
|
.wait(selectors.ticketSales.firstPackageSelect)
|
||||||
.click(selectors.ticketPackages.packagesButton)
|
.click(selectors.ticketPackages.packagesButton)
|
||||||
.waitForTextInInput(selectors.ticketPackages.firstPackageSelect, 'Legendary Box')
|
.waitForTextInInput(selectors.ticketPackages.firstPackageSelect, 'Legendary Box')
|
||||||
.getInputValue(selectors.ticketPackages.firstPackageSelect)
|
.getInputValue(selectors.ticketPackages.firstPackageSelect)
|
||||||
.then(result => {
|
.then((result) => {
|
||||||
expect(result).toEqual('Legendary Box');
|
expect(result).toEqual('Legendary Box');
|
||||||
done();
|
done();
|
||||||
}).catch(done.fail);
|
}).catch(done.fail);
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should confirm the first quantity is the expected one`, done => {
|
it(`should confirm the first quantity is the expected one`, (done) => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.waitForTextInInput(selectors.ticketPackages.firstQuantityInput, '99')
|
.waitForTextInInput(selectors.ticketPackages.firstQuantityInput, '99')
|
||||||
.getInputValue(selectors.ticketPackages.firstQuantityInput)
|
.getInputValue(selectors.ticketPackages.firstQuantityInput)
|
||||||
.then(result => {
|
.then((result) => {
|
||||||
expect(result).toEqual('99');
|
expect(result).toEqual('99');
|
||||||
done();
|
done();
|
||||||
}).catch(done.fail);
|
}).catch(done.fail);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -7,103 +7,103 @@ describe('Ticket', () => {
|
||||||
|
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.waitForLogin('production');
|
.waitForLogin('production');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should click on the Tickets button of the top bar menu', done => {
|
it('should click on the Tickets button of the top bar menu', (done) => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.waitToClick(selectors.globalItems.applicationsMenuButton)
|
.waitToClick(selectors.globalItems.applicationsMenuButton)
|
||||||
.wait(selectors.globalItems.applicationsMenuVisible)
|
.wait(selectors.globalItems.applicationsMenuVisible)
|
||||||
.waitToClick(selectors.globalItems.ticketsButton)
|
.waitToClick(selectors.globalItems.ticketsButton)
|
||||||
.wait(selectors.ticketsIndex.searchResult)
|
.wait(selectors.ticketsIndex.searchResult)
|
||||||
.parsedUrl()
|
.parsedUrl()
|
||||||
.then(url => {
|
.then((url) => {
|
||||||
expect(url.hash).toEqual('#!/ticket/index');
|
expect(url.hash).toEqual('#!/ticket/index');
|
||||||
done();
|
done();
|
||||||
}).catch(done.fail);
|
}).catch(done.fail);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should search for the ticket 1', done => {
|
it('should search for the ticket 1', (done) => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.wait(selectors.ticketsIndex.searchResult)
|
.wait(selectors.ticketsIndex.searchResult)
|
||||||
.type(selectors.ticketsIndex.searchTicketInput, 'id:1')
|
.type(selectors.ticketsIndex.searchTicketInput, 'id:1')
|
||||||
.click(selectors.ticketsIndex.searchButton)
|
.click(selectors.ticketsIndex.searchButton)
|
||||||
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
|
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
|
||||||
.countElement(selectors.ticketsIndex.searchResult)
|
.countElement(selectors.ticketsIndex.searchResult)
|
||||||
.then(result => {
|
.then((result) => {
|
||||||
expect(result).toEqual(1);
|
expect(result).toEqual(1);
|
||||||
done();
|
done();
|
||||||
}).catch(done.fail);
|
}).catch(done.fail);
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should click on the search result to access to the ticket Tracking`, done => {
|
it(`should click on the search result to access to the ticket Tracking`, (done) => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.waitForTextInElement(selectors.ticketsIndex.searchResult, 'address 21')
|
.waitForTextInElement(selectors.ticketsIndex.searchResult, 'address 21')
|
||||||
.waitToClick(selectors.ticketsIndex.searchResult)
|
.waitToClick(selectors.ticketsIndex.searchResult)
|
||||||
.waitToClick(selectors.ticketTracking.trackingButton)
|
.waitToClick(selectors.ticketTracking.trackingButton)
|
||||||
.waitForURL('tracking/index')
|
.waitForURL('tracking/index')
|
||||||
.url()
|
.url()
|
||||||
.then(url => {
|
.then((url) => {
|
||||||
expect(url).toContain('tracking/index');
|
expect(url).toContain('tracking/index');
|
||||||
done();
|
done();
|
||||||
}).catch(done.fail);
|
}).catch(done.fail);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should access to the create state view by clicking the create floating button', done => {
|
it('should access to the create state view by clicking the create floating button', (done) => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.click(selectors.ticketTracking.createStateButton)
|
.click(selectors.ticketTracking.createStateButton)
|
||||||
.wait(selectors.createStateView.stateInput)
|
.wait(selectors.createStateView.stateInput)
|
||||||
.parsedUrl()
|
.parsedUrl()
|
||||||
.then(url => {
|
.then((url) => {
|
||||||
expect(url.hash).toContain('tracking/edit');
|
expect(url.hash).toContain('tracking/edit');
|
||||||
done();
|
done();
|
||||||
}).catch(done.fail);
|
}).catch(done.fail);
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should attempt create a new state but receive an error if state is empty`, done => {
|
it(`should attempt create a new state but receive an error if state is empty`, (done) => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.click(selectors.createStateView.saveStateButton)
|
.click(selectors.createStateView.saveStateButton)
|
||||||
.waitForLastSnackbar()
|
.waitForLastSnackbar()
|
||||||
.then(result => {
|
.then((result) => {
|
||||||
expect(result).toEqual('No changes to save');
|
expect(result).toEqual('No changes to save');
|
||||||
done();
|
done();
|
||||||
}).catch(done.fail);
|
}).catch(done.fail);
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should attempt create a new state then clear and save it`, done => {
|
it(`should attempt create a new state then clear and save it`, (done) => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.waitToClick(selectors.createStateView.stateInput)
|
.waitToClick(selectors.createStateView.stateInput)
|
||||||
.waitToClick(selectors.createStateView.stateInputOptionOne)
|
.waitToClick(selectors.createStateView.stateInputOptionOne)
|
||||||
.waitToClick(selectors.createStateView.clearStateInputButton)
|
.waitToClick(selectors.createStateView.clearStateInputButton)
|
||||||
.click(selectors.createStateView.saveStateButton)
|
.click(selectors.createStateView.saveStateButton)
|
||||||
.waitForLastSnackbar()
|
.waitForLastSnackbar()
|
||||||
.then(result => {
|
.then((result) => {
|
||||||
expect(result).toEqual('Data saved!');
|
expect(result).toEqual('Data saved!');
|
||||||
done();
|
done();
|
||||||
}).catch(done.fail);
|
}).catch(done.fail);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should again access to the create state view by clicking the create floating button', done => {
|
it('should again access to the create state view by clicking the create floating button', (done) => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.click(selectors.ticketTracking.createStateButton)
|
.click(selectors.ticketTracking.createStateButton)
|
||||||
.wait(selectors.createStateView.stateInput)
|
.wait(selectors.createStateView.stateInput)
|
||||||
.parsedUrl()
|
.parsedUrl()
|
||||||
.then(url => {
|
.then((url) => {
|
||||||
expect(url.hash).toContain('tracking/edit');
|
expect(url.hash).toContain('tracking/edit');
|
||||||
done();
|
done();
|
||||||
}).catch(done.fail);
|
}).catch(done.fail);
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should create a new state`, done => {
|
it(`should create a new state`, (done) => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.waitToClick(selectors.createStateView.stateInput)
|
.waitToClick(selectors.createStateView.stateInput)
|
||||||
.waitToClick(selectors.createStateView.stateInputOptionOne)
|
.waitToClick(selectors.createStateView.stateInputOptionOne)
|
||||||
.click(selectors.createStateView.saveStateButton)
|
.click(selectors.createStateView.saveStateButton)
|
||||||
.waitForLastSnackbar()
|
.waitForLastSnackbar()
|
||||||
.then(result => {
|
.then((result) => {
|
||||||
expect(result).toEqual('Data saved!');
|
expect(result).toEqual('Data saved!');
|
||||||
done();
|
done();
|
||||||
}).catch(done.fail);
|
}).catch(done.fail);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -7,156 +7,156 @@ describe('Ticket', () => {
|
||||||
|
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.waitForLogin('employee');
|
.waitForLogin('employee');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should click on the Tickets button of the top bar menu', done => {
|
it('should click on the Tickets button of the top bar menu', (done) => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.waitToClick(selectors.globalItems.applicationsMenuButton)
|
.waitToClick(selectors.globalItems.applicationsMenuButton)
|
||||||
.wait(selectors.globalItems.applicationsMenuVisible)
|
.wait(selectors.globalItems.applicationsMenuVisible)
|
||||||
.waitToClick(selectors.globalItems.ticketsButton)
|
.waitToClick(selectors.globalItems.ticketsButton)
|
||||||
.wait(selectors.ticketsIndex.searchResult)
|
.wait(selectors.ticketsIndex.searchResult)
|
||||||
.parsedUrl()
|
.parsedUrl()
|
||||||
.then(url => {
|
.then((url) => {
|
||||||
expect(url.hash).toEqual('#!/ticket/index');
|
expect(url.hash).toEqual('#!/ticket/index');
|
||||||
done();
|
done();
|
||||||
}).catch(done.fail);
|
}).catch(done.fail);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should search for the ticket 11', done => {
|
it('should search for the ticket 11', (done) => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.wait(selectors.ticketsIndex.searchResult)
|
.wait(selectors.ticketsIndex.searchResult)
|
||||||
.type(selectors.ticketsIndex.searchTicketInput, 'id:11')
|
.type(selectors.ticketsIndex.searchTicketInput, 'id:11')
|
||||||
.click(selectors.ticketsIndex.searchButton)
|
.click(selectors.ticketsIndex.searchButton)
|
||||||
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
|
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
|
||||||
.countElement(selectors.ticketsIndex.searchResult)
|
.countElement(selectors.ticketsIndex.searchResult)
|
||||||
.then(result => {
|
.then((result) => {
|
||||||
expect(result).toEqual(1);
|
expect(result).toEqual(1);
|
||||||
done();
|
done();
|
||||||
}).catch(done.fail);
|
}).catch(done.fail);
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should click on the search result to access to the ticket Basic Data`, done => {
|
it(`should click on the search result to access to the ticket Basic Data`, (done) => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.waitForTextInElement(selectors.ticketsIndex.searchResult, 'address 21') // should be Bruce Wayne
|
.waitForTextInElement(selectors.ticketsIndex.searchResult, 'address 21') // should be Bruce Wayne
|
||||||
.waitToClick(selectors.ticketsIndex.searchResult)
|
.waitToClick(selectors.ticketsIndex.searchResult)
|
||||||
.waitToClick(selectors.ticketBasicData.basicDataButton)
|
.waitToClick(selectors.ticketBasicData.basicDataButton)
|
||||||
.waitForURL('data/step-one')
|
.waitForURL('data/step-one')
|
||||||
.url()
|
.url()
|
||||||
.then(url => {
|
.then((url) => {
|
||||||
expect(url).toContain('data/step-one');
|
expect(url).toContain('data/step-one');
|
||||||
done();
|
done();
|
||||||
}).catch(done.fail);
|
}).catch(done.fail);
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should edit the client and address of the ticket then click next`, done => {
|
it(`should edit the client and address of the ticket then click next`, (done) => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.waitToClick(selectors.ticketBasicData.clientSelect)
|
.waitToClick(selectors.ticketBasicData.clientSelect)
|
||||||
.waitToClick(selectors.ticketBasicData.clientSelectThirdOption)
|
.waitToClick(selectors.ticketBasicData.clientSelectThirdOption)
|
||||||
.wait(500)
|
.wait(500)
|
||||||
.waitToClick(selectors.ticketBasicData.addressSelect)
|
.waitToClick(selectors.ticketBasicData.addressSelect)
|
||||||
.waitToClick(selectors.ticketBasicData.addressSelectSecondOption)
|
.waitToClick(selectors.ticketBasicData.addressSelectSecondOption)
|
||||||
.waitForTextInInput(selectors.ticketBasicData.addressSelect, 'Charles Xavier')
|
.waitForTextInInput(selectors.ticketBasicData.addressSelect, 'Charles Xavier')
|
||||||
.click(selectors.ticketBasicData.nextStepButton)
|
.click(selectors.ticketBasicData.nextStepButton)
|
||||||
.waitForURL('data/step-two')
|
.waitForURL('data/step-two')
|
||||||
.url()
|
.url()
|
||||||
.then(url => {
|
.then((url) => {
|
||||||
expect(url).toContain('data/step-two');
|
expect(url).toContain('data/step-two');
|
||||||
done();
|
done();
|
||||||
}).catch(done.fail);
|
}).catch(done.fail);
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should have no price diference`, done => {
|
it(`should have no price diference`, (done) => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.getInnerText(selectors.ticketBasicData.stepTwoTotalPriceDif)
|
.getInnerText(selectors.ticketBasicData.stepTwoTotalPriceDif)
|
||||||
.then(result => {
|
.then((result) => {
|
||||||
expect(result).toContain('0');
|
expect(result).toContain('0');
|
||||||
done();
|
done();
|
||||||
}).catch(done.fail);
|
}).catch(done.fail);
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should click next to move on to step three`, done => {
|
it(`should click next to move on to step three`, (done) => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.click(selectors.ticketBasicData.nextStepButton)
|
.click(selectors.ticketBasicData.nextStepButton)
|
||||||
.waitForURL('data/step-three')
|
.waitForURL('data/step-three')
|
||||||
.url()
|
.url()
|
||||||
.then(url => {
|
.then((url) => {
|
||||||
expect(url).toContain('data/step-three');
|
expect(url).toContain('data/step-three');
|
||||||
done();
|
done();
|
||||||
}).catch(done.fail);
|
}).catch(done.fail);
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should select a reason for the changes made then click on finalize`, done => {
|
it(`should select a reason for the changes made then click on finalize`, (done) => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.waitToClick(selectors.ticketBasicData.chargesReason)
|
.waitToClick(selectors.ticketBasicData.chargesReason)
|
||||||
.waitToClick(selectors.ticketBasicData.chargesReasonFourthOption)
|
.waitToClick(selectors.ticketBasicData.chargesReasonFourthOption)
|
||||||
.waitForTextInInput(selectors.ticketBasicData.chargesReason, 'No realizar modificaciones en precios')
|
.waitForTextInInput(selectors.ticketBasicData.chargesReason, 'No realizar modificaciones en precios')
|
||||||
.click(selectors.ticketBasicData.finalizeButton)
|
.click(selectors.ticketBasicData.finalizeButton)
|
||||||
.waitForURL('summary')
|
.waitForURL('summary')
|
||||||
.url()
|
.url()
|
||||||
.then(url => {
|
.then((url) => {
|
||||||
expect(url).toContain('summary');
|
expect(url).toContain('summary');
|
||||||
done();
|
done();
|
||||||
}).catch(done.fail);
|
}).catch(done.fail);
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should go back to ticket.basicData section`, done => {
|
it(`should go back to ticket.basicData section`, (done) => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.waitToClick(selectors.ticketBasicData.basicDataButton)
|
.waitToClick(selectors.ticketBasicData.basicDataButton)
|
||||||
.waitForURL('data/step-one')
|
.waitForURL('data/step-one')
|
||||||
.url()
|
.url()
|
||||||
.then(url => {
|
.then((url) => {
|
||||||
expect(url).toContain('data/step-one');
|
expect(url).toContain('data/step-one');
|
||||||
done();
|
done();
|
||||||
}).catch(done.fail);
|
}).catch(done.fail);
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should edit the ticket agency then click next`, done => {
|
it(`should edit the ticket agency then click next`, (done) => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.waitToClick(selectors.ticketBasicData.agencySelect)
|
.waitToClick(selectors.ticketBasicData.agencySelect)
|
||||||
.waitToClick(selectors.ticketBasicData.agencySelectOptionSix)
|
.waitToClick(selectors.ticketBasicData.agencySelectOptionSix)
|
||||||
.waitForTextInInput(selectors.ticketBasicData.agencySelect, 'Expensive')
|
.waitForTextInInput(selectors.ticketBasicData.agencySelect, 'Expensive')
|
||||||
.click(selectors.ticketBasicData.nextStepButton)
|
.click(selectors.ticketBasicData.nextStepButton)
|
||||||
.waitForURL('data/step-two')
|
.waitForURL('data/step-two')
|
||||||
.url()
|
.url()
|
||||||
.then(url => {
|
.then((url) => {
|
||||||
expect(url).toContain('data/step-two');
|
expect(url).toContain('data/step-two');
|
||||||
done();
|
done();
|
||||||
}).catch(done.fail);
|
}).catch(done.fail);
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should have a price diference`, done => {
|
it(`should have a price diference`, (done) => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.getInnerText(selectors.ticketBasicData.stepTwoTotalPriceDif)
|
.getInnerText(selectors.ticketBasicData.stepTwoTotalPriceDif)
|
||||||
.then(result => {
|
.then((result) => {
|
||||||
expect(result).toContain('-20.65');
|
expect(result).toContain('-20.65');
|
||||||
done();
|
done();
|
||||||
}).catch(done.fail);
|
}).catch(done.fail);
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should then click next to move on to step three`, done => {
|
it(`should then click next to move on to step three`, (done) => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.click(selectors.ticketBasicData.nextStepButton)
|
.click(selectors.ticketBasicData.nextStepButton)
|
||||||
.waitForURL('data/step-three')
|
.waitForURL('data/step-three')
|
||||||
.url()
|
.url()
|
||||||
.then(url => {
|
.then((url) => {
|
||||||
expect(url).toContain('data/step-three');
|
expect(url).toContain('data/step-three');
|
||||||
done();
|
done();
|
||||||
}).catch(done.fail);
|
}).catch(done.fail);
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should select a new reason for the changes made then click on finalize`, done => {
|
it(`should select a new reason for the changes made then click on finalize`, (done) => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.waitToClick(selectors.ticketBasicData.chargesReason)
|
.waitToClick(selectors.ticketBasicData.chargesReason)
|
||||||
.waitToClick(selectors.ticketBasicData.chargesReasonFirstOption)
|
.waitToClick(selectors.ticketBasicData.chargesReasonFirstOption)
|
||||||
.waitForTextInInput(selectors.ticketBasicData.chargesReason, 'Cambiar los precios en el ticket')
|
.waitForTextInInput(selectors.ticketBasicData.chargesReason, 'Cambiar los precios en el ticket')
|
||||||
.click(selectors.ticketBasicData.finalizeButton)
|
.click(selectors.ticketBasicData.finalizeButton)
|
||||||
.waitForURL('summary')
|
.waitForURL('summary')
|
||||||
.url()
|
.url()
|
||||||
.then(url => {
|
.then((url) => {
|
||||||
expect(url).toContain('summary');
|
expect(url).toContain('summary');
|
||||||
done();
|
done();
|
||||||
}).catch(done.fail);
|
}).catch(done.fail);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,83 @@
|
||||||
|
import selectors from '../../helpers/selectors.js';
|
||||||
|
import createNightmare from '../../helpers/nightmare';
|
||||||
|
|
||||||
|
describe('Ticket List components path', () => {
|
||||||
|
const nightmare = createNightmare();
|
||||||
|
|
||||||
|
beforeAll(() => {
|
||||||
|
return nightmare
|
||||||
|
.waitForLogin('employee');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should click on the Tickets button of the top bar menu', async () => {
|
||||||
|
const url = await nightmare
|
||||||
|
.waitToClick(selectors.globalItems.applicationsMenuButton)
|
||||||
|
.wait(selectors.globalItems.applicationsMenuVisible)
|
||||||
|
.waitToClick(selectors.globalItems.ticketsButton)
|
||||||
|
.wait(selectors.ticketsIndex.searchResult)
|
||||||
|
.parsedUrl();
|
||||||
|
|
||||||
|
expect(url.hash).toEqual('#!/ticket/index');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should search for the ticket 1', async () => {
|
||||||
|
const result = await nightmare
|
||||||
|
.wait(selectors.ticketsIndex.searchResult)
|
||||||
|
.type(selectors.ticketsIndex.searchTicketInput, 'id:1')
|
||||||
|
.click(selectors.ticketsIndex.searchButton)
|
||||||
|
.waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1)
|
||||||
|
.countElement(selectors.ticketsIndex.searchResult);
|
||||||
|
|
||||||
|
expect(result).toEqual(1);
|
||||||
|
});
|
||||||
|
|
||||||
|
it(`should click on the search result to access to the ticket components`, async () => {
|
||||||
|
const url = await nightmare
|
||||||
|
.waitForTextInElement(selectors.ticketsIndex.searchResult, 'address 21')
|
||||||
|
.waitToClick(selectors.ticketsIndex.searchResult)
|
||||||
|
.waitToClick(selectors.ticketComponents.componentsButton)
|
||||||
|
.waitForURL('components')
|
||||||
|
.url();
|
||||||
|
|
||||||
|
expect(url).toContain('components');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should confirm the total base is correct', async () => {
|
||||||
|
const name = 'Base €';
|
||||||
|
const minLength = name.length;
|
||||||
|
|
||||||
|
const base = await nightmare
|
||||||
|
.waitPropertyLength(selectors.ticketComponents.base, 'innerText', minLength)
|
||||||
|
.getProperty(selectors.ticketComponents.base, 'innerText');
|
||||||
|
|
||||||
|
|
||||||
|
expect(base).toContain('Base');
|
||||||
|
expect(base.length).toBeGreaterThan(minLength);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should confirm the total margin is correct', async () => {
|
||||||
|
const name = 'Margin €';
|
||||||
|
const minLength = name.length;
|
||||||
|
|
||||||
|
const margin = await nightmare
|
||||||
|
.waitPropertyLength(selectors.ticketComponents.margin, 'innerText', minLength)
|
||||||
|
.getProperty(selectors.ticketComponents.margin, 'innerText');
|
||||||
|
|
||||||
|
|
||||||
|
expect(margin).toContain('Margin');
|
||||||
|
expect(margin.length).toBeGreaterThan(minLength);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should confirm the total total is correct', async () => {
|
||||||
|
const name = 'Total €';
|
||||||
|
const minLength = name.length;
|
||||||
|
|
||||||
|
const total = await nightmare
|
||||||
|
.waitPropertyLength(selectors.ticketComponents.total, 'innerText', minLength)
|
||||||
|
.getProperty(selectors.ticketComponents.total, 'innerText');
|
||||||
|
|
||||||
|
|
||||||
|
expect(total).toContain('Total');
|
||||||
|
expect(total.length).toBeGreaterThan(minLength);
|
||||||
|
});
|
||||||
|
});
|
Loading…
Reference in New Issue