PromucFlow_constructor/app
Jacques Ikot a8a925005a
feat: improve unit test mocking in useTableOrSpreadsheet hook (#40476)
## Description
The useTableOrSpreadsheet hook unit test consistently failed on EE due
to complex mocking and missing state values. This PR improves the test
cases using a simpler state object to test the hook.


Fixes #`Issue Number`  
_or_  
Fixes `Issue URL`
> [!WARNING]  
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._

## Automation

/ok-to-test tags="@tag.Sanity"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/14733672732>
> Commit: 16afe15ac1a2990e6d6ea5e0e8db6938daedad5c
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=14733672732&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Tue, 29 Apr 2025 15:04:57 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**
- Replaced the previous test suite for the table or spreadsheet dropdown
hook with a new set of tests, ensuring correct behavior across SQL,
MongoDB, and Google Sheets datasources. The new tests verify that
options are enabled or disabled appropriately based on datasource type
and configuration.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-30 05:47:00 -07:00
..
client feat: improve unit test mocking in useTableOrSpreadsheet hook (#40476) 2025-04-30 05:47:00 -07:00
server chore: ee split plugin schemas (#40488) 2025-04-30 14:17:10 +05:30
util