feat(aio): copy example code from angular.io
This commit is contained in:

committed by
Igor Minar

parent
3e34ba01bd
commit
1f3198cb50
31
aio/content/examples/cb-set-document-title/e2e-spec.ts
Normal file
31
aio/content/examples/cb-set-document-title/e2e-spec.ts
Normal file
@ -0,0 +1,31 @@
|
||||
'use strict'; // necessary for es6 output in node
|
||||
|
||||
import { browser, element, by, ElementFinder } from 'protractor';
|
||||
|
||||
// gulp run-e2e-tests --filter=cb-set-document-title
|
||||
describe('Set Document Title', function () {
|
||||
|
||||
beforeAll(function () {
|
||||
browser.get('');
|
||||
});
|
||||
|
||||
it('should set the document title', function () {
|
||||
|
||||
let titles = [
|
||||
'Good morning!',
|
||||
'Good afternoon!',
|
||||
'Good evening!'
|
||||
];
|
||||
|
||||
element.all( by.css( 'ul li a' ) ).each(
|
||||
function iterator( element: ElementFinder, i: number ) {
|
||||
|
||||
element.click();
|
||||
expect( browser.getTitle() ).toEqual( titles[ i ] );
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
});
|
||||
|
||||
});
|
Reference in New Issue
Block a user