Skip to content

Commit

Permalink
Adjust settings for comparisons
Browse files Browse the repository at this point in the history
  • Loading branch information
ascorbic committed Oct 25, 2020
1 parent 6660374 commit a601c97
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 16 deletions.
2 changes: 1 addition & 1 deletion e2e-tests/visual-regression/cypress/integration/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe(`GatsbyImage`, () => {
// Wait for main image to load
cy.get("[data-main-image]").should("have.css", "opacity", "1")
// Wait for blur-up
cy.wait(600)
cy.wait(1000)
cy.get("#test-image").matchImageSnapshot()
})
})
Expand Down
7 changes: 6 additions & 1 deletion e2e-tests/visual-regression/cypress/support/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,10 @@ import "gatsby-cypress"
import { addMatchImageSnapshotCommand } from "cypress-image-snapshot/command"

addMatchImageSnapshotCommand({
customDiffDir: `/__diff_output__`,
customDiffDir: `/__diff_output__`,
customDiffConfig: {
threshold: 0.1
},
failureThreshold: 0.03,
failureThresholdType: `percent`
})
16 changes: 2 additions & 14 deletions e2e-tests/visual-regression/src/components/layout.css
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,7 @@ sub {
sup {
top: -0.5em;
}
img {
border-style: none;
}

svg:not(:root) {
overflow: hidden;
}
Expand Down Expand Up @@ -207,17 +205,7 @@ body {
-webkit-font-feature-settings: "kern", "liga", "clig", "calt";
font-feature-settings: "kern", "liga", "clig", "calt";
}
img {
max-width: 100%;
margin-left: 0;
margin-right: 0;
margin-top: 0;
padding-bottom: 0;
padding-left: 0;
padding-right: 0;
padding-top: 0;
margin-bottom: 1.45rem;
}

h1 {
margin-left: 0;
margin-right: 0;
Expand Down
1 change: 1 addition & 0 deletions e2e-tests/visual-regression/src/components/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const Layout = ({ children }) => (
style={{
margin: `0 auto`,
padding: `10px 20px`,
background: `white`,
}}
>
{children}
Expand Down

0 comments on commit a601c97

Please sign in to comment.