angular/cypress/integration/base.e2e.js
Ricardo Mattiazzi Baumgartner 059ef511d0 feat(devtools): added cypress to run e2e tests (rangle/angular-devtools#45)
* feat(test): added cypress to run e2e tests

* feat(test): removed package-lock added by mistake

Co-authored-by: Minko Gechev <[email protected]>
2020-02-07 09:42:00 -05:00

27 lines
802 B
JavaScript

describe('Testing the Todo app Demo', () => {
beforeEach(() => {
cy.visit('/');
});
it('should contain the todos application', () => {
cy.enter('#sample-app').then(getBody => {
getBody().contains('Todos');
getBody().contains('About');
getBody().contains('Clear completed');
getBody().contains('Click to expand');
});
});
it('should contain the "Components" tab', () => {
cy.get('.mat-tab-label-content').contains('Components');
});
it('should contain the "Profiler" tab', () => {
cy.get('.mat-tab-label-content').contains('Profiler');
});
it('should contain "app-root" and "app-todo-demo" in the component tree', () => {
cy.get('mat-tree-node').contains('app-root');
cy.get('mat-tree-node').contains('app-todo-demo');
});
});