-
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.
- Loading branch information
1 parent
949701d
commit 47940f2
Showing
11 changed files
with
1,953 additions
and
350 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
Large diffs are not rendered by default.
Oops, something went wrong.
1,523 changes: 1,522 additions & 1 deletion
1,523
e2e/cypress-13-demo/data-references/ccy-1.9.4-cy-12-cycl.json
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
e2e/cypress-13-demo/validation-results/cypress-cloud-validation.json
Large diffs are not rendered by default.
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
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 |
---|---|---|
@@ -1,70 +1,72 @@ | ||
import { ExecutionState } from "../state"; | ||
import { generateRandomString } from "../utils"; | ||
|
||
export function handleScreenshotEvent( | ||
screenshot: Cypress.ScreenshotDetails, | ||
executionState: ExecutionState | ||
screenshot: Cypress.ScreenshotDetails, | ||
executionState: ExecutionState | ||
) { | ||
const testId = executionState.getCurrentTestID(); | ||
const screenshotData = { | ||
...screenshot, | ||
testId, | ||
height: screenshot.dimensions.height, | ||
width: screenshot.dimensions.width, | ||
}; | ||
executionState.setScreenshotsData(screenshotData); | ||
const testId = executionState.getCurrentTestID(); | ||
const screenshotData = { | ||
...screenshot, | ||
testId, | ||
height: screenshot.dimensions.height, | ||
width: screenshot.dimensions.width, | ||
screenshotId: generateRandomString(6), | ||
}; | ||
executionState.setScreenshotsData(screenshotData); | ||
} | ||
|
||
export function handleTestBefore( | ||
testAttempt: string, | ||
executionState: ExecutionState | ||
testAttempt: string, | ||
executionState: ExecutionState | ||
) { | ||
executionState.setCurrentTestID(JSON.parse(testAttempt).id); | ||
executionState.setCurrentTestID(JSON.parse(testAttempt).id); | ||
} | ||
|
||
export function handleTestAfter( | ||
testAttempt: string, | ||
executionState: ExecutionState | ||
testAttempt: string, | ||
executionState: ExecutionState | ||
) { | ||
const test = JSON.parse(testAttempt); | ||
const { | ||
title, | ||
body, | ||
retries, | ||
_currentRetry, | ||
pending, | ||
type, | ||
invocationDetails, | ||
id, | ||
hooks, | ||
order, | ||
wallClockStartedAt, | ||
timings, | ||
_events, | ||
_eventsCount, | ||
duration, | ||
err, | ||
state, | ||
fullTitle, | ||
} = test; | ||
const attempt = { | ||
title, | ||
fullTitle, | ||
body, | ||
retries, | ||
_currentRetry, | ||
pending, | ||
type, | ||
invocationDetails, | ||
id, | ||
hooks, | ||
order, | ||
wallClockStartedAt, | ||
timings, | ||
_events, | ||
_eventsCount, | ||
duration, | ||
err, | ||
state, | ||
}; | ||
executionState.setAttemptsData(attempt); | ||
const test = JSON.parse(testAttempt); | ||
const { | ||
title, | ||
body, | ||
retries, | ||
_currentRetry, | ||
pending, | ||
type, | ||
invocationDetails, | ||
id, | ||
hooks, | ||
order, | ||
wallClockStartedAt, | ||
timings, | ||
_events, | ||
_eventsCount, | ||
duration, | ||
err, | ||
state, | ||
fullTitle, | ||
} = test; | ||
const attempt = { | ||
title, | ||
fullTitle, | ||
body, | ||
retries, | ||
_currentRetry, | ||
pending, | ||
type, | ||
invocationDetails, | ||
id, | ||
hooks, | ||
order, | ||
wallClockStartedAt, | ||
timings, | ||
_events, | ||
_eventsCount, | ||
duration, | ||
err, | ||
state, | ||
}; | ||
executionState.setAttemptsData(attempt); | ||
} |
Oops, something went wrong.