Skip to content

Instantly share code, notes, and snippets.

@philipjfulcher
Last active June 12, 2020 15:30
Show Gist options
  • Save philipjfulcher/a3a89bdf9227a6bfb6d2cbbee8dd3561 to your computer and use it in GitHub Desktop.
Save philipjfulcher/a3a89bdf9227a6bfb6d2cbbee8dd3561 to your computer and use it in GitHub Desktop.
Example Proteactor test for AngularJS in nx
// app.e2e-spec.ts
import { AppPage } from './app.po';
import { browser, logging } from 'protractor';
describe('workspace-project App', () => {
let page: AppPage;
beforeEach(() => {
page = new AppPage();
});
it('should display app title', () => {
page.navigateTo();
expect(page.getTitleText()).toEqual('conduit');
});
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)
);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment