refactor(docs-infra): fix docs examples for tslint rule only-arrow-functions
(#38143)
This commit updates the docs examples to be compatible with the `only-arrow-functions` 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
This commit is contained in:

committed by
Alex Rickabaugh

parent
3012a8e71c
commit
fc709423f2
@ -2,31 +2,31 @@ import { browser, element, by } from 'protractor';
|
||||
|
||||
describe('Interpolation e2e tests', () => {
|
||||
|
||||
beforeEach(function () {
|
||||
beforeEach(() => {
|
||||
browser.get('');
|
||||
});
|
||||
|
||||
it('should display Interpolation and Template Expressions', function () {
|
||||
it('should display Interpolation and Template Expressions', () => {
|
||||
expect(element(by.css('h1')).getText()).toEqual('Interpolation and Template Expressions');
|
||||
});
|
||||
|
||||
it('should display Current customer: Maria', function () {
|
||||
it('should display Current customer: Maria', () => {
|
||||
expect(element.all(by.css('h3')).get(0).getText()).toBe(`Current customer: Maria`);
|
||||
});
|
||||
|
||||
it('should display The sum of 1 + 1 is not 4.', function () {
|
||||
it('should display The sum of 1 + 1 is not 4.', () => {
|
||||
expect(element.all(by.css('p:last-child')).get(0).getText()).toBe(`The sum of 1 + 1 is not 4.`);
|
||||
});
|
||||
|
||||
it('should display Expression Context', function () {
|
||||
it('should display Expression Context', () => {
|
||||
expect(element.all(by.css('h2')).get(1).getText()).toBe(`Expression Context`);
|
||||
});
|
||||
|
||||
it('should display a list of customers', function () {
|
||||
it('should display a list of customers', () => {
|
||||
expect(element.all(by.css('li')).get(0).getText()).toBe(`Maria`);
|
||||
});
|
||||
|
||||
it('should display two pictures', function() {
|
||||
it('should display two pictures', () => {
|
||||
let pottedPlant = element.all(by.css('img')).get(0);
|
||||
let lamp = element.all(by.css('img')).get(1);
|
||||
|
||||
@ -37,7 +37,7 @@ describe('Interpolation e2e tests', () => {
|
||||
expect(lamp.isDisplayed()).toBe(true);
|
||||
});
|
||||
|
||||
it('should support user input', function () {
|
||||
it('should support user input', () => {
|
||||
let input = element(by.css('input'));
|
||||
let label = element(by.css('label'));
|
||||
expect(label.getText()).toEqual('Type something:');
|
||||
|
Reference in New Issue
Block a user