Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add mimeType support; Improve TypedArray support #19794

Merged
merged 2 commits into from
Jan 21, 2022
Merged

Conversation

BlueWinds
Copy link
Contributor

@BlueWinds BlueWinds commented Jan 20, 2022

User facing changelog

.selectFile() automatically infers the mime type of files based on their extension, and allows users to set it explicitly using the mimeType property on files.

In addition, users can specify the file contents with any TypedArray instance. Previously only instances of Cypress.Buffer were supported.

Additional details

Example:

cy.get('input[type=file]').selectFile({
  contents: Uint8Array.from('567'),
  mimeType: 'text/plain',
})

How has the user experience changed?

PR Tasks

@BlueWinds BlueWinds requested a review from a team as a code owner January 20, 2022 18:01
@BlueWinds BlueWinds requested review from jennifer-shehane and removed request for a team January 20, 2022 18:01
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jan 20, 2022

Thanks for taking the time to open a PR!

@jennifer-shehane jennifer-shehane requested review from cowboy and removed request for jennifer-shehane January 20, 2022 18:02
@BlueWinds BlueWinds changed the title Add mimeType support; Improve TypedArray support feat: Add mimeType support; Improve TypedArray support Jan 20, 2022
@tbiethman tbiethman self-requested a review January 20, 2022 18:21
tbiethman
tbiethman previously approved these changes Jan 21, 2022
@BlueWinds BlueWinds dismissed stale reviews from AtofStryker and tbiethman via 61c2ab9 January 21, 2022 18:07
@BlueWinds BlueWinds merged commit b16553e into develop Jan 21, 2022
@BlueWinds BlueWinds deleted the issue-19751 branch January 21, 2022 18:24
@cypress
Copy link

cypress bot commented Jan 21, 2022



Test summary

19141 0 218 0Flakiness 2


Run details

Project cypress
Status Passed
Commit 61c2ab9
Started Jan 21, 2022 6:12 PM
Ended Jan 21, 2022 6:24 PM
Duration 11:36 💡
OS Linux Debian - 10.10
Browser Multiple

View run in Cypress Dashboard ➡️


Flakiness

settings_spec.js Flakiness
1 Settings > file preference panel > loads preferred editor, available editors and shows spinner
cypress/proxy-logging_spec.ts Flakiness
1 Proxy Logging > request logging > xhr log has response body/status code

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9.3.0: selectFile: missing mimeType
3 participants