chore(playground): clang-format
This commit is contained in:

committed by
Alex Rickabaugh

parent
0d1f3c3b07
commit
6baf3baedd
@ -8,7 +8,7 @@
|
||||
|
||||
import {verifyNoBrowserErrors} from 'e2e_util/e2e_util';
|
||||
|
||||
describe("WebWorker Router", () => {
|
||||
describe('WebWorker Router', () => {
|
||||
beforeEach(() => {
|
||||
// This test can't wait for Angular 2 as Testability is not available when using WebWorker
|
||||
browser.ignoreSynchronization = true;
|
||||
@ -20,43 +20,43 @@ describe("WebWorker Router", () => {
|
||||
browser.ignoreSynchronization = false;
|
||||
});
|
||||
|
||||
let contentSelector = "app main h1";
|
||||
let navSelector = "app nav ul";
|
||||
let contentSelector = 'app main h1';
|
||||
let navSelector = 'app nav ul';
|
||||
var baseUrl = 'all/playground/src/web_workers/router/index.html';
|
||||
|
||||
it("should route on click", () => {
|
||||
it('should route on click', () => {
|
||||
browser.get(baseUrl);
|
||||
|
||||
waitForElement(contentSelector);
|
||||
var content = element(by.css(contentSelector));
|
||||
expect(content.getText()).toEqual("Start");
|
||||
expect(content.getText()).toEqual('Start');
|
||||
|
||||
let aboutBtn = element(by.css(navSelector + " .about"));
|
||||
let aboutBtn = element(by.css(navSelector + ' .about'));
|
||||
aboutBtn.click();
|
||||
waitForUrl(/\/about/);
|
||||
waitForElement(contentSelector);
|
||||
waitForElementText(contentSelector, "About");
|
||||
waitForElementText(contentSelector, 'About');
|
||||
content = element(by.css(contentSelector));
|
||||
expect(content.getText()).toEqual("About");
|
||||
expect(content.getText()).toEqual('About');
|
||||
expect(browser.getCurrentUrl()).toMatch(/\/about/);
|
||||
|
||||
let contactBtn = element(by.css(navSelector + " .contact"));
|
||||
let contactBtn = element(by.css(navSelector + ' .contact'));
|
||||
contactBtn.click();
|
||||
waitForUrl(/\/contact/);
|
||||
waitForElement(contentSelector);
|
||||
waitForElementText(contentSelector, "Contact");
|
||||
waitForElementText(contentSelector, 'Contact');
|
||||
content = element(by.css(contentSelector));
|
||||
expect(content.getText()).toEqual("Contact");
|
||||
expect(content.getText()).toEqual('Contact');
|
||||
expect(browser.getCurrentUrl()).toMatch(/\/contact/);
|
||||
});
|
||||
|
||||
it("should load the correct route from the URL", () => {
|
||||
browser.get(baseUrl + "#/about");
|
||||
it('should load the correct route from the URL', () => {
|
||||
browser.get(baseUrl + '#/about');
|
||||
|
||||
waitForElement(contentSelector);
|
||||
waitForElementText(contentSelector, "About");
|
||||
waitForElementText(contentSelector, 'About');
|
||||
let content = element(by.css(contentSelector));
|
||||
expect(content.getText()).toEqual("About");
|
||||
expect(content.getText()).toEqual('About');
|
||||
});
|
||||
|
||||
function waitForElement(selector: string): void {
|
||||
|
Reference in New Issue
Block a user