-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Remove error message wrapping of Cypress.Blob return values (#8366)
- Loading branch information
1 parent
d5ed26b
commit 1fb7a88
Showing
5 changed files
with
41 additions
and
98 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
describe('blob-util 2.x', () => { | ||
const { Blob, Promise } = Cypress | ||
|
||
// https://github.com/cypress-io/cypress/issues/8365 | ||
;[ | ||
['arrayBufferToBlob', '1234'], | ||
['base64StringToBlob', '1234'], | ||
['binaryStringToBlob', '0100101'], | ||
['dataURLToBlob', 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg=='], | ||
].forEach(([method, value]) => { | ||
it(`Cypress.Blob.${method} does not error when wrapped by Promise methods`, () => { | ||
return Promise.all([ | ||
Promise.resolve(Blob[method](value)), | ||
Promise.try(() => Blob[method](value)), | ||
]) | ||
}) | ||
|
||
it(`Cypress.Blob.${method} does not error with 5.0.0 workaround`, () => { | ||
// this is the 5.0.0 workaround that the cypress-file-upload plugin uses | ||
const wrapBlob = (blob) => { | ||
delete blob.then | ||
|
||
return Cypress.Promise.resolve(blob) | ||
} | ||
|
||
return Promise.all([ | ||
Promise.resolve(wrapBlob(Blob[method](value))), | ||
Promise.try(() => wrapBlob(Blob[method](value))), | ||
]) | ||
}) | ||
}) | ||
}) |
45 changes: 0 additions & 45 deletions
45
packages/driver/cypress/integration/util/breaking_change_warnings_spec.js
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
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.
1fb7a88
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Circle has built the
linux x64
version of the Test Runner.You can install this pre-release platform-specific build using instructions at https://on.cypress.io/installing-cypress#Install-pre-release-version.
You will need to use custom
CYPRESS_INSTALL_BINARY
url and install Cypress using an url instead of the version.1fb7a88
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AppVeyor has built the
win32 ia32
version of the Test Runner.You can install this pre-release platform-specific build using instructions at https://on.cypress.io/installing-cypress#Install-pre-release-version.
You will need to use custom
CYPRESS_INSTALL_BINARY
url and install Cypress using an url instead of the version.Instructions are included below, depending on the shell you are using.
In Command Prompt (
cmd.exe
):In PowerShell:
In Git Bash:
Using
cross-env
:If the above commands do not work for you, you can also try using
cross-env
:1fb7a88
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AppVeyor has built the
win32 x64
version of the Test Runner.You can install this pre-release platform-specific build using instructions at https://on.cypress.io/installing-cypress#Install-pre-release-version.
You will need to use custom
CYPRESS_INSTALL_BINARY
url and install Cypress using an url instead of the version.Instructions are included below, depending on the shell you are using.
In Command Prompt (
cmd.exe
):In PowerShell:
In Git Bash:
Using
cross-env
:If the above commands do not work for you, you can also try using
cross-env
: