PromucFlow_constructor/app/client/cypress/support
sneha122 b7c104c66f
fix: ds discard popup issue fixes (#19114)
This PR includes following changes:
- With latest datasource autosave improvements, we do not save the
datasource immediately but save it on explicit click of save button, so
in case user has not saved any changes and tries to leave the page, we
have added a popup to inform users that they have unsaved changes and
whether they would like to save them or not.
- The issue was in case of postgres and authenticated API datasource,
this popup was getting seen even when the user has not made any changes
in the datasource configuration. This PR solves that issue.
- The unsaved changes popup needs to be shown only when user has made
any new changes in the datasource form

TL;DR
- We have used redux form's isDirty method to check if user has made any
new updates to the form or not. This isDirty compares initial value of
datasource form with current form value and if current form value is
different it shows the unsaved changes popup
- The issue occurred because in case of postgres and authenticated API
datasource, we initialise 1 default pair of host address and port
(postgres), and default pairs of headers and query parameters
(Authenticated API). These initial default changes made the form dirty
and so user used to see the popup even when they have not explicitly
made any changes.
- This PR fixes the issue by setting initial form value with these
defaults so they do not make the form dirty.

Fixes #18962 , #18998 

https://user-images.githubusercontent.com/30018882/208931098-b570e3c4-10bc-4b76-bd54-531ccf869436.mov

Co-authored-by: “sneha122” <“sneha@appsmith.com”>
Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
2022-12-30 15:53:24 +05:30
..
Objects feat: in-app embed settings (#19023) 2022-12-26 10:41:33 +05:30
Pages fix: ds discard popup issue fixes (#19114) 2022-12-30 15:53:24 +05:30
AdminSettingsCommands.js chore: fix flaky embed settings test (#18491) 2022-11-30 09:42:20 +05:30
ApiCommands.js chore: Fixing lint errors in the Cypress code base (#16504) 2022-09-03 23:57:41 +05:30
commands.js fix: update button states to secondary (#19048) 2022-12-29 11:08:13 +00:00
Constants.js perf: Widget re-rendering refactor (#14485) 2022-08-19 15:40:36 +05:30
dataSourceCommands.js test: add common test methods for RBAC (#18968) 2022-12-16 10:45:25 +05:30
gitSync.js test: Automated tests for Bug18376 + few flaky fixes (#18769) 2022-12-09 10:36:52 +05:30
index.js test: Add dummy users in Cypress test suite (#18675) 2022-12-06 11:21:54 +05:30
queryCommands.js test: Script updates for flaky tests (#16558) 2022-09-07 23:55:55 +05:30
themeCommands.js chore: Makes use of DS components in ThemeControls (#19000) 2022-12-23 15:37:29 +05:30
timeout.js fix: Text getting clipped for Italic font in Table Widget V1 (#15549) 2022-08-16 11:12:31 +05:30
widgetCommands.js test: add common test methods for RBAC (#18968) 2022-12-16 10:45:25 +05:30
WorkspaceCommands.js feat: in-app embed settings (#19023) 2022-12-26 10:41:33 +05:30