Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to execute integration spec files error thrown when calling cy.visit #141

Open
azaeng04 opened this issue Dec 9, 2021 · 2 comments

Comments

@azaeng04
Copy link

azaeng04 commented Dec 9, 2021

Create an Angular application with the Cypress schematic in the documentation.
Create an integration spec with the cy.visit('/') command.
Launch Cypress as per usual: yarn cypress open --project .
Select the test to execute.

image

CURRENT BEHAVIOUR: Exception is thrown indicating that you are unable to execute cy.visit
EXPECTED BEHAVIOUR: Exception should not throw for a usual integration spec

@edbzn
Copy link
Member

edbzn commented Dec 9, 2021

Hi, there's no need to navigate to a URL, you don't need to call cy.visit() in your test. Cypress provides a canvas where the component is mounted in isolation.

@azaeng04 azaeng04 changed the title Unable to execute integration spec files error thrown when calling c.visit Unable to execute integration spec files error thrown when calling cy.visit Dec 9, 2021
@azaeng04
Copy link
Author

azaeng04 commented Dec 9, 2021

Yes I understand that, but Cypress isn't allowing me to execute my standard spec.ts files. Shouldn't it only throw that error if I am trying to do it inside a cy-spec.ts file that was defined?
I am getting that error when executing it in my spec.ts files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants