fix: cypress test for multipart/form-data#39356
Conversation
WalkthroughThis pull request updates the Cypress API test for multipart form data handling. The test now retrieves the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (7)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
|
/build-deploy-preview skip-tests=true |
|
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/13407909149. |
|
Deploy-Preview-URL: https://ce-39356.dp.appsmith.com |
7b2360f
## Description
> This PR fixes the cypress test for API multipart/form-data when the
FilePicker is selected as Base64
We have updated the cypress test to use `{{FilePicker1.files[0].data}}`
instead of `{{FilePicker1.files[0]}}`, this is because for base64 type
file picker we have to use `.data` property to make the file upload work
successfully.
Earlier, while the cypress test was passing with
{{FilePicker1.files[0]}} but the uploaded image was corrupted (please
check the screen recording below).
https://github.com/user-attachments/assets/c8cf07a1-db1c-4065-913a-00d544fe7e2b
Fixes appsmithorg#39354
## Automation
/ok-to-test tags="@tag.Datasource"
### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results -->
> [!IMPORTANT]
> 🟣 🟣 🟣 Your tests are running.
> Tests running at:
<https://github.com/appsmithorg/appsmith/actions/runs/13408509228>
> Commit: 7b2360f
> Workflow: `PR Automation test suite`
> Tags: `@tag.Datasource`
> Spec: ``
> <hr>Wed, 19 Feb 2025 08:40:23 UTC
<!-- end of auto-generated comment: Cypress test results -->
## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **Tests**
- Updated file upload tests to properly validate file data extraction.
- Added a test scenario for adding new pages to enhance page management
verification.
- Revised page selection during tests for more accurate validation
outcomes.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Description
We have updated the cypress test to use
{{FilePicker1.files[0].data}}instead of{{FilePicker1.files[0]}}, this is because for base64 type file picker we have to use.dataproperty to make the file upload work successfully.Earlier, while the cypress test was passing with {{FilePicker1.files[0]}} but the uploaded image was corrupted (please check the screen recording below).
Invalid.usage.of.base64.mov
Fixes #39354
Automation
/ok-to-test tags="@tag.Datasource"
🔍 Cypress test results
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/13408509228
Commit: 7b2360f
Cypress dashboard.
Tags:
@tag.DatasourceSpec:
Wed, 19 Feb 2025 09:28:34 UTC
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit