Skip to content
New issue

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

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

Already on GitHub? # to your account

screenshots saved in different folders when invoked from app vs. cli #2091

Closed
phryneas opened this issue Jul 3, 2018 · 6 comments
Closed
Milestone

Comments

@phryneas
Copy link

phryneas commented Jul 3, 2018

Current behavior:

When using .screenshot() in a test from the command line with yarn cypress run -s cypress/integration/visual-regression/test-urls.js, screenshots are saved to cypress/screenshots/visual-regression/test-urls.js/.
When using the same test from the app (cypress open), the screenshots are saved to cypress/screenshots/integration/visual-regression/test-urls.js/

Desired behavior:

Screenshots are saved to the same folders, no matter how the test is invoked

Versions

3.0.2, I guess this is introduced with #1826 / #1858

@kuceb kuceb added the stage: needs investigating Someone from Cypress needs to look at this label Jul 3, 2018
@brian-mann
Copy link
Member

This for sure is a bug. @chrisbreiding can you take a peek?

@chrisbreiding
Copy link
Contributor

@brian-mann Which version is correct? With or without integration?

@brian-mann
Copy link
Member

Without integration

@cangoektas
Copy link

I'm on 3.0.3 and I'm still experiencing this issue.

When running cypress run this is what my screenshots folder looks like:

cypress/screenshots
├── home.spec.js
│   └── home.png
└── login.spec.js
    └── login.png

When running cypress open and clicking on "Run all specs", an "All specs" folder is created:

cypress/screenshots
├── All\ Specs
│   ├── home.png
│   └── login.png
├── home.spec.js
│   └── home.png
└── login.spec.js
    └── login.png

Is this expected?

@chrisbreiding
Copy link
Contributor

No, that's definitely not expected. Looks like we didn't take running all specs into account when implementing the new screenshot path rules. It's a different issue than the original here, so I'm going to create a new GitHub issue for this.

@edelgado
Copy link

Also, I wish the directories weren't named with .js in them. It's confusing. Instead of this:

cypress/screenshots
├── home.spec.js
│   └── home.png
└── login.spec.js
    └── login.png

We should have:

cypress/screenshots
├── home
│   └── home.png
└── login
    └── login.png

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

No branches or pull requests

7 participants