2017-07-04 10:58:20 -04:00
|
|
|
import { AppPage } from './app.po';
|
|
|
|
import { browser, element, by } from 'protractor';
|
|
|
|
|
|
|
|
|
|
|
|
describe('providers App', () => {
|
|
|
|
let page: AppPage;
|
|
|
|
const buttons = element.all(by.css('button'));
|
|
|
|
const customersButton = buttons.get(0);
|
|
|
|
const ordersButton = buttons.get(1);
|
|
|
|
const homeButton = buttons.get(2);
|
|
|
|
|
|
|
|
beforeEach(() => {
|
|
|
|
page = new AppPage();
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should display message saying app works', () => {
|
|
|
|
page.navigateTo();
|
2019-05-09 15:56:24 -05:00
|
|
|
expect(page.getTitleText()).toEqual('Lazy loading feature modules');
|
2017-07-04 10:58:20 -04:00
|
|
|
});
|
|
|
|
|
2019-10-09 23:48:05 +02:00
|
|
|
describe('Customers', function() {
|
2017-07-04 10:58:20 -04:00
|
|
|
beforeEach(function() {
|
|
|
|
customersButton.click();
|
|
|
|
});
|
|
|
|
|
2019-10-09 23:48:05 +02:00
|
|
|
it('should show customers when the button is clicked', function() {
|
|
|
|
let customersMessage = element(by.css('app-customers > p'));
|
|
|
|
expect(customersMessage.getText()).toBe('customers works!');
|
2017-07-04 10:58:20 -04:00
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|
2019-10-09 23:48:05 +02:00
|
|
|
describe('Orders', function() {
|
2017-07-04 10:58:20 -04:00
|
|
|
beforeEach(function() {
|
|
|
|
ordersButton.click();
|
|
|
|
});
|
|
|
|
|
2019-10-09 23:48:05 +02:00
|
|
|
it('should show orders when the button is clicked', function() {
|
|
|
|
let ordersMessage = element(by.css('app-orders > p'));
|
|
|
|
expect(ordersMessage.getText()).toBe('orders works!');
|
2017-07-04 10:58:20 -04:00
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|