forked from microsoft/playwright
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: organize golden files under __snapshots__ folder (microsoft#3494)
- Loading branch information
1 parent
c0b9cec
commit 262e886
Showing
154 changed files
with
190 additions
and
104 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
Binary file added
BIN
+125 Bytes
...snapshots__/elementhandle-screenshot/chromium/screenshot-element-fractional.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added
BIN
+311 Bytes
...napshots__/elementhandle-screenshot/firefox/screenshot-element-bounding-box.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file added
BIN
+109 Bytes
..._snapshots__/elementhandle-screenshot/firefox/screenshot-element-fractional.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file renamed
BIN
+2.74 KB
...reenshot-element-larger-than-viewport.png → ...reenshot-element-larger-than-viewport.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+153 Bytes
...pshots__/elementhandle-screenshot/firefox/screenshot-element-padding-border.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.86 KB
test/__snapshots__/elementhandle-screenshot/firefox/screenshot-element-rotate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+153 Bytes
...ts__/elementhandle-screenshot/firefox/screenshot-element-scrolled-into-view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+553 Bytes
...snapshots__/elementhandle-screenshot/webkit/screenshot-element-bounding-box.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+175 Bytes
...hots__/elementhandle-screenshot/webkit/screenshot-element-fractional-offset.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+170 Bytes
...__snapshots__/elementhandle-screenshot/webkit/screenshot-element-fractional.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+8.16 KB
...s__/elementhandle-screenshot/webkit/screenshot-element-larger-than-viewport.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file added
BIN
+553 Bytes
test/__snapshots__/elementhandle-screenshot/webkit/screenshot-element-mobile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+252 Bytes
...apshots__/elementhandle-screenshot/webkit/screenshot-element-padding-border.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file added
BIN
+252 Bytes
...ots__/elementhandle-screenshot/webkit/screenshot-element-scrolled-into-view.png
Oops, something went wrong.
Oops, something went wrong.
File renamed without changes
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Oops, something went wrong.
File renamed without changes
Oops, something went wrong.
File renamed without changes
File renamed without changes
File renamed without changes
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file renamed
BIN
+2.21 KB
test/golden-firefox/screenshot-canvas.png → ...-screenshot/firefox/screenshot-canvas.png
Oops, something went wrong.
Binary file added
BIN
+75 Bytes
test/__snapshots__/page-screenshot/firefox/screenshot-clip-odd-size.png
Oops, something went wrong.
Oops, something went wrong.
File renamed without changes
Binary file added
BIN
+54.5 KB
test/__snapshots__/page-screenshot/firefox/screenshot-grid-fullpage.png
Oops, something went wrong.
File renamed without changes
Binary file added
BIN
+2.57 KB
test/__snapshots__/page-screenshot/firefox/screenshot-offscreen-clip.png
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+97 Bytes
test/__snapshots__/page-screenshot/webkit/screenshot-clip-odd-size.png
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+90.9 KB
test/__snapshots__/page-screenshot/webkit/screenshot-device-scale-factor.png
Oops, something went wrong.
Oops, something went wrong.
File renamed without changes
File renamed without changes
Binary file added
BIN
+55.1 KB
test/__snapshots__/page-screenshot/webkit/screenshot-mobile-fullpage.png
Oops, something went wrong.
File renamed without changes
Binary file added
BIN
+3.93 KB
test/__snapshots__/page-screenshot/webkit/screenshot-offscreen-clip.png
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
File renamed without changes
File renamed without changes
File renamed without changes
Oops, something went wrong.
File renamed without changes
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
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
This file was deleted.
Oops, something went wrong.
Diff not rendered.
Diff not rendered.
Diff not rendered.
This file was deleted.
Oops, something went wrong.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/** | ||
* Copyright Microsoft Corporation. All rights reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
const fs = require('fs'); | ||
const os = require('os'); | ||
const path = require('path'); | ||
const util = require('util'); | ||
const { mkdtempAsync, removeFolderAsync } = require('../utils'); | ||
const { registerFixture, registerWorkerFixture } = require('./fixtures'); | ||
const mkdirAsync = util.promisify(fs.mkdir.bind(fs)); | ||
|
||
let workerId; | ||
let outputDir; | ||
|
||
registerWorkerFixture('parallelIndex', async ({}, test) => { | ||
await test(workerId); | ||
}); | ||
|
||
registerFixture('tmpDir', async ({}, test) => { | ||
const tmpDir = await mkdtempAsync(path.join(os.tmpdir(), 'playwright-test-')); | ||
await test(tmpDir); | ||
await removeFolderAsync(tmpDir).catch(e => {}); | ||
}); | ||
|
||
registerWorkerFixture('outputDir', async ({}, test) => { | ||
await mkdirAsync(outputDir, { recursive: true }); | ||
await test(outputDir); | ||
}); | ||
|
||
function initializeWorker(options) { | ||
workerId = options.workerId; | ||
outputDir = options.outputDir; | ||
} | ||
|
||
module.exports = { initializeWorker }; |
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
Oops, something went wrong.