mirrored from git://develop.git.wordpress.org/
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add custom setup and ignore snapshot files.
- Loading branch information
1 parent
1c9c282
commit 9a3d1f0
Showing
30 changed files
with
229 additions
and
202 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file removed
BIN
-40.9 KB
...hots__/visual-snapshots-test-js-admin-visual-snapshots-add-new-media-1-snap.png
Binary file not shown.
Binary file removed
BIN
-53.3 KB
...shots__/visual-snapshots-test-js-admin-visual-snapshots-add-new-user-1-snap.png
Binary file not shown.
Binary file removed
BIN
-59.1 KB
...napshots__/visual-snapshots-test-js-admin-visual-snapshots-all-pages-1-snap.png
Binary file not shown.
Binary file removed
BIN
-73.7 KB
...napshots__/visual-snapshots-test-js-admin-visual-snapshots-all-posts-1-snap.png
Binary file not shown.
Binary file removed
BIN
-55.8 KB
...napshots__/visual-snapshots-test-js-admin-visual-snapshots-all-users-1-snap.png
Binary file not shown.
Binary file removed
BIN
-38 KB
...ts__/visual-snapshots-test-js-admin-visual-snapshots-available-tools-1-snap.png
Binary file not shown.
Binary file removed
BIN
-126 KB
...apshots__/visual-snapshots-test-js-admin-visual-snapshots-categories-1-snap.png
Binary file not shown.
Binary file removed
BIN
-83.9 KB
...snapshots__/visual-snapshots-test-js-admin-visual-snapshots-comments-1-snap.png
Binary file not shown.
Binary file removed
BIN
-275 KB
.../visual-snapshots-test-js-admin-visual-snapshots-discussion-settings-1-snap.png
Binary file not shown.
Binary file removed
BIN
-55.2 KB
.../visual-snapshots-test-js-admin-visual-snapshots-erase-personal-data-1-snap.png
Binary file not shown.
Binary file removed
BIN
-70.7 KB
...e_snapshots__/visual-snapshots-test-js-admin-visual-snapshots-export-1-snap.png
Binary file not shown.
Binary file removed
BIN
-56 KB
...visual-snapshots-test-js-admin-visual-snapshots-export-personal-data-1-snap.png
Binary file not shown.
Binary file removed
BIN
-98.8 KB
...e_snapshots__/visual-snapshots-test-js-admin-visual-snapshots-import-1-snap.png
Binary file not shown.
Binary file removed
BIN
-28.9 KB
...hots__/visual-snapshots-test-js-admin-visual-snapshots-media-library-1-snap.png
Binary file not shown.
Binary file removed
BIN
-70.1 KB
...ots__/visual-snapshots-test-js-admin-visual-snapshots-media-settings-1-snap.png
Binary file not shown.
Binary file removed
BIN
-57.1 KB
...ge_snapshots__/visual-snapshots-test-js-admin-visual-snapshots-menus-1-snap.png
Binary file not shown.
Binary file removed
BIN
-405 KB
..._snapshots__/visual-snapshots-test-js-admin-visual-snapshots-plugins-1-snap.png
Binary file not shown.
Binary file removed
BIN
-106 KB
...s__/visual-snapshots-test-js-admin-visual-snapshots-privacy-settings-1-snap.png
Binary file not shown.
Binary file removed
BIN
-84.6 KB
...s__/visual-snapshots-test-js-admin-visual-snapshots-reading-settings-1-snap.png
Binary file not shown.
Binary file removed
BIN
-77.6 KB
...age_snapshots__/visual-snapshots-test-js-admin-visual-snapshots-tags-1-snap.png
Binary file not shown.
Binary file removed
BIN
-161 KB
..._snapshots__/visual-snapshots-test-js-admin-visual-snapshots-widgets-1-snap.png
Binary file not shown.
Binary file removed
BIN
-173 KB
...shots__/visual-snapshots-test-js-admin-visual-snapshots-your-profile-1-snap.png
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { configureToMatchImageSnapshot } from 'jest-image-snapshot'; | ||
|
||
const toMatchImageSnapshot = configureToMatchImageSnapshot( { | ||
failureThreshold: 1, | ||
} ); | ||
|
||
// Extend Jest's "expect" with image snapshot functionality. | ||
expect.extend( { toMatchImageSnapshot } ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
const config = require( '@wordpress/scripts/config/jest-e2e.config' ); | ||
|
||
const jestVisualRegressionConfig = { | ||
...config, | ||
setupFilesAfterEnv: [ '<rootDir>/config/bootstrap.js' ], | ||
}; | ||
|
||
module.exports = jestVisualRegressionConfig; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
const dotenv = require( 'dotenv' ); | ||
const dotenv_expand = require( 'dotenv-expand' ); | ||
const { sync: spawn } = require( 'cross-spawn' ); | ||
const { execSync } = require( 'child_process' ); | ||
|
||
// WP_BASE_URL interpolates LOCAL_PORT, so needs to be parsed by dotenv_expand(). | ||
dotenv_expand( dotenv.config() ); | ||
|
||
const result = spawn( 'node', [ require.resolve( 'puppeteer/install' ) ], { | ||
stdio: 'inherit', | ||
} ); | ||
if ( result.status > 0 ) { | ||
process.exit( result.status ); | ||
} | ||
|
||
// Run the tests, passing additional arguments through to the test script. | ||
execSync( | ||
'wp-scripts test-e2e --config tests/visual-regression/jest.config.js ' + | ||
process.argv.slice( 2 ).join( ' ' ), | ||
{ stdio: 'inherit' } | ||
); |
Oops, something went wrong.