ci: upload test artifacts (#42925)
* Upload test-artifacts directory * Rename test artifacts directory to avoid conflicts * Update .gitignore * Upload test artifacts * Update .gitignore * Update move-artifacts.sh * Update artifacts.ts * Update pipeline-segment-electron-test.yml * Make output less noisy * reduce artifact image size
This commit is contained in:
parent
778d3098a0
commit
c7709747d0
3 changed files with 17 additions and 2 deletions
|
@ -167,11 +167,18 @@ export class ScreenCapture {
|
|||
} while (Date.now() < expiration);
|
||||
|
||||
if (!gotExpectedResult) {
|
||||
// Limit image to 720p to save on storage space
|
||||
if (process.env.CI) {
|
||||
const width = Math.floor(Math.min(frame.getSize().width, 720));
|
||||
frame = frame.resize({ width });
|
||||
}
|
||||
|
||||
// Save the image as an artifact for better debugging
|
||||
const artifactName = await createArtifactWithRandomId(
|
||||
(id) => `color-mismatch-${id}.png`,
|
||||
frame.toPNG()
|
||||
);
|
||||
|
||||
throw new AssertionError(
|
||||
`Expected color at (${point.x}, ${point.y}) to ${
|
||||
matchIsExpected ? 'match' : '*not* match'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue