Skip to content

Snapshots should ignore print stylesheets #1568

@chrisbreiding

Description

@chrisbreiding

Current behavior:

Snapshots copy the styles from stylesheets with media="print". This can cause styles to be applied in the snapshot that aren't supposed to be applied.

What it should look like:

screen shot 2018-04-11 at 2 30 33 pm

What it looks like in snapshot (notice the #sidebar-first style with display: none):

screen shot 2018-04-11 at 2 30 51 pm

Styles come from the stylesheet with media="print":

screen shot 2018-04-11 at 2 32 02 pm

Desired behavior:

Snapshots should ignore print stylesheets. In fact, they should probably ignore any stylesheet media value that's not undefined or screen.

Steps to reproduce:

  cy.visit('https://s1.demo.opensourcecms.com/drupal/')

View the snapshot and see that it doesn't appear correct because the print stylesheet hides certain elements such as the search.

Versions

Cypress: 2.1.0
OS: MacOS
Browser: Chrome 65

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