Last active
June 12, 2020 15:30
-
-
Save philipjfulcher/a3a89bdf9227a6bfb6d2cbbee8dd3561 to your computer and use it in GitHub Desktop.
Example Proteactor test for AngularJS in nx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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