Skip to content

Commit c70700e

Browse files
committed
fix: add test to folder structure support for specs
1 parent caae97f commit c70700e

File tree

5 files changed

+16
-8
lines changed

5 files changed

+16
-8
lines changed

.circleci/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
working_directory: ~/cypress-image-diff
2929
steps:
3030
- checkout
31-
- run: npm ci
31+
- run: npm install
3232
- run:
3333
name: Build
3434
command: npm run build
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
describe('Visuals', () => {
2+
beforeEach(() => {
3+
cy.viewport(1280, 720)
4+
})
5+
6+
it('should compare screenshot within a test in any folder structure', () => {
7+
cy.visit('../../../report-example.html')
8+
cy.compareSnapshot('wholePage')
9+
})
10+
})

package-lock.json

+4-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/utils.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const setFilePermission = (dir, permission) => {
2828
}
2929

3030
const renameAndMoveFile = (originalFilePath, newFilePath) => {
31-
fs.copySync(originalFilePath, newFilePath);
31+
fs.copySync(originalFilePath, newFilePath)
3232
}
3333

3434
const parseImage = async image => {

0 commit comments

Comments
 (0)