PromucFlow_constructor/app/client/cypress/e2e/Regression/ClientSide/BugTests
sneha122 073bf72c11
fix: entity explorer issue with datasources is fixed (#26770)
## Description
This PR fixes issue with datasource not getting highlighted in entity
explorer:

Suppose we have 3 datasources in our applications: Users, Movies, and
one Postgres or MySQL datasource. Once we create these datasources, we
can see them getting populated in entity explorer -> datasource section.

So there were two issues here:
- If I select Users, I am able to see the Users datasource info on the
right pane but its not active in the entity explorer, Similarly If I
switch to movies, right pane gets updated with movies info but in the
entity explorer, we cannot see movies getting highlighted as thats the
active selection
- If I am on Users datasource review page, I reload the page, now I can
see active selection of Users being highlighted in the entity explorer,
but now if we switch to Movies, right pane gets updated but in entity
explorer Users is highlighted, which is incorrect

This issue occurred because we have used useMemo for
`datasourceElements`, two dependency passed are appWideDS and pageId,
whenever we switch between datasources, `activeDatasourceId` gets
updated but since we have cached the whole datasource listing component
without the dependency of `activeDatasourceId`, it does not recompute
and shows the same state as before.

To fix the issue, `activeDatasourceId` needs to be passed in the
dependency array. After adding this new dependency, another issue
occurred with respect to entity explorer, The order of suggested
datasources would change in entity explorer, This PR addresses that
issue as well.
#### PR fixes following issue(s)
Fixes #26716 
> if no issue exists, please create an issue and ask the maintainers
about this first
>
>
#### Media
> A video or a GIF is preferred. when using Loom, don’t embed because it
looks like it’s a GIF. instead, just link to the video
>
>
#### Type of change
- Bug fix (non-breaking change which fixes an issue)
>
>
>
## Testing
>
#### How Has This Been Tested?
> Please describe the tests that you ran to verify your changes. Also
list any relevant details for your test configuration.
> Delete anything that is not relevant
- [x] Manual
- [ ] JUnit
- [x] Jest
- [ ] Cypress
>
>
#### Test Plan
> Add Testsmith test cases links that relate to this PR
>
>
#### Issues raised during DP testing
> Link issues raised during DP testing for better visiblity and tracking
(copy link from comments dropped on this PR)
>
>
>
## Checklist:
#### Dev activity
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag


#### QA activity:
- [x] [Speedbreak
features](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#speedbreakers-)
have been covered
- [ ] Test plan covers all impacted features and [areas of
interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#areas-of-interest-)
- [ ] Test plan has been peer reviewed by project stakeholders and other
QA members
- [x] Manually tested functionality on DP
- [ ] We had an implementation alignment call with stakeholders post QA
Round 2
- [ ] Cypress test cases have been added and approved by SDET/manual QA
- [ ] Added `Test Plan Approved` label after Cypress tests were reviewed
- [ ] Added `Test Plan Approved` label after JUnit tests were reviewed

---------

Co-authored-by: “sneha122” <“sneha@appsmith.com”>
2023-09-01 13:26:34 +05:30
..
AbortAction_Spec.ts test: Cypress | Cy 12 upgrade + Flaky fixes (#23852) 2023-06-15 18:51:11 +05:30
AllWidgets_Reset_Spec.ts test: Cypress | (DI) S3 added validations (Cont.,) + CI Stabilize (#26486) 2023-08-21 13:19:28 +05:30
ApiBugs_Spec.ts fix: remove redundant code for ab_ds_binding_enabled and ab_ds_schema_enabled ab test flags (#26356) 2023-08-31 19:49:36 +05:30
Bug6732_Spec.ts
Bug9334_Spec.ts test: Cypress | CI Stabilize (Skipped tests fixes) + Cypress upgrade to v13.0.0 (#26583) 2023-08-30 16:24:37 +05:30
Bug14002_Spec.ts
Bug14987_spec.js test: Cypress | Cy 12 upgrade + Flaky fixes (#23852) 2023-06-15 18:51:11 +05:30
Bug15056_Spec.ts test: Cypress | (DI) Arango added validations + CI Stabilize (#26243) 2023-08-18 10:48:35 +05:30
Bug15909_Spec.ts test: Cypress version upgrade Cy 11.2 + Flaky fixes (#23667) 2023-05-24 18:00:39 +05:30
Bug16702_Spec.ts test: Cypress | (DI) Arango added validations + CI Stabilize (#26243) 2023-08-18 10:48:35 +05:30
Bug18035_Spec.ts chore: code splitting for multiple env feature (#25479) 2023-07-21 12:53:17 +07:00
Bug18369_Spec.ts test: Cypress | Simplifying AddDsl method (#24991) 2023-07-04 22:03:31 +05:30
Bug19893_spec.ts test: Cypress | (DI) S3 added validations (Cont.,) + CI Stabilize (#26486) 2023-08-21 13:19:28 +05:30
Bug19933_spec.ts test: Cypress | CI Stablize + verifying DS Connection Errors (DI) (#26004) 2023-08-08 14:44:46 +05:30
Bug19982_Spec.ts
Bug20275_Spec.js
Bug20841_Spec.ts test: Cypress version upgrade Cy 11.2 + Flaky fixes (#23667) 2023-05-24 18:00:39 +05:30
Bug21734_Spec.ts chore: code splitting for multiple env feature (#25479) 2023-07-21 12:53:17 +07:00
Bug22281_WelcomeTour_spec.ts test: Cypress - temp fix to workaround flaky CreateNewApp_spec (#24956) 2023-06-30 22:04:12 +05:30
Bug24194_Spec.ts feat: Improve Linting performance (#23865) 2023-07-05 14:34:03 +01:00
Bug24486_Spec.ts fix: adding branch name in the export application api (#26096) 2023-08-17 16:18:04 +05:30
Bug25148_Spec.ts fix: edit ds button was disabled due to no user perm in ds object (#25235) 2023-07-11 13:30:32 +05:30
Bug25894_spec.ts fix: Fixed mustache binding highlight (#25895) 2023-08-03 12:15:25 +05:30
Bug25982_Spec.ts test: Cypress | CI Stabilize (#26186) 2023-08-10 12:36:03 +05:30
Bug26716_Spec.ts fix: entity explorer issue with datasources is fixed (#26770) 2023-09-01 13:26:34 +05:30
Bugs26410_spec.ts fix: This PR excludes Bug26410 test for airgapped instances (#26619) 2023-08-24 19:54:27 +05:30
CatchBlock_Spec.ts test: Cypress | (DI) Arango added validations + CI Stabilize (#26243) 2023-08-18 10:48:35 +05:30
DatasourceSchema_spec.ts fix: remove redundant code for ab_ds_binding_enabled and ab_ds_schema_enabled ab test flags (#26356) 2023-08-31 19:49:36 +05:30
defaultFilterTextValue_Spec.ts test: Cypress | Simplifying AddDsl method (#24991) 2023-07-04 22:03:31 +05:30
DSDiscardBugs_spec.ts test: Cypress | (DI) Arango added validations + CI Stabilize (#26243) 2023-08-18 10:48:35 +05:30
formHasChanged_Spec.ts test: Cypress | Simplifying AddDsl method (#24991) 2023-07-04 22:03:31 +05:30
GitBugs_Spec.ts feat: simultaneous git status and remote compare api calls (#26397) 2023-08-23 18:56:26 +05:30
InputTruncateCheck_Spec.ts test: Cypress | (DI) Arango added validations + CI Stabilize (#26243) 2023-08-18 10:48:35 +05:30
invalidLintError_Spec.ts
InvalidURL_Spec.ts test: Cypress | CI Stabilize (#26186) 2023-08-10 12:36:03 +05:30
JSParse_Spec.ts
Moment_Spec.ts test: Cypress | (DI) S3 added validations (Cont.,) + CI Stabilize (#26486) 2023-08-21 13:19:28 +05:30
MultipleOnPageLoadConfirmation_Spec.ts