Skip to content

Cypress 2.x cannot test Angular 5 live-served apps. #1334

@BenAychh

Description

@BenAychh
  • Operating System: High Sierra
  • Cypress Version: 2.0.1
  • Browser Version: Chrome 64.0.3282.167

Is this a Feature or Bug?

Bug

Current behavior:

When I start my angular app with ng serve I am unable to run the cypress tests against that. This was previously working in 1.4.2. Now it complains that my app has an error but there are no errors in the console

Desired behavior:

Test against localhost:4200

How to reproduce:

Please check this repo https://github.com/BenAychh/angular-cypress-2.
Run ng serve to get the app live-reload-server up and navigate to http://localhost:4200. Check for errors.
Now run the cypress test with the above server still up and try to test.

Test code:

describe('Test', () => {
  it('has the correct title', () => {
    cy.visit('/');
    cy.title().should('equal', 'CypressTest');
  });
});

Additional Info (images, stack traces, etc)

I've been using npx cypress open to start the gui.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions