-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Cypress loads wrong page on start #2891
Comments
I am able to reproduce this behavior. I created a repo that can be run to exhibit this behavior here: https://github.com/jennifer-shehane/weird-layout-bug/tree/master |
It looks like something to do with the way Express handles views. Express's default setting for 'views' is the 'views' directory. I noticed that this error occurs if you have a file named 'views/layout.html', but not if you have a file named 'views/layout2.html'. If you do |
Fixes #2891 Not sure that this won't have an adverse impact, also not sure if there's a cleaner way to accomplish this fix
Released in |
Current behavior:
When I try to run cypress tests (the default examples that come after installing cypress) it starts the app properly, but the tests load the wrong page.
It doesn't load the Cypress test page inside the browser, it loads a html file I have in project.
The page that the browser opens is saved in
<project_dir>/views/layout.html
whenever I run
npx cypress open
inside theproject_dir
.The project directory looks like this:
Inside of it I run
npx cypress open
.The cypress app opens propery:
And this is what opens inside of the browser cypress opens when I run any of the example tests:
Cypress console output:
Desired behavior:
I expected that it would load the cypress app with the list of tests on the left side and the content of a page open in the test runner to the right.
Steps to reproduce:
views/layout.html
with whatever contentnpx cypress open
views/layout.html
for meVersions
Issue happens on:
Cypress 3.1.2 and 3.1.3
OS: OSX El Capitan (10.11.6)
Browser: Chrome 70, Canary 73 and Electron 59
I can test it later in the day on my linux machine to confirm if it happens there as well.
Edit: Edited for clarity
The text was updated successfully, but these errors were encountered: