Files
angular/aio/content/examples/lazy-loading-ngmodules/e2e/src/app.e2e-spec.ts
George Kalpakas 97ae2d3b9b refactor(docs-infra): fix docs examples for tslint rule prefer-const (#38143)
This commit updates the docs examples to be compatible with the
`prefer-const` tslint rule.

This is in preparation of updating the docs examples `tslint.json` to
match the one generated for new Angular CLI apps in a future commit.

PR Close #38143
2020-08-07 22:10:55 -04:00

48 lines
1.1 KiB
TypeScript

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();
expect(page.getTitleText()).toEqual('Lazy loading feature modules');
});
describe('Customers', () => {
beforeEach(() => {
customersButton.click();
});
it('should show customers when the button is clicked', () => {
const customersMessage = element(by.css('app-customers > p'));
expect(customersMessage.getText()).toBe('customers works!');
});
});
describe('Orders', () => {
beforeEach(() => {
ordersButton.click();
});
it('should show orders when the button is clicked', () => {
const ordersMessage = element(by.css('app-orders > p'));
expect(ordersMessage.getText()).toBe('orders works!');
});
});
});