How do you perform E2E testing using Protractor?
- Protractor is built on WebDriverJS for Angular E2E tests.
- Write test specs using Jasmine syntax.
- Run tests against a running Angular app.
Example test:
describe('App E2E Test', () => {
it('should display welcome message', () => {
browser.get('/');
expect(element(by.css('h1')).getText()).toEqual('Welcome');
});
});
Run with:
ng e2e