Skip to content

Commit

Permalink
chore: rename upload results to upload screenshots & videos
Browse files Browse the repository at this point in the history
  • Loading branch information
AtofStryker committed May 19, 2023
1 parent eef8cd2 commit 2d2ff62
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 34 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/errors/src/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -520,9 +520,9 @@ export const AllCypressErrors = {
This error will not affect or change the exit code.`
},
CLOUD_CANNOT_UPLOAD_RESULTS: (apiErr: Error) => {
CLOUD_CANNOT_UPLOAD_ARTIFACTS: (apiErr: Error) => {
return errTemplate`\
Warning: We encountered an error while uploading results from your run.
Warning: We encountered an error while Uploading Screenshots & Videos from your run.
These results will not be recorded.
Expand Down
2 changes: 1 addition & 1 deletion packages/errors/test/unit/visualSnapshotErrors_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ describe('visual error templates', () => {
default: [],
}
},
CLOUD_CANNOT_UPLOAD_RESULTS: () => {
CLOUD_CANNOT_UPLOAD_ARTIFACTS: () => {
const err = makeApiErr()

return {
Expand Down
2 changes: 1 addition & 1 deletion packages/graphql/schemas/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -1126,7 +1126,7 @@ enum ErrorTypeEnum {
CLOUD_CANNOT_CREATE_RUN_OR_INSTANCE
CLOUD_CANNOT_PROCEED_IN_PARALLEL
CLOUD_CANNOT_PROCEED_IN_SERIAL
CLOUD_CANNOT_UPLOAD_RESULTS
CLOUD_CANNOT_UPLOAD_ARTIFACTS
CLOUD_GRAPHQL_ERROR
CLOUD_INVALID_RUN_REQUEST
CLOUD_PARALLEL_DISALLOWED
Expand Down
4 changes: 2 additions & 2 deletions packages/server/lib/modes/record.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ const uploadArtifacts = (options = {}) => {
return Promise
.all(uploads)
.catch((err) => {
errors.warning('CLOUD_CANNOT_UPLOAD_RESULTS', err)
errors.warning('CLOUD_CANNOT_UPLOAD_ARTIFACTS', err)

return exception.create(err)
})
Expand Down Expand Up @@ -690,7 +690,7 @@ const createRunAndRecordSpecs = (options = {}) => {
// eslint-disable-next-line no-console
console.log('')

terminal.header('Uploading Results', {
terminal.header('Uploading Screenshots & Videos', {
color: ['blue'],
})

Expand Down
50 changes: 25 additions & 25 deletions system-tests/__snapshots__/record_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Fix the error in your code and re-run your tests.
- Video output: /XXX/XXX/XXX/cypress/videos/record_error.cy.js.mp4
(Uploading Results)
(Uploading Screenshots & Videos)
- Done Uploading (1/1) /foo/bar/.projects/e2e/cypress/videos/record_error.cy.js.mp4
Expand Down Expand Up @@ -130,7 +130,7 @@ Because this error occurred during a \`before each\` hook we are skipping the re
- Video output: /XXX/XXX/XXX/cypress/videos/record_fail.cy.js.mp4
(Uploading Results)
(Uploading Screenshots & Videos)
- Done Uploading (*/2) /foo/bar/.projects/e2e/cypress/screenshots/record_fail.cy.js/record fails -- fails 1 -- before each hook (failed).png
- Done Uploading (*/2) /foo/bar/.projects/e2e/cypress/videos/record_fail.cy.js.mp4
Expand Down Expand Up @@ -172,7 +172,7 @@ plugin stdout
- /XXX/XXX/XXX/cypress/screenshots/record_pass.cy.js/yay it passes.png (400x1022)
(Uploading Results)
(Uploading Screenshots & Videos)
- Done Uploading (1/1) /foo/bar/.projects/e2e/cypress/screenshots/record_pass.cy.js/yay it passes.png
Expand Down Expand Up @@ -232,7 +232,7 @@ We dynamically generated a new test to display this failure.
- Video output: /XXX/XXX/XXX/cypress/videos/record_uncaught.cy.js.mp4
(Uploading Results)
(Uploading Screenshots & Videos)
- Done Uploading (*/2) /foo/bar/.projects/e2e/cypress/screenshots/record_uncaught.cy.js/An uncaught error was detected outside of a test (failed).png
- Done Uploading (*/2) /foo/bar/.projects/e2e/cypress/videos/record_uncaught.cy.js.mp4
Expand Down Expand Up @@ -329,7 +329,7 @@ exports['e2e record api interaction errors update instance stdout warns but proc
- /XXX/XXX/XXX/cypress/screenshots/record_pass.cy.js/yay it passes.png (400x1022)
(Uploading Results)
(Uploading Screenshots & Videos)
- Done Uploading (1/1) /foo/bar/.projects/e2e/cypress/screenshots/record_pass.cy.js/yay it passes.png
Warning: We encountered an error communicating with our servers.
Expand Down Expand Up @@ -450,7 +450,7 @@ exports['e2e record api interaction errors uploading assets warns but proceeds 1
- /XXX/XXX/XXX/cypress/screenshots/record_pass.cy.js/yay it passes.png (400x1022)
(Uploading Results)
(Uploading Screenshots & Videos)
- Failed Uploading (*/2) /foo/bar/.projects/e2e/cypress/screenshots/record_pass.cy.js/yay it passes.png
- Failed Uploading (*/2) /foo/bar/.projects/e2e/cypress/videos/record_pass.cy.js.mp4
Expand Down Expand Up @@ -674,7 +674,7 @@ exports['e2e record api interaction errors update instance 500 does not proceed
- /XXX/XXX/XXX/cypress/screenshots/record_pass.cy.js/yay it passes.png (400x1022)
(Uploading Results)
(Uploading Screenshots & Videos)
We encountered an unexpected error communicating with our servers.
Expand Down Expand Up @@ -763,7 +763,7 @@ We will retry 3 more times in X second(s)...
- /XXX/XXX/XXX/cypress/screenshots/record_pass.cy.js/yay it passes.png (400x1022)
(Uploading Results)
(Uploading Screenshots & Videos)
- Done Uploading (1/1) /foo/bar/.projects/e2e/cypress/screenshots/record_pass.cy.js/yay it passes.png
Expand Down Expand Up @@ -963,7 +963,7 @@ https://on.cypress.io/dashboard/organizations/org-id-1234/billing
- /XXX/XXX/XXX/cypress/screenshots/record_pass.cy.js/yay it passes.png (400x1022)
(Uploading Results)
(Uploading Screenshots & Videos)
- Done Uploading (1/1) /foo/bar/.projects/e2e/cypress/screenshots/record_pass.cy.js/yay it passes.png
Expand Down Expand Up @@ -1043,7 +1043,7 @@ https://on.cypress.io/dashboard/organizations/org-id-1234/billing
- /XXX/XXX/XXX/cypress/screenshots/record_pass.cy.js/yay it passes.png (400x1022)
(Uploading Results)
(Uploading Screenshots & Videos)
- Done Uploading (1/1) /foo/bar/.projects/e2e/cypress/screenshots/record_pass.cy.js/yay it passes.png
Expand Down Expand Up @@ -1128,7 +1128,7 @@ Details:
- /XXX/XXX/XXX/cypress/screenshots/record_pass.cy.js/yay it passes.png (400x1022)
(Uploading Results)
(Uploading Screenshots & Videos)
- Done Uploading (1/1) /foo/bar/.projects/e2e/cypress/screenshots/record_pass.cy.js/yay it passes.png
Expand Down Expand Up @@ -1464,7 +1464,7 @@ https://on.cypress.io/dashboard/organizations/org-id-1234/billing
- /XXX/XXX/XXX/cypress/screenshots/record_pass.cy.js/yay it passes.png (400x1022)
(Uploading Results)
(Uploading Screenshots & Videos)
- Done Uploading (1/1) /foo/bar/.projects/e2e/cypress/screenshots/record_pass.cy.js/yay it passes.png
Expand Down Expand Up @@ -1546,7 +1546,7 @@ https://on.cypress.io/dashboard/organizations/org-id-1234/billing
- /XXX/XXX/XXX/cypress/screenshots/record_pass.cy.js/yay it passes.png (400x1022)
(Uploading Results)
(Uploading Screenshots & Videos)
- Done Uploading (1/1) /foo/bar/.projects/e2e/cypress/screenshots/record_pass.cy.js/yay it passes.png
Expand Down Expand Up @@ -1626,7 +1626,7 @@ https://on.cypress.io/dashboard/organizations/org-id-1234/billing
- /XXX/XXX/XXX/cypress/screenshots/record_pass.cy.js/yay it passes.png (400x1022)
(Uploading Results)
(Uploading Screenshots & Videos)
- Done Uploading (1/1) /foo/bar/.projects/e2e/cypress/screenshots/record_pass.cy.js/yay it passes.png
Expand Down Expand Up @@ -1706,7 +1706,7 @@ https://on.cypress.io/dashboard/organizations/org-id-1234/billing
- /XXX/XXX/XXX/cypress/screenshots/record_pass.cy.js/yay it passes.png (400x1022)
(Uploading Results)
(Uploading Screenshots & Videos)
- Done Uploading (1/1) /foo/bar/.projects/e2e/cypress/screenshots/record_pass.cy.js/yay it passes.png
Expand Down Expand Up @@ -1786,7 +1786,7 @@ https://on.cypress.io/dashboard/organizations/org-id-1234/billing
- /XXX/XXX/XXX/cypress/screenshots/record_pass.cy.js/yay it passes.png (400x1022)
(Uploading Results)
(Uploading Screenshots & Videos)
- Done Uploading (1/1) /foo/bar/.projects/e2e/cypress/screenshots/record_pass.cy.js/yay it passes.png
Expand Down Expand Up @@ -1980,7 +1980,7 @@ exports['e2e record api interaction errors postInstanceResults errors and exits
- /XXX/XXX/XXX/cypress/screenshots/record_pass.cy.js/yay it passes.png (400x1022)
(Uploading Results)
(Uploading Screenshots & Videos)
We encountered an unexpected error communicating with our servers.
Expand Down Expand Up @@ -2040,7 +2040,7 @@ exports['e2e record api skips specs records tests and exits without executing 1'
└────────────────────────────────────────────────────────────────────────────────────────────────┘
(Uploading Results)
(Uploading Screenshots & Videos)
- Nothing to Upload
Expand Down Expand Up @@ -2119,7 +2119,7 @@ exports['e2e record api skips specs records tests and exits without executing in
└────────────────────────────────────────────────────────────────────────────────────────────────┘
(Uploading Results)
(Uploading Screenshots & Videos)
- Nothing to Upload
Expand Down Expand Up @@ -2187,7 +2187,7 @@ exports['e2e record empty specs succeeds when empty spec file 1'] = `
└────────────────────────────────────────────────────────────────────────────────────────────────┘
(Uploading Results)
(Uploading Screenshots & Videos)
- Nothing to Upload
Expand Down Expand Up @@ -2216,7 +2216,7 @@ exports['e2e record empty specs succeeds when empty spec file 1'] = `
└────────────────────────────────────────────────────────────────────────────────────────────────┘
(Uploading Results)
(Uploading Screenshots & Videos)
- Nothing to Upload
Expand Down Expand Up @@ -2363,7 +2363,7 @@ Because this error occurred during a \`before each\` hook we are skipping the re
- Video output: /XXX/XXX/XXX/cypress/videos/record_fail.cy.js.mp4
(Uploading Results)
(Uploading Screenshots & Videos)
- Done Uploading (*/2) /foo/bar/.projects/e2e/cypress/screenshots/record_fail.cy.js/record fails -- fails 1 -- before each hook (failed).png
- Done Uploading (*/2) /foo/bar/.projects/e2e/cypress/videos/record_fail.cy.js.mp4
Expand Down Expand Up @@ -2405,7 +2405,7 @@ plugin stdout
- /XXX/XXX/XXX/cypress/screenshots/record_pass.cy.js/yay it passes.png (400x1022)
(Uploading Results)
(Uploading Screenshots & Videos)
- Done Uploading (1/1) /foo/bar/.projects/e2e/cypress/screenshots/record_pass.cy.js/yay it passes.png
Expand Down Expand Up @@ -2483,7 +2483,7 @@ plugin stdout
- /XXX/XXX/XXX/cypress/screenshots/record_pass.cy.js/yay it passes.png (400x1022)
(Uploading Results)
(Uploading Screenshots & Videos)
- Done Uploading (1/1) /foo/bar/.projects/e2e/cypress/screenshots/record_pass.cy.js/yay it passes.png
Expand Down Expand Up @@ -2690,7 +2690,7 @@ https://on.cypress.io/dashboard/organizations/org-id-1234/billing
- /XXX/XXX/XXX/cypress/screenshots/record_pass.cy.js/yay it passes.png (400x1022)
(Uploading Results)
(Uploading Screenshots & Videos)
- Done Uploading (1/1) /foo/bar/.projects/e2e/cypress/screenshots/record_pass.cy.js/yay it passes.png
Expand Down
4 changes: 2 additions & 2 deletions system-tests/lib/normalizeStdout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ export const normalizeStdout = function (str: string, options: any = {}) {
// 15 seconds -> XX seconds
.replace(/((\d+ minutes?,\s+)?\d+ seconds? *)/g, replaceTime)
.replace(/\r/g, '')
// replaces multiple lines of uploading results (since order not guaranteed)
.replace(/(Uploading Results.*?\n\n)((.*-.*[\s\S\r]){2,}?)(\n\n)/g, replaceUploadingResults)
// replaces multiple lines of uploading screenshots & results (since order not guaranteed)
.replace(/(Uploading Screenshots & Videos.*?\n\n)((.*-.*[\s\S\r]){2,}?)(\n\n)/g, replaceUploadingResults)
// fix "Require stacks" for CI
.replace(/^(\- )(\/.*\/packages\/server\/)(.*)$/gm, '$1$3')
// Different browsers have different cross-origin error messages
Expand Down

0 comments on commit 2d2ff62

Please sign in to comment.