#737 Modificar E2E billing data + version de nightmare

This commit is contained in:
Carlos Jimenez 2018-10-24 10:57:14 +02:00
parent af508b664c
commit 784f00c860
35 changed files with 404 additions and 593 deletions

View File

@ -1,14 +0,0 @@
import createNightmare from './nightmare';
export default myCreateNightmare;
function myCreateNightmare() {
let nightmare = createNightmare();
nightmare.header('Accept-Language', 'en');
afterAll(() => {
return nightmare
.end();
});
return nightmare;
}

View File

@ -2,16 +2,15 @@
import Nightmare from 'nightmare'; import Nightmare from 'nightmare';
export default function createNightmare(width = 1280, height = 720) { export default function createNightmare(width = 1280, height = 720) {
const nightmare = new Nightmare({show: process.env.E2E_SHOW, typeInterval: 10, x: 0, y: 0}) const nightmare = new Nightmare({show: process.env.E2E_SHOW, typeInterval: 10, x: 0, y: 0, waitTimeout: 2000})
.viewport(width, height); .viewport(width, height);
nightmare.on('page', (type, message, error) => { // nightmare.on('page', (type, message, error) => {
fail(error); // console.log(type);
}); // console.log(message.name);
// console.log(error);
nightmare.on('dom-ready', function() { // fail(error);
nightmare.inject('js', `${__dirname}/nightmareModifiers.js`); // });
});
nightmare.on('console', (type, message) => { nightmare.on('console', (type, message) => {
if (type === 'error') { if (type === 'error') {
@ -21,6 +20,14 @@ export default function createNightmare(width = 1280, height = 720) {
// console.log(message); // console.log(message);
} }
}); });
nightmare.header('Accept-Language', 'en');
afterAll(() => {
return nightmare
.end();
});
return nightmare; return nightmare;
} }

View File

@ -85,6 +85,11 @@ export default {
receivedCoreLCRCheckbox: `vn-check[label='Received LCR'] > label > input`, receivedCoreLCRCheckbox: `vn-check[label='Received LCR'] > label > input`,
receivedCoreVNLCheckbox: `vn-check[label='Received core VNL'] > label > input`, receivedCoreVNLCheckbox: `vn-check[label='Received core VNL'] > label > input`,
receivedB2BVNLCheckbox: `vn-check[label='Received B2B VNL'] > label > input`, receivedB2BVNLCheckbox: `vn-check[label='Received B2B VNL'] > label > input`,
swiftBicInput: 'vn-client-billing-data vn-autocomplete[field="$ctrl.client.bankEntityFk"] input',
newBankEntityButton: 'vn-client-billing-data vn-icon-button[vn-tooltip="New bank entity"] > button',
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',
acceptBankEntityButton: 'vn-client-billing-data > vn-dialog button[response="ACCEPT"]',
saveButton: `${components.vnSubmit}` saveButton: `${components.vnSubmit}`
}, },
clientAddresses: { clientAddresses: {
@ -335,7 +340,7 @@ export default {
secondSaleDiscount: `vn-ticket-sale vn-tr:nth-child(2) vn-td:nth-child(8)`, secondSaleDiscount: `vn-ticket-sale vn-tr:nth-child(2) vn-td:nth-child(8)`,
secondSaleImport: `vn-ticket-sale vn-tr:nth-child(2) vn-td:nth-child(9)`, secondSaleImport: `vn-ticket-sale vn-tr:nth-child(2) vn-td:nth-child(9)`,
secondSaleText: `vn-table div > vn-tbody > vn-tr:nth-child(2)`, secondSaleText: `vn-table div > vn-tbody > vn-tr:nth-child(2)`,
totalImport: 'vn-ticket-sale vn-tfoot > vn-tr > vn-td:nth-child(9) > section > p:nth-child(3) > strong', totalImport: 'vn-ticket-sale > vn-vertical > vn-card > div > vn-vertical > div > p:nth-child(3) > strong',
selectAllSalesCheckbox: `vn-ticket-sale vn-thead vn-check label`, selectAllSalesCheckbox: `vn-ticket-sale vn-thead vn-check label`,
secondSaleCheckbox: `vn-ticket-sale vn-tr:nth-child(2) vn-check[field="sale.checked"] label`, secondSaleCheckbox: `vn-ticket-sale vn-tr:nth-child(2) vn-check[field="sale.checked"] label`,
thirdSaleCheckbox: `vn-ticket-sale vn-tr:nth-child(3) vn-check[field="sale.checked"] label`, thirdSaleCheckbox: `vn-ticket-sale vn-tr:nth-child(3) vn-check[field="sale.checked"] label`,
@ -353,7 +358,7 @@ export default {
moreMenuDeleteOption: 'vn-ticket-sale vn-drop-down > vn-popover ul > li:nth-child(2)', moreMenuDeleteOption: 'vn-ticket-sale vn-drop-down > vn-popover ul > li:nth-child(2)',
moreMenuReseveOption: 'vn-ticket-sale vn-drop-down > vn-popover ul > li:nth-child(4)', moreMenuReseveOption: 'vn-ticket-sale vn-drop-down > vn-popover ul > li:nth-child(4)',
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(5)', 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)'
}, },

View File

@ -1,5 +1,5 @@
import selectors from '../../helpers/selectors.js'; import selectors from '../../helpers/selectors.js';
import createNightmare from '../../helpers/helpers.js'; import createNightmare from '../../helpers/nightmare';
describe('Claim edit basic data path', () => { describe('Claim edit basic data path', () => {
const nightmare = createNightmare(); const nightmare = createNightmare();

View File

@ -1,5 +1,5 @@
import selectors from '../../helpers/selectors'; import selectors from '../../helpers/selectors';
import createNightmare from '../../helpers/helpers'; import createNightmare from '../../helpers/nightmare';
describe('Client', () => { describe('Client', () => {
describe('create path', () => { describe('create path', () => {

View File

@ -1,5 +1,5 @@
import selectors from '../../helpers/selectors.js'; import selectors from '../../helpers/selectors.js';
import createNightmare from '../../helpers/helpers'; import createNightmare from '../../helpers/nightmare';
describe('Client Edit basicData path', () => { describe('Client Edit basicData path', () => {
const nightmare = createNightmare(); const nightmare = createNightmare();

View File

@ -1,5 +1,5 @@
import selectors from '../../helpers/selectors.js'; import selectors from '../../helpers/selectors.js';
import createNightmare from '../../helpers/helpers'; import createNightmare from '../../helpers/nightmare';
describe('Client Edit fiscalData path', () => { describe('Client Edit fiscalData path', () => {
const nightmare = createNightmare(); const nightmare = createNightmare();

View File

@ -1,56 +1,50 @@
import selectors from '../../helpers/selectors.js'; import selectors from '../../helpers/selectors.js';
import createNightmare from '../../helpers/helpers'; import createNightmare from '../../helpers/nightmare';
xdescribe('Client', () => { describe('Client', () => {
describe('Edit pay method path', () => { describe('Edit pay method path', () => {
const nightmare = createNightmare(); const nightmare = createNightmare();
beforeAll(() => { beforeAll(() => {
return nightmare nightmare
.waitForLogin('administrative'); .waitForLogin('administrative');
}); });
it('should click on the Clients button of the top bar menu', done => { it('should click on the Clients button of the top bar menu', async() => {
return nightmare let 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();
.then(url => {
expect(url.hash).toEqual('#!/client/index'); expect(url.hash).toEqual('#!/client/index');
done();
}).catch(done.fail);
}); });
it('should search for the user Bruce Banner', done => { it('should search for the user Bruce Banner', async() => {
return nightmare let resultCount = await nightmare
.wait(selectors.clientsIndex.searchResult) .wait(selectors.clientsIndex.searchResult)
.type(selectors.clientsIndex.searchClientInput, 'Bruce Banner') .type(selectors.clientsIndex.searchClientInput, 'Bruce Banner')
.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);
.then(result => {
expect(result).toEqual(1); expect(resultCount).toEqual(1);
done();
}).catch(done.fail);
}); });
it(`should click on the search result to access to the client's pay method`, done => { it(`should click on the search result to access to the client's pay method`, async() => {
return nightmare let url = await nightmare
.waitForTextInElement(selectors.clientsIndex.searchResult, 'Bruce Banner') .waitForTextInElement(selectors.clientsIndex.searchResult, 'Bruce Banner')
.waitToClick(selectors.clientsIndex.searchResult) .waitToClick(selectors.clientsIndex.searchResult)
.waitToClick(selectors.clientPayMethod.payMethodButton) .waitToClick(selectors.clientPayMethod.payMethodButton)
.waitForURL('billing-data') .waitForURL('billing-data')
.url() .url();
.then(url => {
expect(url).toContain('billing-data'); expect(url).toContain('billing-data');
done();
}).catch(done.fail);
}); });
it(`should attempt to edit the Pay method without an IBAN but fail`, done => { it(`should attempt to edit the Pay method without an IBAN but fail`, async() => {
return nightmare let snackbarMessage = await nightmare
.waitToClick(selectors.clientPayMethod.payMethodInput) .waitToClick(selectors.clientPayMethod.payMethodInput)
.waitToClick(selectors.clientPayMethod.payMethodIBANOption) .waitToClick(selectors.clientPayMethod.payMethodIBANOption)
.waitForTextInInput(selectors.clientPayMethod.payMethodInput, 'PayMethod with IBAN') .waitForTextInInput(selectors.clientPayMethod.payMethodInput, 'PayMethod with IBAN')
@ -61,75 +55,88 @@ xdescribe('Client', () => {
.waitToClick(selectors.clientPayMethod.receivedCoreVNLCheckbox) .waitToClick(selectors.clientPayMethod.receivedCoreVNLCheckbox)
.waitToClick(selectors.clientPayMethod.receivedB2BVNLCheckbox) .waitToClick(selectors.clientPayMethod.receivedB2BVNLCheckbox)
.waitToClick(selectors.clientPayMethod.saveButton) .waitToClick(selectors.clientPayMethod.saveButton)
.waitForLastSnackbar() .waitForLastSnackbar();
.then(result => {
expect(result).toEqual('That payment method requires an IBAN'); expect(snackbarMessage).toEqual('That payment method requires an IBAN');
done();
}).catch(done.fail);
}); });
it(`should add the IBAN`, done => { it(`should add the IBAN but fail as it requires a BIC code`, async() => {
return nightmare let snackbarMessage = await nightmare
.clearInput(selectors.clientPayMethod.IBANInput) .clearInput(selectors.clientPayMethod.IBANInput)
.type(selectors.clientPayMethod.IBANInput, 'ES91 2100 0418 4502 0005 1332') .type(selectors.clientPayMethod.IBANInput, 'ES91 2100 0418 4502 0005 1332')
.waitForTextInInput(selectors.clientPayMethod.IBANInput, 'ES91 2100 0418 4502 0005 1332') .waitForTextInInput(selectors.clientPayMethod.IBANInput, 'ES91 2100 0418 4502 0005 1332')
.waitToClick(selectors.clientPayMethod.saveButton) .waitToClick(selectors.clientPayMethod.saveButton)
.waitForSnackbar() .waitForLastSnackbar();
.then(result => {
expect(result).toEqual(jasmine.arrayContaining(['Data saved!', 'Notification sent!'])); expect(snackbarMessage).toEqual('That payment method requires a BIC');
done();
}).catch(done.fail);
}); });
it(`should confirm the IBAN pay method is sucessfully saved`, done => { it(`should create a new BIC code`, async() => {
return nightmare let newcode = await nightmare
.getInputValue(selectors.clientPayMethod.payMethodInput) .click(selectors.clientPayMethod.newBankEntityButton)
.then(result => { .type(selectors.clientPayMethod.newBankEntityName, 'Gotham City Banks')
expect(result).toEqual('PayMethod with IBAN'); .type(selectors.clientPayMethod.newBankEntityBIC, 'GTHMCT')
done(); .click(selectors.clientPayMethod.acceptBankEntityButton)
}).catch(done.fail); .getInputValue(selectors.clientPayMethod.swiftBicInput);
expect(newcode).toEqual('');
}); });
it('should confirm the due day have been edited', done => { it(`should confirm the IBAN pay method is sucessfully saved`, async() => {
return nightmare let payMethod = await nightmare
.getInputValue(selectors.clientPayMethod.dueDayInput) .getInputValue(selectors.clientPayMethod.payMethodInput);
.then(result => {
expect(result).toEqual('60'); expect(payMethod).toEqual('PayMethod with IBAN');
done();
}).catch(done.fail);
}); });
it('should confirm Received LCR checkbox is checked', done => { it('should confirm the due day have been edited', async() => {
return nightmare let dueDate = await nightmare
.getInputValue(selectors.clientPayMethod.dueDayInput);
expect(dueDate).toEqual('60');
});
it('should confirm the IBAN was saved', async() => {
let IBAN = await nightmare
.waitProperty(selectors.clientPayMethod.IBANInput, 'value')
.getProperty(selectors.clientPayMethod.IBANInput, 'value');
expect(IBAN).toEqual('ES91 2100 0418 4502 0005 1332');
});
it('should confirm the swift / BIC code was saved', async() => {
let code = await nightmare
.waitProperty(selectors.clientPayMethod.swiftBicInput, 'value')
.getProperty(selectors.clientPayMethod.swiftBicInput, 'value');
expect(code).toEqual('GTHMCT');
});
it('should confirm Received LCR checkbox is checked', async() => {
let checkedBox = await nightmare
.evaluate(selector => { .evaluate(selector => {
return document.querySelector(selector).checked; return document.querySelector(selector).checked;
}, selectors.clientPayMethod.receivedCoreLCRCheckbox) }, selectors.clientPayMethod.receivedCoreLCRCheckbox);
.then(value => {
expect(value).toBeTruthy(); expect(checkedBox).toBeTruthy();
done();
}).catch(done.fail);
}); });
it('should confirm Received core VNL checkbox is unchecked', done => { it('should confirm Received core VNL checkbox is unchecked', async() => {
return nightmare let checkedBox = await nightmare
.evaluate(selector => { .evaluate(selector => {
return document.querySelector(selector).checked; return document.querySelector(selector).checked;
}, selectors.clientPayMethod.receivedCoreVNLCheckbox) }, selectors.clientPayMethod.receivedCoreVNLCheckbox);
.then(value => {
expect(value).toBeFalsy(); expect(checkedBox).toBeFalsy();
done();
}).catch(done.fail);
}); });
it('should confirm Received B2B VNL checkbox is unchecked', done => { it('should confirm Received B2B VNL checkbox is unchecked', async() => {
return nightmare let checkedBox = await nightmare
.evaluate(selector => { .evaluate(selector => {
return document.querySelector(selector).checked; return document.querySelector(selector).checked;
}, selectors.clientPayMethod.receivedB2BVNLCheckbox) }, selectors.clientPayMethod.receivedB2BVNLCheckbox);
.then(value => {
expect(value).toBeFalsy(); expect(checkedBox).toBeFalsy();
done();
}).catch(done.fail);
}); });
}); });
}); });

View File

@ -1,5 +1,5 @@
import selectors from '../../helpers/selectors.js'; import selectors from '../../helpers/selectors.js';
import createNightmare from '../../helpers/helpers'; import createNightmare from '../../helpers/nightmare';
describe('Client', () => { describe('Client', () => {
describe('Add address path', () => { describe('Add address path', () => {

View File

@ -1,5 +1,5 @@
import selectors from '../../helpers/selectors.js'; import selectors from '../../helpers/selectors.js';
import createNightmare from '../../helpers/helpers'; import createNightmare from '../../helpers/nightmare';
describe('Client add address notes path', () => { describe('Client add address notes path', () => {
const nightmare = createNightmare(); const nightmare = createNightmare();

View File

@ -1,5 +1,5 @@
import selectors from '../../helpers/selectors.js'; import selectors from '../../helpers/selectors.js';
import createNightmare from '../../helpers/helpers'; import createNightmare from '../../helpers/nightmare';
describe('Client', () => { describe('Client', () => {
describe('Edit web access path', () => { describe('Edit web access path', () => {

View File

@ -1,5 +1,5 @@
import selectors from '../../helpers/selectors.js'; import selectors from '../../helpers/selectors.js';
import createNightmare from '../../helpers/helpers'; import createNightmare from '../../helpers/nightmare';
describe('Client', () => { describe('Client', () => {
describe('Add notes path', () => { describe('Add notes path', () => {

View File

@ -1,5 +1,5 @@
import selectors from '../../helpers/selectors.js'; import selectors from '../../helpers/selectors.js';
import createNightmare from '../../helpers/helpers'; import createNightmare from '../../helpers/nightmare';
describe('Client', () => { describe('Client', () => {
describe('Add credit path', () => { describe('Add credit path', () => {

View File

@ -1,5 +1,5 @@
import selectors from '../../helpers/selectors.js'; import selectors from '../../helpers/selectors.js';
import createNightmare from '../../helpers/helpers'; import createNightmare from '../../helpers/nightmare';
describe('Client', () => { describe('Client', () => {
describe('Add greuge path', () => { describe('Add greuge path', () => {

View File

@ -1,5 +1,5 @@
import selectors from '../../helpers/selectors.js'; import selectors from '../../helpers/selectors.js';
import createNightmare from '../../helpers/helpers'; import createNightmare from '../../helpers/nightmare';
describe('Client', () => { describe('Client', () => {
describe('mandate path', () => { describe('mandate path', () => {

View File

@ -1,5 +1,5 @@
import selectors from '../../helpers/selectors.js'; import selectors from '../../helpers/selectors.js';
import createNightmare from '../../helpers/helpers'; import createNightmare from '../../helpers/nightmare';
describe('Client lock verified data path', () => { describe('Client lock verified data path', () => {
const nightmare = createNightmare(); const nightmare = createNightmare();

View File

@ -1,17 +1,18 @@
import selectors from '../../helpers/selectors.js'; import selectors from '../../helpers/selectors.js';
import createNightmare from '../../helpers/helpers'; import createNightmare from '../../helpers/nightmare';
describe('Item', () => { describe('Item', () => {
describe('Summary path', () => { describe('Summary path', () => {
const nightmare = createNightmare(); const nightmare = createNightmare();
beforeAll(() => { beforeAll(done => {
return nightmare nightmare
.waitForLogin('employee'); .waitForLogin('employee');
done();
}); });
it('should access to the items index by clicking the items button', done => { it('should access to the items index by clicking the items button', done => {
return nightmare nightmare
.click(selectors.moduleAccessView.itemsSectionButton) .click(selectors.moduleAccessView.itemsSectionButton)
.wait(selectors.itemsIndex.createItemButton) .wait(selectors.itemsIndex.createItemButton)
.parsedUrl() .parsedUrl()
@ -22,7 +23,7 @@ describe('Item', () => {
}); });
it('should search for the item Gem of Time', done => { it('should search for the item Gem of Time', done => {
return nightmare nightmare
.wait(selectors.itemsIndex.searchResult) .wait(selectors.itemsIndex.searchResult)
.type(selectors.itemsIndex.searchItemInput, 'Gem of Time') .type(selectors.itemsIndex.searchItemInput, 'Gem of Time')
.click(selectors.itemsIndex.searchButton) .click(selectors.itemsIndex.searchButton)
@ -35,7 +36,7 @@ describe('Item', () => {
}); });
it(`should click on the search result summary button to open the item summary popup`, done => { it(`should click on the search result summary button to open the item summary popup`, done => {
return nightmare nightmare
.waitForTextInElement(selectors.itemsIndex.searchResult, 'Gem of Time') .waitForTextInElement(selectors.itemsIndex.searchResult, 'Gem of Time')
.isVisible(selectors.itemSummary.basicData) .isVisible(selectors.itemSummary.basicData)
.then(result => { .then(result => {
@ -51,7 +52,7 @@ describe('Item', () => {
}); });
it(`should check the item summary preview shows fields from basic data`, done => { it(`should check the item summary preview shows fields from basic data`, done => {
return nightmare nightmare
.waitForTextInElement(selectors.itemSummary.basicData, 'Name: Gem of Time') .waitForTextInElement(selectors.itemSummary.basicData, 'Name: Gem of Time')
.getInnerText(selectors.itemSummary.basicData) .getInnerText(selectors.itemSummary.basicData)
.then(result => { .then(result => {
@ -61,7 +62,7 @@ describe('Item', () => {
}); });
it(`should check the item summary preview shows fields from tags`, done => { it(`should check the item summary preview shows fields from tags`, done => {
return nightmare nightmare
.waitForTextInElement(selectors.itemSummary.tags, 'Color: Yellow') .waitForTextInElement(selectors.itemSummary.tags, 'Color: Yellow')
.getInnerText(selectors.itemSummary.tags) .getInnerText(selectors.itemSummary.tags)
.then(result => { .then(result => {
@ -80,18 +81,16 @@ describe('Item', () => {
}).catch(done.fail); }).catch(done.fail);
}); });
it(`should check the item summary preview shows fields from botanical`, done => { it(`should check the item summary preview shows fields from botanical`, async() => {
return nightmare let result = await nightmare
.waitForTextInElement(selectors.itemSummary.botanical, 'Botanical: Hedera helix') .waitForTextInElement(selectors.itemSummary.botanical, 'Botanical: Hedera helix')
.getInnerText(selectors.itemSummary.botanical) .getInnerText(selectors.itemSummary.botanical);
.then(result => {
expect(result).toContain('Botanical: Hedera helix'); expect(result).toContain('Botanical: Hedera helix');
done();
}).catch(done.fail);
}); });
it(`should check the item summary preview shows fields from barcode`, done => { it(`should check the item summary preview shows fields from barcode`, done => {
return nightmare nightmare
.waitForTextInElement(selectors.itemSummary.barcode, '1') .waitForTextInElement(selectors.itemSummary.barcode, '1')
.getInnerText(selectors.itemSummary.barcode) .getInnerText(selectors.itemSummary.barcode)
.then(result => { .then(result => {
@ -101,7 +100,7 @@ describe('Item', () => {
}); });
it(`should close the summary popup`, done => { it(`should close the summary popup`, done => {
return nightmare nightmare
.waitToClick(selectors.itemsIndex.closeItemSummaryPreview) .waitToClick(selectors.itemsIndex.closeItemSummaryPreview)
.isVisible(selectors.itemSummary.basicData) .isVisible(selectors.itemSummary.basicData)
.then(result => { .then(result => {
@ -111,7 +110,7 @@ describe('Item', () => {
}); });
it(`should navigate to the one of the items detailed section`, done => { it(`should navigate to the one of the items detailed section`, done => {
return nightmare nightmare
.waitToClick(selectors.itemsIndex.searchResult) .waitToClick(selectors.itemsIndex.searchResult)
.waitForURL('summary') .waitForURL('summary')
.parsedUrl() .parsedUrl()
@ -122,7 +121,7 @@ describe('Item', () => {
}); });
it(`should check the item summary shows fields from basic data section`, done => { it(`should check the item summary shows fields from basic data section`, done => {
return nightmare nightmare
.waitForTextInElement(selectors.itemSummary.basicData, 'Name: Gem of Time') .waitForTextInElement(selectors.itemSummary.basicData, 'Name: Gem of Time')
.getInnerText(selectors.itemSummary.basicData) .getInnerText(selectors.itemSummary.basicData)
.then(result => { .then(result => {
@ -132,7 +131,7 @@ describe('Item', () => {
}); });
it(`should check the item summary shows fields from tags section`, done => { it(`should check the item summary shows fields from tags section`, done => {
return nightmare nightmare
.getInnerText(selectors.itemSummary.tags) .getInnerText(selectors.itemSummary.tags)
.then(result => { .then(result => {
expect(result).toContain('Color: Yellow'); expect(result).toContain('Color: Yellow');
@ -141,7 +140,7 @@ describe('Item', () => {
}); });
it(`should check the item summary shows fields from niches section`, done => { it(`should check the item summary shows fields from niches section`, done => {
return nightmare nightmare
.getInnerText(selectors.itemSummary.niche) .getInnerText(selectors.itemSummary.niche)
.then(result => { .then(result => {
expect(result).toContain('Warehouse One: A1'); expect(result).toContain('Warehouse One: A1');
@ -150,7 +149,7 @@ describe('Item', () => {
}); });
it(`should check the item summary shows fields from botanical section`, done => { it(`should check the item summary shows fields from botanical section`, done => {
return nightmare nightmare
.getInnerText(selectors.itemSummary.botanical) .getInnerText(selectors.itemSummary.botanical)
.then(result => { .then(result => {
expect(result).toContain('Botanical: Hedera helix'); expect(result).toContain('Botanical: Hedera helix');
@ -159,7 +158,7 @@ describe('Item', () => {
}); });
it(`should check the item summary shows fields from barcodes section`, done => { it(`should check the item summary shows fields from barcodes section`, done => {
return nightmare nightmare
.getInnerText(selectors.itemSummary.barcode) .getInnerText(selectors.itemSummary.barcode)
.then(result => { .then(result => {
expect(result).toContain('1'); expect(result).toContain('1');

View File

@ -1,5 +1,5 @@
import selectors from '../../helpers/selectors.js'; import selectors from '../../helpers/selectors.js';
import createNightmare from '../../helpers/helpers'; import createNightmare from '../../helpers/nightmare';
describe('Item', () => { describe('Item', () => {
describe('Edit basic data path', () => { describe('Edit basic data path', () => {

View File

@ -1,5 +1,5 @@
import selectors from '../../helpers/selectors.js'; import selectors from '../../helpers/selectors.js';
import createNightmare from '../../helpers/helpers'; import createNightmare from '../../helpers/nightmare';
describe('Item', () => { describe('Item', () => {
describe('Edit tax path', () => { describe('Edit tax path', () => {

View File

@ -1,5 +1,5 @@
import selectors from '../../helpers/selectors.js'; import selectors from '../../helpers/selectors.js';
import createNightmare from '../../helpers/helpers'; import createNightmare from '../../helpers/nightmare';
describe('Item', () => { describe('Item', () => {
describe('Create tags path', () => { describe('Create tags path', () => {

View File

@ -1,5 +1,5 @@
import selectors from '../../helpers/selectors.js'; import selectors from '../../helpers/selectors.js';
import createNightmare from '../../helpers/helpers'; import createNightmare from '../../helpers/nightmare';
describe('Item', () => { describe('Item', () => {
describe('Create niche path', () => { describe('Create niche path', () => {

View File

@ -1,5 +1,5 @@
import selectors from '../../helpers/selectors.js'; import selectors from '../../helpers/selectors.js';
import createNightmare from '../../helpers/helpers'; import createNightmare from '../../helpers/nightmare';
describe('Item', () => { describe('Item', () => {
describe('Create botanical path', () => { describe('Create botanical path', () => {

View File

@ -1,5 +1,5 @@
import selectors from '../../helpers/selectors.js'; import selectors from '../../helpers/selectors.js';
import createNightmare from '../../helpers/helpers'; import createNightmare from '../../helpers/nightmare';
describe('Item', () => { describe('Item', () => {
describe('Create barcodes path', () => { describe('Create barcodes path', () => {

View File

@ -1,5 +1,5 @@
import selectors from '../../helpers/selectors.js'; import selectors from '../../helpers/selectors.js';
import createNightmare from '../../helpers/helpers'; import createNightmare from '../../helpers/nightmare';
describe('Item', () => { describe('Item', () => {
const nightmare = createNightmare(); const nightmare = createNightmare();

View File

@ -1,5 +1,5 @@
import selectors from '../../helpers/selectors.js'; import selectors from '../../helpers/selectors.js';
import createNightmare from '../../helpers/helpers'; import createNightmare from '../../helpers/nightmare';
describe('Ticket', () => { describe('Ticket', () => {
describe('Create notes path', () => { describe('Create notes path', () => {

View File

@ -1,5 +1,5 @@
import selectors from '../../helpers/selectors.js'; import selectors from '../../helpers/selectors.js';
import createNightmare from '../../helpers/helpers'; import createNightmare from '../../helpers/nightmare';
describe('Ticket', () => { describe('Ticket', () => {
describe('Delete expeditions path', () => { describe('Delete expeditions path', () => {

View File

@ -1,5 +1,5 @@
import selectors from '../../helpers/selectors.js'; import selectors from '../../helpers/selectors.js';
import createNightmare from '../../helpers/helpers'; import createNightmare from '../../helpers/nightmare';
describe('Ticket List sale path', () => { describe('Ticket List sale path', () => {
const nightmare = createNightmare(); const nightmare = createNightmare();

View File

@ -1,5 +1,5 @@
import selectors from '../../helpers/selectors.js'; import selectors from '../../helpers/selectors.js';
import createNightmare from '../../helpers/helpers'; import createNightmare from '../../helpers/nightmare';
describe('Ticket Create packages path', () => { describe('Ticket Create packages path', () => {
const nightmare = createNightmare(); const nightmare = createNightmare();

View File

@ -1,5 +1,5 @@
import selectors from '../../helpers/selectors.js'; import selectors from '../../helpers/selectors.js';
import createNightmare from '../../helpers/helpers'; import createNightmare from '../../helpers/nightmare';
describe('Ticket', () => { describe('Ticket', () => {
describe('Create new tracking state path', () => { describe('Create new tracking state path', () => {

View File

@ -1,5 +1,5 @@
import selectors from '../../helpers/selectors.js'; import selectors from '../../helpers/selectors.js';
import createNightmare from '../../helpers/helpers'; import createNightmare from '../../helpers/nightmare';
describe('Ticket', () => { describe('Ticket', () => {
describe('Edit basic data path', () => { describe('Edit basic data path', () => {

View File

@ -1,5 +1,5 @@
import selectors from '../../helpers/selectors.js'; import selectors from '../../helpers/selectors.js';
import createNightmare from '../../helpers/helpers'; import createNightmare from '../../helpers/nightmare';
describe('Ticket Edit sale path', () => { describe('Ticket Edit sale path', () => {
const nightmare = createNightmare(); const nightmare = createNightmare();

View File

@ -1,5 +1,5 @@
import selectors from '../helpers/selectors'; import selectors from '../helpers/selectors';
import createNightmare from '../helpers/helpers'; import createNightmare from '../helpers/nightmare';
describe('create client path', () => { describe('create client path', () => {
let nightmare = createNightmare(); let nightmare = createNightmare();

696
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -35,7 +35,7 @@
"cors": "^2.8.4", "cors": "^2.8.4",
"css-loader": "^0.25.0", "css-loader": "^0.25.0",
"del": "^2.2.2", "del": "^2.2.2",
"electron": "^1.8.8", "nightmare": "^3.0.1",
"eslint": "^3.19.0", "eslint": "^3.19.0",
"eslint-config-angular": "^0.5.0", "eslint-config-angular": "^0.5.0",
"eslint-config-google": "^0.6.0", "eslint-config-google": "^0.6.0",
@ -66,7 +66,6 @@
"minimist": "^1.2.0", "minimist": "^1.2.0",
"mustache": "^2.3.2", "mustache": "^2.3.2",
"mysql2": "^1.6.1", "mysql2": "^1.6.1",
"nightmare": "^2.10.0",
"node-sass": "^4.9.3", "node-sass": "^4.9.3",
"nodemon": "^1.18.4", "nodemon": "^1.18.4",
"plugin-error": "^1.0.1", "plugin-error": "^1.0.1",