removed unused e2e path

This commit is contained in:
Carlos Jimenez 2018-10-21 15:43:40 +02:00
parent 65f39bfa8c
commit 40d6e2d56d
1 changed files with 0 additions and 59 deletions

View File

@ -1,59 +0,0 @@
import selectors from '../../helpers/selectors.js';
import createNightmare from '../../helpers/helpers';
describe('Client', () => {
describe('invoice path', () => {
const nightmare = createNightmare();
beforeAll(() => {
return nightmare
.waitForLogin('employee');
});
it('should click on the Clients button of the top bar menu', () => {
return nightmare
.waitToClick(selectors.globalItems.applicationsMenuButton)
.wait(selectors.globalItems.applicationsMenuVisible)
.waitToClick(selectors.globalItems.clientsButton)
.wait(selectors.clientsIndex.createClientButton)
.parsedUrl()
.then(url => {
expect(url.hash).toEqual('#!/client/index');
});
});
it('should search for the user Petter Parker', () => {
return nightmare
.wait(selectors.clientsIndex.searchResult)
.type(selectors.clientsIndex.searchClientInput, 'Petter Parker')
.click(selectors.clientsIndex.searchButton)
.waitForNumberOfElements(selectors.clientsIndex.searchResult, 1)
.countElement(selectors.clientsIndex.searchResult)
.then(result => {
expect(result).toEqual(1);
});
});
it(`should click on the search result to access to the client invoices`, () => {
return nightmare
.waitForTextInElement(selectors.clientsIndex.searchResult, 'Petter')
.waitToClick(selectors.clientsIndex.searchResult)
.waitToClick(selectors.clientInvoices.invoicesButton)
.waitForURL('invoice')
.parsedUrl()
.then(url => {
expect(url.hash).toContain('invoice');
});
});
it('should confirm the client has an invoice', () => {
return nightmare
.wait(selectors.clientInvoices.firstInvoiceText)
.getInnerText(selectors.clientInvoices.firstInvoiceText)
.then(value => {
expect(value).toContain('V2800001');
expect(value).toContain('350.50');
});
});
});
});