Skip to content

Commit

Permalink
fixed e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
a_trakhimenok committed Nov 8, 2019
1 parent ac6b9f1 commit e5f6ce1
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 25 deletions.
36 changes: 18 additions & 18 deletions projects/apps/ang1/e2e/src/app.e2e-spec.ts
@@ -1,23 +1,23 @@
import { AppPage } from './app.po';
import { browser, logging } from 'protractor';
import {AppPage} from './app.po';
import {browser, logging} from 'protractor';

describe('workspace-project App', () => {
let page: AppPage;
describe('workspace-project ang1 app', () => {
let page: AppPage;

beforeEach(() => {
page = new AppPage();
});
beforeEach(() => {
page = new AppPage();
});

it('should display welcome message', () => {
page.navigateTo();
expect(page.getTitleText()).toEqual('ang1 app is running!');
});
it('should display welcome message', () => {
page.navigateTo();
expect(page.getTitleText()).toEqual('ang1 app is running!');
});

afterEach(async () => {
// Assert that there are no errors emitted from the browser
const logs = await browser.manage().logs().get(logging.Type.BROWSER);
expect(logs).not.toContain(jasmine.objectContaining({
level: logging.Level.SEVERE,
} as logging.Entry));
});
afterEach(async () => {
// Assert that there are no errors emitted from the browser
const logs = await browser.manage().logs().get(logging.Type.BROWSER);
expect(logs).not.toContain(jasmine.objectContaining({
level: logging.Level.SEVERE,
} as logging.Entry));
});
});
2 changes: 1 addition & 1 deletion projects/apps/ang1/e2e/src/app.po.ts
Expand Up @@ -6,6 +6,6 @@ export class AppPage {
}

getTitleText() {
return element(by.css('app-root .content span')).getText() as Promise<string>;
return element(by.css('h1')).getText() as Promise<string>;
}
}
12 changes: 6 additions & 6 deletions projects/apps/ang1/src/index.html
@@ -1,13 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>BlankApp</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="projects/apps/ang1/src/favicon.ico">
<meta charset="utf-8">
<title>ang1 app</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<body>
<app-root></app-root>
<app-root></app-root>
</body>
</html>

0 comments on commit e5f6ce1

Please sign in to comment.