Commit Graph

41 Commits

Author SHA1 Message Date
NandanAnantharamu
7135acae64
test:PartialExport_Widgets spec file updated and import app method updated with validations (#33343)
RCA:
PartialExport_Widgets_spec.ts was failing where we export and compare
files.

Solution:

- Updated the WidgetsExportedOnly.json, now the comparison step is
working as expected
- Improved the assertions within importApp() reduced wait time and
waiting for import modal to close as a check.
- Also updated tags which used importApp() below are the list of files
[AppNavigation_spec.ts,Sidebar_spec.ts,TopStacked_spec.ts,TopInline_spec.ts,Editor_Segment_Context_Switching_spec.ts,JSOnLoad2_Spec.ts]
- Reverted the intercept success check within ImportApp()
- Updated PartialExport_Widgets_spec.ts with network call assertion post
import

/ok-to-test tags="@tag.Workspace,@tag.ImportExport"<!-- This is an
auto-generated comment: Cypress test results -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/9028944129>
> Commit: b9ad3c9f7c9f6b52aa061f286b143b715b7d627a
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9028944129&attempt=1"
target="_blank">Click here!</a>

<!-- end of auto-generated comment: Cypress test results  -->
2024-05-10 19:20:40 +05:30
Apeksha Bhosale
d88b43165f
test: GitSyncedApps_spec - multiple IA changes (#33257)
## Description
In this spec, IA changes were required.
1. table version change ---
https://github.com/appsmithorg/appsmith/pull/29457
2. page related functionalities addition and replacement ie clone, hide
and show list to assert a page name
3. replaced as many as possible git related functionalities to gitSync
helpers


Link - **9th Spec** in
https://www.notion.so/appsmith/Cypress-tests-analysis-4090efa5e3064a2e87f262d3c399a339
**Phase 1**

EE - PR for runs -https://github.com/appsmithorg/appsmith-ee/pull/4140
EE run -- for Git and AccessControl tags
https://github.com/appsmithorg/appsmith-ee/actions/runs/9002744046


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=""

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!CAUTION]  
> If you modify the content in this section, you are likely to disrupt
the CI result for your PR.

<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No
2024-05-10 15:34:40 +05:30
Trisha Anand
0a6e822bcf
Revert "test: PartialExport_Widgets_spec - updated exported json file to compare and added confirmation of successful import" (#33254)
Reverts appsmithorg/appsmith#33090
2024-05-08 10:31:48 +05:30
NandanAnantharamu
87d535ac23
test: PartialExport_Widgets_spec - updated exported json file to compare and added confirmation of successful import (#33090)
RCA:
Test was failing at comparison step where we export and compare
 
Solution:
Updated the WidgetsExportedOnly.json, now the comparison step is working
as expected
Improved the assertions within importApp() reduced wait time and also
removed the Toast message verification


/ok-to-test tags="@tag.Workspace,@tag.ImportExport"

<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8941790028>
> Commit: 23535e879fde6b8d3018e6bcd762a85df18fea9c
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8941790028&attempt=1"
target="_blank">Click here!</a>

<!-- end of auto-generated comment: Cypress test results  -->
2024-05-07 11:23:16 +05:30
Shrikant Sharat Kandula
cd22fc1087
test: Some cleanup for Git Cypress tests (#32836)
1. Change usage of ports bound to 3000, 5000 and 8000 to 4200, which
will be the canonical port for TED in the future.
2. Switch to using TED's native git repo management APIs, instead of the
Gitea compatibility layer.
3. Remove code from GitHub ages.


/ok-to-test tags="@tag.Sanity, @tag.Git"<!-- This is an auto-generated
comment: Cypress test results -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8785291879>
> Commit: b38f4eb388716f7fcfc2a032d788c2ebb951568b
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8785291879&attempt=2"
target="_blank">Click here!</a>

<!-- end of auto-generated comment: Cypress test results  -->





<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Refactor**
- Enhanced Git integration by shifting from GitHub to Gitea for
repository operations in test environments.
- Updated URLs and endpoints across various test scripts and data
fixtures to align with new configurations.
- **Tests**
- Modified test scenarios to reflect changes in Git operations and URL
configurations.
- **Chores**
- Updated CI workflows by replacing old secrets with new ones for better
configuration management.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-23 10:01:14 +05:30
Rudraprasad Das
5c74768afc
chore: remove git release feature flags (#30962)
## Description
Removes git related feature flags
- `release_git_connct_v2_enabled`
- `release_git_status_lite_enabled`

#### PR fixes following issue(s)
Fixes #30961

#### Media

#### Type of change
- Chore (housekeeping or task changes that don't impact user perception)
>
>
>
## 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
- [ ] Manual
- [ ] JUnit
- [ ] 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
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] 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:
- [ ] [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
- [ ] 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


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Enhanced Git synchronization features including better handling of
workspace creation, DSL additions, and branch protection settings.
- **Refactor**
- Updated Git connection methods and deployment processes for improved
efficiency and reliability.
- Introduced new variables and methods for more precise control over Git
settings and operations.
- **Tests**
- Added and refactored Cypress end-to-end tests to validate new Git
functionalities and synchronization processes.
- **Style**
- Updated components to include `data-testId` attributes for improved
testability.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-02-09 10:22:47 +05:30
Aishwarya-U-R
67d20d9858
test: Cypress | Helpers improved + Flaky fixes (#30735)
## Description
- This PR fixes the RenameApplication flakyness in CI with added dynamic
check
- Also replacing js cy.renameApp to TS helper 
- Flaky fixes -
cypress/e2e/Regression/ClientSide/Workspace/MemberRoles_Spec.ts (entire
spec updates for EnableGAC, removed signout from 'it' blocks)
- cypress/e2e/Regression/ClientSide/Workspace/ShareAppTests_Spec.ts (7th
flaky fixed)
-
cypress/e2e/Regression/ClientSide/SetProperty/WidgetPropertySetters2_spec.ts
(5th test)
-
cypress/e2e/Regression/ClientSide/Templates/Fork_Template_Existing_app_spec.js
(2nd - added validation to match the test description, 1st & 3rd -
removed static waits, Added multiple dynamic checks)
-
cypress/e2e/Regression/ClientSide/OtherUIFeatures/ApplicationURL_spec.js
(3rd & 4th flaky tests)
- homePage.AssertViewPageLoad() created
- homePage.LaunchAppFromAppHover() improved
- homePage.Signout() - added dynamic checks
- Added more validation to homePage.Signup() method with Dynamic checks
- homePage.LeaveWorkspace() removed redundant SelectWorkspace call
- admingSettings.EnableGAC() - added dynamic checks
- featureFlagIntercept - removed static sleep, reload check improved
- agHelper.VisitNAssert() - removed static sleep
- homePage.OpenMembersPageForWorkspace() - removed sleep, added dynamic
checks

#### Type of change
- Script fix (non-breaking change which fixes an issue)

## Testing
#### How Has This Been Tested?
- [X] Cypress CI runs

## Checklist:
#### QA activity:
- [X] Added `Test Plan Approved` label after Cypress tests were reviewed

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Summary by CodeRabbit

- **Refactor**
- Enhanced Cypress test commands across multiple test suites for
improved efficiency and readability.
- Refactored conditional checks and method invocations for better test
scenario handling.
- **Tests**
- Updated testing approaches for application deployment, workspace
management, and error handling.
- Introduced new assertions for UI visibility and functional behavior in
automated tests.
- **Chores**
- Optimized GitHub Actions workflow by adjusting the matrix count for
build processes.
- Added new test specs for limited tests in the client-side regression
suite.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-02-01 16:42:53 +05:30
albinAppsmith
9bbf13debe
feat: enabled editor pane sidebar (#29882)
## Description

This PR fixes the cypress failures introduced after editor pane

#### PR fixes following issue(s)
Fixes https://github.com/appsmithorg/appsmith/issues/29881

#### 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
- [ ] Manual
- [ ] JUnit
- [ ] 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
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] 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:
- [ ] [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
- [ ] 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: Hetu Nandu <hetunandu@gmail.com>
2024-01-12 20:13:58 +05:30
Aishwarya-U-R
39ebef39a5
test: Cypress | Replace static with Dynamic checks (#29664)
## Description
- This PR removed static wait from spec - API_with_List_Widget_spec
- Git/GitSync/GitSyncedApps_spec.js (fixes for EE flakyness - WIP -
still failing in chrome, pass in electron)
- Remove wait from OpenPaneAndChangeThemeColors() & added n/w check
- Upgrading Cypress from 13.3 to 13.6
- Flaky fix:
      - ClientSide/Widgets/Text/Text2_Spec.ts
      - ClientSide/Widgets/Select/Select2_Spec.ts
      - cypress/e2e/Regression/ClientSide/JSLibrary/Library_spec.ts
      - /ClientSide/Git/GitWithJSLibrary/GitwithCustomJSLibrary_spec.js

#### Type of change
- Script fix (non-breaking change which fixes an issue)

## Testing

#### How Has This Been Tested?
- [X] Cypress CI runs

## Checklist:
#### QA activity:
- [X] Added `Test Plan Approved` label after Cypress tests were reviewed

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Summary by CodeRabbit

- **New Features**
- Enhanced Git synchronization capabilities with improved user interface
interactions.
  - Streamlined navigation back to the editor from deployment mode.
- Implemented more robust table loading checks to ensure data is
properly displayed.

- **Bug Fixes**
- Fixed issues with element presence assertions to improve test
reliability.
- Addressed the visibility of certain UI elements to ensure they appear
as expected.

- **Tests**
- Updated end-to-end test scripts to reflect new interactions and
assertions.
- Added a new test file `GitSyncedApps_spec.js` to cover Git-synced
applications.
  - Removed outdated test file `Fork_Template_spec.js`.

- **Refactor**
- Improved method calls for querying and interacting with elements to
enhance test stability.
- Optimized wait conditions for element visibility to reduce flakiness
in tests.

- **Chores**
- Adjusted the GitHub Actions workflow for client-server build to refine
output for matrix counts.
- Updated CI test workflow to incorporate Electron setup and remove
Chrome setup steps.

- **Documentation**
- Included comments to explain the rationale behind certain timeout
values and method changes.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2023-12-22 17:20:05 +05:30
Hetu Nandu
54f6803671
chore: App Sidebar testing (#28479)
Updates the Cypress testing suite to handle the new app sidebar as a new
way to navigation

This change will enable the sidebar feature flag by default for all tests so that all new changes keep the sidebar in mind.

fixes: #28388

---------

Co-authored-by: albinAppsmith <87797149+albinAppsmith@users.noreply.github.com>
2023-11-15 08:01:12 +05:30
Aishwarya-U-R
e9a1f86e22
test: Cypress | CI Stablize + Other improvements (#28254)
## Description
**This PR does the below improvements:**
- Handles initial empty error toast- with cy.LogOut()
- Calling cy.LoginFromAPI() per need only - to improve execution time 
- Update agHelper.UpdateCodeInput()
- Added waitForNetworkCall for AsserHelper methods to only get api call
& validate
- Added gitSync.AuthorizeKeyToGitea() - to validate keyGenerate success
- Adding validationg for 'Unable to import application in workspace'
- cy.CreateNewAppInNewWorkspace() improved
- agHelper.RemoveUIElement() created to handle tooltip, toast,
evaluatedpopup & removed duplicates
- cy.merge() improved to call assertHelper
- assertHelper.AssertNetworkStatus() to handle both array & individual
status checks & return actual responseCode
- createBranch & generatedKey intercepts added to git operation
validations
- homePage.AssertApplication() created
- Removed cy.Logout() & Login improved - brings down total run time to
less than 1 hr from 1+ hrs
- entityExplorer.NavigateToSwitcher() improved to check status
- dataSources.ValidateDSDeletion() improved to handle one of array toast
for array value also
- assertHelper.WaitForNetworkCall() improved to wait & return latest
request
- Private methods processNetworkStatus() & processNetworkResponseData()
created
  
**Also flaky fixes below:**
- ServerSide/QueryPane/S3_2_spec.ts - Adding sleep for CI flaky
behaviour
- Trial fix for
cypress/e2e/Regression/ClientSide/OtherUIFeatures/PageOnLoad_spec.ts
- GitWithJSLibrary/GitwithCustomJSLibrary_spec.js - Handling Import
failure at various points in the flow
- ExplorerTests/Widgets_Copy_Paste_Delete_Undo_Keyboard_Event_spec.js
   - ClientSide/JSLibrary/Library_spec.ts - asserting success import
   - /OtherUIFeatures/ApplicationURL_spec.js - using cy.url()
   - /ClientSide/Templates/Fork_Template_spec.js
- ServerSide/Postgres_DataTypes/Binary_Spec.ts &
/Postgres_DataTypes/Json_Spec.ts - Adding sleep for CI flaky behaviour
   - ClientSide/Widgets/List/List4_2_spec.js
   - /Git/ExistingApps/v1.9.24/DSCrudAndBindings_Spec.ts

#### Type of change
- Script fix (non-breaking change which fixes an issue)

## Testing

#### How Has This Been Tested?
- [X] Cypress CI runs

## Checklist:
#### QA activity:
- [X] Added `Test Plan Approved` label after Cypress tests were reviewed
2023-10-25 19:33:07 +05:30
Aishwarya-U-R
a0db49d1f4
test: Cypress | (DI) Arango added validations + CI Stabilize (#26243)
## Description
- This PR does the below:
- EnterJsContext to use ToggleJSMode
- Adding limited-tests.txt to gitignore
- Added S3, Arango Documentation verify
- Added Arango Widget binding + validation to Insert data
- Upgraded Cypress from 12.17.2 to 12.17.4
- Update Arango spec to read DS values from TestConfig.ts file instead
of dataSources.json
- Arango Suggested widget + Schema search
- Flaky fix - Regression/ServerSide/QueryPane/DSDocs_Spec.ts
- Flaky fix - GenerateCRUD/Postgres1_Spec.ts - improving
NavigateBacktoEditor() method to tackle all Deploy to Edit mode
navigations (to monitor)
- Viewport updated for sharper screenshots/videos
- Improve waitForServerRestart js support method (+ server restart
timeout increased)
- Fix Binding/API_with_List_Widget_spec.js - 3rd case
- Widgets/WidgetPropertySetters_spec.ts - updated
- Flaky fix - ServerSide/QueryPane/S3_1_spec.js - 1st case
- Binding/Promises_1_Spec.ts
- ClientSide/BugTests/ApiBugs_Spec.ts
- Update TedTestConfig to DataManager since out of TED datasources are
also present in this file like Arango, Elastic Mssql etc
- Improved AssertPropertiesDropDownCurrentValue()

#### Type of change
- Script fix & New scripts (non-breaking change which fixes an issue)
## Testing
>
#### How Has This Been Tested?
- [X] Cypress CI runs
>
>

## Checklist:
#### QA activity:
- [X] Added `Test Plan Approved` label after changes are reviewed
2023-08-18 10:48:35 +05:30
Aishwarya-U-R
af415f4f30
test: Cypress | Automated tests for MySQL + Flaky fixes (#25867)
## Description
- This PR fixes the below flaky fixes
- GitSyncedApps_spec.js
- Improves coverage for MySQl - adding suggested widget binding
- TableV2/Date_column_editing_1_spec.ts fix
- WaitUntilEleAppear improved
- DeployApp() updated
- QueryPane/Mongo_Spec.js - adding wait time
- AssertIfPropertyIsNotVisible() replaced
- fat-migration.yml deleted
- cypress-real-events - update
- /Filepicker/FilePicker2_spec.js
- /Autocomplete/Autocomplete_setters_spec.ts

#### Type of change
- Script fix (non-breaking change which fixes an issue)

## Testing
>
#### How Has This Been Tested?
- [X] Cypress CI runs

## Checklist:
#### QA activity:
- [X] Added `Test Plan Approved` label after Cypress tests were reviewed
2023-08-01 15:04:15 +05:30
Aishwarya-U-R
a8eef88e6c
test: Cypress | Flaky Fixes (#25217)
## Description
- This PR fixes below specs:
- /ListV2/Listv2_dataIdentifierProperty_spec.js
- Improves validations in /Autocomplete/JS_AC2_spec.ts
- Moving all mockApi call to TEDTestConfigs
- Datasources/Airtable_Basic_Spec.ts
- ListV2/Listv2_onItemClick_spec.js
- FirstTimeUserOnboarding_spec.js - 5th - flaky fix
- /Binding/Widgets_Default_data_validation_spec.js
- AssertDocumentReady() improved - added timeout to check page load
- TableV2/TableV2_Widget_Add_button_spec.js
- Binding/ButtonWidgets_NavigateTo_validation_spec.js
- UpdatePropertyFieldValue() improved - added intercept validation

#### Type of change
- Script fix (non-breaking change which fixes an issue)

## Testing
>
#### How Has This Been Tested?
- [X] Cypress CI runs
- 
## Checklist:
#### QA activity:
- [X] Added `Test Plan Approved` label after changes were reviewed
2023-07-11 10:44:13 +05:30
Anagh Hegde
7c65e35ee8
fix: rebase error message during conflicts (#24414)
## Description
Updated the error message for rebase during the conflicts state

Fixes https://github.com/appsmithorg/appsmith/issues/24391


#### Type of change
> Please delete options that are not relevant.
- Bug fix (non-breaking change which fixes an issue)
- New feature (non-breaking change which adds functionality)
- Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- Chore (housekeeping or task changes that don't impact user perception)
- This change requires a documentation update


## Testing
- [ ] Manual
- [ ] Jest
- [ ] Cypress

#### Test Plan
#### Issues raised during DP testing
## Checklist:
#### Dev activity
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] 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:
- [ ] [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
- [ ] 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: Parthvi <80334441+Parthvi12@users.noreply.github.com>
2023-06-17 14:25:16 +05:30
Aishwarya-U-R
d7b2bad974
test: Cypress | Cy 12 upgrade + Flaky fixes (#23852)
## Description
- This PR upgrades cypress from 11.2 to 12.13.0 which fixes the random
browser crash issue in CI runs
 - ValidateNetworkStatus() updates to validate the n/w responses
 - cy.route() to cy.intercept()
 - Converting dataSources.json to HostPort.ts
 - Api responses read - updating to right Cy12 supported format
- js inconsistent testJsontext to TS `EnterJSContext` in few failing
specs
 - CI - higher resolution trials
- Improves _.agHelper.RefreshPage() - fixing Error: Socket closed before
finished writing response
 - AssertDocumentReady() created
 - within(()) & .children() - handled for Cy12
- Improved DeployApp(), NavigateBacktoEditor(), RefreshPage(), AddDsl()
methods
- js inconsistent goToEditFromPublish to TS `NavigateBacktoEditor` in
all specs
- js inconsistent PublishtheApp to TS `_.agHelper.DeployApp` in all
specs
- Convert /DynamicHeight/Text_Widget_spec.js to TS with all supporting
TS helpers
 - ToggleJSMode()
 - COMMIT_INFO_MESSAGE improved
 - Remove tooltip on the Application Name after rename
- js inconsistent cy.addDsl(dsl); to TS helper `_.agHelper.AddDsl(val);`
 - ++++ Much more improvements....

#### Type of change
- Script fixes

## Testing
#### How Has This Been Tested?
- [X] Cypress

## Checklist:
#### QA activity:
- [X] Added `Test Plan Approved` label after Cypress tests were reviewed

---------

Co-authored-by: Vijetha-Kaja <vijetha@appsmith.com>
2023-06-15 18:51:11 +05:30
Anagh Hegde
2f4c52cb5e
chore: revert git rebase with discard (#24479)
Due to one of the corrupted app state in release, we are going to revert
this and retest it and release later.

https://theappsmith.slack.com/archives/CTHN8GX5Y/p1686637493386649
2023-06-15 13:15:55 +05:30
Anagh Hegde
56d91190d6
feat: refactor git discrad flow (#23988)
## Description
Added the git rebase to the discard flow. This is to avoid the push
failure when due to branch protection rules.
Prev, it was discard and pull. This flow had above mentioned issue where
if the branch protection rule was present, then the local branch would
be in a bad state.

#### PR fixes following issue(s)
Fixes https://github.com/appsmithorg/appsmith/issues/23989

#### Type of change
- New feature (non-breaking change which adds functionality)

#### How Has This Been Tested?
- [ ] Manual

#### 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
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] 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:
- [ ] [Speedbreak
features](https://github.com/appsmithorg/TestSmith/wiki/Test-plan-implementation#speedbreaker-features-to-consider-for-every-change)
have been covered
- [ ] Test plan covers all impacted features and [areas of
interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans/_edit#areas-of-interest)
- [ ] Test plan has been peer reviewed by project stakeholders and other
QA members
- [ ] 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: brayn003 <rudra@appsmith.com>
Co-authored-by: Parthvi Goswami <parthvigoswami@Parthvis-MacBook-Pro.local>
2023-06-09 10:58:50 +05:30
albinAppsmith
629999f124
feat: [epic] appsmith design system version 2 deduplication (#22030)
## Description

### Fixes
- [x] https://github.com/appsmithorg/appsmith/issues/19383
- [x] https://github.com/appsmithorg/appsmith/issues/19384
- [x] https://github.com/appsmithorg/appsmith/issues/19385
- [x] https://github.com/appsmithorg/appsmith/issues/19386
- [x] https://github.com/appsmithorg/appsmith/issues/19387
- [x] https://github.com/appsmithorg/appsmith/issues/19388
- [x] https://github.com/appsmithorg/appsmith/issues/19389
- [x] https://github.com/appsmithorg/appsmith/issues/19390
- [x] https://github.com/appsmithorg/appsmith/issues/19391
- [x] https://github.com/appsmithorg/appsmith/issues/19392
- [x] https://github.com/appsmithorg/appsmith/issues/19393
- [x] https://github.com/appsmithorg/appsmith/issues/19394
- [x] https://github.com/appsmithorg/appsmith/issues/19395
- [x] https://github.com/appsmithorg/appsmith/issues/19396
- [x] https://github.com/appsmithorg/appsmith/issues/19397
- [x] https://github.com/appsmithorg/appsmith/issues/19398
- [x] https://github.com/appsmithorg/appsmith/issues/19399
- [x] https://github.com/appsmithorg/appsmith/issues/19400
- [x] https://github.com/appsmithorg/appsmith/issues/19401
- [x] https://github.com/appsmithorg/appsmith/issues/19402
- [x] https://github.com/appsmithorg/appsmith/issues/19403
- [x] https://github.com/appsmithorg/appsmith/issues/19404
- [x] https://github.com/appsmithorg/appsmith/issues/19405
- [x] https://github.com/appsmithorg/appsmith/issues/19406
- [x] https://github.com/appsmithorg/appsmith/issues/19407
- [x] https://github.com/appsmithorg/appsmith/issues/19408
- [x] https://github.com/appsmithorg/appsmith/issues/19409

Fixes # (issue)
> 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

> Please delete options that are not relevant.

- Bug fix (non-breaking change which fixes an issue)
- New feature (non-breaking change which adds functionality)
- Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- Chore (housekeeping or task changes that don't impact user perception)
- This change requires a documentation update


## How Has This Been Tested?
> Please describe the tests that you ran to verify your changes. Provide
instructions, so we can reproduce.
> Please also list any relevant details for your test configuration.
> Delete anything that is not important

- Manual
- 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
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] 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:
- [ ] Test plan has been approved by relevant developers
- [ ] Test plan has been peer reviewed by QA
- [ ] Cypress test cases have been added and approved by either SDET or
manual QA
- [ ] Organized project review call with relevant stakeholders after
Round 1/2 of QA
- [ ] Added Test Plan Approved label after reveiwing all Cypress test

---------

Co-authored-by: Ankita Kinger <ankita@appsmith.com>
Co-authored-by: akash-codemonk <67054171+akash-codemonk@users.noreply.github.com>
Co-authored-by: Tanvi Bhakta <tanvi@appsmith.com>
Co-authored-by: Arsalan <arsalanyaldram0211@outlook.com>
Co-authored-by: Aman Agarwal <aman@appsmith.com>
Co-authored-by: Rohit Agarwal <rohit_agarwal@live.in>
Co-authored-by: Nilesh Sarupriya <nilesh@appsmith.com>
Co-authored-by: Nilesh Sarupriya <20905988+nsarupr@users.noreply.github.com>
Co-authored-by: Tanvi Bhakta <tanvibhakta@gmail.com>
Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
Co-authored-by: Parthvi Goswami <parthvigoswami@Parthvis-MacBook-Pro.local>
Co-authored-by: Vijetha-Kaja <vijetha@appsmith.com>
Co-authored-by: Parthvi <80334441+Parthvi12@users.noreply.github.com>
Co-authored-by: Apple <nandan@thinkify.io>
Co-authored-by: Saroj <43822041+sarojsarab@users.noreply.github.com>
Co-authored-by: Sangeeth Sivan <74818788+berzerkeer@users.noreply.github.com>
Co-authored-by: Ashok Kumar M <35134347+marks0351@users.noreply.github.com>
Co-authored-by: Aishwarya-U-R <91450662+Aishwarya-U-R@users.noreply.github.com>
Co-authored-by: rahulramesha <rahul@appsmith.com>
Co-authored-by: Aswath K <aswath.sana@gmail.com>
Co-authored-by: Preet Sidhu <preetsidhu.bits@gmail.com>
Co-authored-by: Vijetha-Kaja <119562824+Vijetha-Kaja@users.noreply.github.com>
Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
2023-05-20 00:07:06 +05:30
Ivan Akulov
424d2f6965
chore: upgrade to prettier v2 + enforce import types (#21013)Co-authored-by: Satish Gandham <hello@satishgandham.com> Co-authored-by: Satish Gandham <satish.iitg@gmail.com>
## Description

This PR upgrades Prettier to v2 + enforces TypeScript’s [`import
type`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html#type-only-imports-and-export)
syntax where applicable. It’s submitted as a separate PR so we can merge
it easily.

As a part of this PR, we reformat the codebase heavily:
- add `import type` everywhere where it’s required, and
- re-format the code to account for Prettier 2’s breaking changes:
https://prettier.io/blog/2020/03/21/2.0.0.html#breaking-changes

This PR is submitted against `release` to make sure all new code by team
members will adhere to new formatting standards, and we’ll have fewer
conflicts when merging `bundle-optimizations` into `release`. (I’ll
merge `release` back into `bundle-optimizations` once this PR is
merged.)

### Why is this needed?

This PR is needed because, for the Lodash optimization from
7cbb12af88,
we need to use `import type`. Otherwise, `babel-plugin-lodash` complains
that `LoDashStatic` is not a lodash function.

However, just using `import type` in the current codebase will give you
this:

<img width="962" alt="Screenshot 2023-03-08 at 17 45 59"
src="https://user-images.githubusercontent.com/2953267/223775744-407afa0c-e8b9-44a1-90f9-b879348da57f.png">

That’s because Prettier 1 can’t parse `import type` at all. To parse it,
we need to upgrade to Prettier 2.

### Why enforce `import type`?

Apart from just enabling `import type` support, this PR enforces
specifying `import type` everywhere it’s needed. (Developers will get
immediate TypeScript and ESLint errors when they forget to do so.)

I’m doing this because I believe `import type` improves DX and makes
refactorings easier.

Let’s say you had a few imports like below. Can you tell which of these
imports will increase the bundle size? (Tip: it’s not all of them!)

```ts
// app/client/src/workers/Linting/utils.ts
import { Position } from "codemirror";
import { LintError as JSHintError, LintOptions } from "jshint";
import { get, isEmpty, isNumber, keys, last, set } from "lodash";
```

It’s pretty hard, right?

What about now?

```ts
// app/client/src/workers/Linting/utils.ts
import type { Position } from "codemirror";
import type { LintError as JSHintError, LintOptions } from "jshint";
import { get, isEmpty, isNumber, keys, last, set } from "lodash";
```

Now, it’s clear that only `lodash` will be bundled.

This helps developers to see which imports are problematic, but it
_also_ helps with refactorings. Now, if you want to see where
`codemirror` is bundled, you can just grep for `import \{.*\} from
"codemirror"` – and you won’t get any type-only imports.

This also helps (some) bundlers. Upon transpiling, TypeScript erases
type-only imports completely. In some environment (not ours), this makes
the bundle smaller, as the bundler doesn’t need to bundle type-only
imports anymore.

## Type of change

- Chore (housekeeping or task changes that don't impact user perception)


## How Has This Been Tested?

This was tested to not break the build.

### 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
- [ ] I have performed a self-review of my own code
- [ ] 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
- [ ] 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:
- [ ] Test plan has been approved by relevant developers
- [ ] Test plan has been peer reviewed by QA
- [ ] Cypress test cases have been added and approved by either SDET or
manual QA
- [ ] Organized project review call with relevant stakeholders after
Round 1/2 of QA
- [ ] Added Test Plan Approved label after reveiwing all Cypress test

---------

Co-authored-by: Satish Gandham <hello@satishgandham.com>
Co-authored-by: Satish Gandham <satish.iitg@gmail.com>
2023-03-16 17:11:47 +05:30
Aishwarya-U-R
72f627932a
test: Script updates for flaky tests (#20846)
## Description

- This PR fixes the flakes from below specs:
- Binding/SmartSubstitutionWidgets_spec.js
- /Git/GitDiscardChange/DiscardChanges_spec.js
- /Widgets/Chart/Custom_Chart_spec.js
- /Checkbox/CheckboxGroup_withQuery_spec.js
- Workspace/MemberRoles_Spec.ts

## Type of change

- Script updates


## How Has This Been Tested?
- Cypress CI runs

## Checklist:
### QA activity:
- [x] Added Test Plan Approved label after reviewing all changes
2023-02-22 11:31:25 +05:30
Aishwarya-U-R
970e4b16a4
test: Cypress migration to TED GITEA (#18799)
## Description

- This PR includes tests for migrating to Local GITEA for running
cypress tests so we dont run into timeout issues in Git tests

## Type of change

- New Script + Script fixes

## How Has This Been Tested?
- Cypress on CI

## Checklist:
### QA activity:
- [X] Test plan has been approved by relevant developers
- [X] Test plan has been peer reviewed by QA
- [X] Cypress test cases have been added and approved by either SDET or
manual QA
- [X] Organized project review call with relevant stakeholders after
Round 1/2 of QA
- [X] Added Test Plan Approved label after reveiwing all Cypress test
2023-02-15 01:12:45 +05:30
Anagh Hegde
34822d563a
fix: Add file system locks after the git operation (#12174)
## Description

> Add file locking using redis with retry. Helpful when multiple users
are trying to perform git actions in the Appsmith UI.

Fixes #10856 
Fixes #14366

## Type of change


- Bug fix (non-breaking change which fixes an issue)

## How Has This Been Tested?

- Test A
- Test B

## Checklist:

- [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
- [ ] My changes generate no new warnings
- [ ] 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

---------

Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
Co-authored-by: Sidhant Goel <sidhant@appsmith.com>
Co-authored-by: Parthvi Goswami <parthvigoswami@Parthvis-MacBook-Pro.local>
Co-authored-by: System Administrator <root@Parthvis-MacBook-Pro.local>
2023-02-14 20:58:25 +05:30
Vijetha-Kaja
a2afc8c4d9
test: Cypress Flaky fixes + Mock api update + PgAdminspec fix (#20032)
## Description

- Fixed PgAdminspec 

**Fixed below flaky tests**
- PgAdmin_spec.ts
- CreateNewApp_spec.js
- DatasourceSchema_spec.ts
- Tab_spec.js
- GitBugs_spec.js
- Fork_Template_Existing_app_spec.js
- Fork_Template_To_App_spec.js
- Fork_Template_spec.js
- Scrolling_Spec.ts
- APIOnLoad_Spec.ts
- SetTimeout_spec.ts

**Updated git helper methods**
- MongoDBShoppingCart_spec.js
- GitImport_spec.js
- Deploy_spec.js
- DisconnectGit_spec.js
- GitBugs_spec.js
- RepoLimitExceededErrorModal_spec.js
- ForkTemplateToGitConnectedApp.js

**Modified mock api url and refactored below specs accordingly**
- PromisesApp_spec.js
- Autocomplete_JS_spec.ts
- Bug16377_spec.ts
- InputTruncateCheck_Spec.ts
- Refactoring_spec.ts
- FilePickerV2_spec.js
- CurlImportFlow_spec.js
- SetTimeout_spec.ts

## Type of change

- Flaky test fix

## How Has This Been Tested?
- Cypress test runs

## Checklist:
### QA activity:
- [ ] Test plan has been approved by relevant developers
- [ ] Test plan has been peer reviewed by QA
- [ ] Cypress test cases have been added and approved by either SDET or
manual QA
- [ ] Organized project review call with relevant stakeholders after
Round 1/2 of QA
- [ ] Added Test Plan Approved label after reveiwing all Cypress test

---------

Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
2023-02-02 13:29:24 +05:30
Aishwarya-U-R
0b28b754b0
test: Moving specs to run on FatContainer + Gitea migration (#18920)
## Description

- This PR moves all specs from slim to fat container to run tests underneath it
- Fat has the actual libraries that are being shipping to customers, hence this PR
- Also includes moving Git tests from using GitHub to Gitea

## Type of change
- New run (non-breaking change which adds functionality)


## How Has This Been Tested?
- Cypress CI Fat runs

## Checklist:
### QA activity:
- [X] Test plan has been approved by relevant developers
- [X] Test plan has been peer reviewed by QA
- [X] Cypress test cases have been added and approved by either SDET or manual QA
- [X] Organized project review call with relevant stakeholders after Round 1/2 of QA
- [X] Added Test Plan Approved label after reveiwing all Cypress test

Co-authored-by: yatinappsmith <84702014+yatinappsmith@users.noreply.github.com>
2023-01-25 11:09:02 +05:30
Aishwarya-U-R
70f6cd1ab8
test: Automated tests for Bug18376 + few flaky fixes (#18769)
* ApiOnload spec fix

* Bug 18376 script added

* Bug 18376 script fix

* ValidateURL() added

* OnLoadTests/APIOnLoad_Spec.ts fix

* Moved Bug 16248 script

* JSOnload trial fix

* JsonLoad fix -disbaling not working hnce commented

* Skipping GitImport (merge issue-open bug 18776)

* Git imPort trial fix

* PassingParams spec update

* APIPage.ts wrong update corrected

* Removed added comments

* ApiPage.ts mistake corrected!
2022-12-09 10:36:52 +05:30
Parthvi
ee8259d311
test: Fix flaky git tests (#16675)
* fix flaky git tests

* undo skip for git import tests
2022-09-12 08:59:06 +05:30
Parthvi
ed90490005
test: fix git cypress tests (#15508)
* fix git tests

* add wait for git status call to complete

* fix git tests

Co-authored-by: Parthvi Goswami <parthvigoswami@Parthvis-MacBook-Pro.local>
2022-07-29 08:33:32 +05:30
f0c1s
58dac0213c
Regenerate SSH key in connect and import flow (#14383)
As of today, we were supporting only ECDSA keys for GitHub, GitLab, and BitBucket. For Azure, RSA key generation was not available. This PR allows users to generate RSA or ECDSA keys.

As of now we support following key types and version control service providers:

    Github: ECDSA
    Gitlab: RSA, ECDSA
    Bitbucket: RSA, ECDSA
    Azure: RSA

Fixes #14382, #14715, #14570
2022-07-20 12:30:11 +05:30
f0c1s
6eaabc3a7b
fix: reload default page on discard (#14964) 2022-07-20 11:40:06 +05:30
Parthvi
af2e55ef31
test: Add tests for bugs and fix flaky cypress tests (#15115)
* Fix flaky tests 

* fix discardChanges_Spec

* comment the intercept in merge method

* add test for bug#15175

* add test for bug

* fix git tests
2022-07-15 11:36:58 +05:30
Anagh Hegde
883d9d801e
chore: Refactor git api to include application id as request param instead of the path variable (#14800)
* Refactor git API's to add `/app` to the API path to identify the appId

* Update the url in cypress tests

* Update the path in git spec cypress files

* Update the url for connection spec
2022-07-07 12:35:03 +05:30
Parthvi12
cc3b10c9a6
test: Add visual tests for datasource page (#14811)
* add layout tests for datasource

* fix omnibar_spec

* add tests for postgres and mong

* fix git import test

* fix test

* comment test until issue is fixed

Co-authored-by: Parthvi Goswami <parthvigoswami@Parthvis-MacBook-Pro.local>
2022-07-01 09:01:02 +05:30
Vishnu Gp
63205dce27
Merge pull request #14184 from appsmithorg/feat/git-delete-only-removed-resources
Feat: Perform file ops only when the resource is updated
2022-06-22 10:53:45 +05:30
Parthvi12
38f14bb5ac
test: Add regenerate SSH key tests (#14325)
* Add regenerate SSH key tests

* fix flaky tests

* fix flaky tests

Co-authored-by: Parthvi Goswami <parthvigoswami@Parthvis-MacBook-Pro.local>
2022-06-08 13:07:00 +05:30
Aishwarya-U-R
04a8c3b037
Tests for JSObjects-onPageLoad (#13712)
Automated tests to improve coverage for JSObjects-onPageLoad
2022-05-18 16:09:42 +05:30
Parthvi12
32bcd94e54
Add tests for git discard changes (#13866) 2022-05-18 04:45:32 +00:00
Abhijeet
9fc9f7a774
chore: Commit application files during the connect flow (#12288)
* Commit application files during the connect flow

* Refactor detach remote method name

* updating connectToGitRepo method

* fix git tests

* Update default dsl to remove uncommitted changes for bottomRow and pathlist

* updating git cypress tests

* fixed git bug spec cypress test

* enabled other test case

* with store test

* fixed comment

* closing git sync modal

* updated test logic

Co-authored-by: Parthvi Goswami <parthvigoswami@Parthvis-MacBook-Pro.local>
Co-authored-by: Parthvi12 <80334441+Parthvi12@users.noreply.github.com>
Co-authored-by: haojin111 <haojin828@outlook.com>
2022-05-04 12:27:07 +05:30
Parthvi12
2f4ca6aa98
test: Add tests for git sync app and git bugs (#13394)
* Add tests for gitSync

* add test for git import bug#12749

* modified importAppfromGit method

* add test for bug #13385

* updated tests

* fixed test

Co-authored-by: Parthvi Goswami <parthvigoswami@Parthvis-MacBook-Pro.local>
2022-05-02 09:59:03 +05:30
Parthvi12
0766f83cf0
test: Add tests for git bugs and git import (#12751)
* add tests for git bugs and git import

* add dsl file

* added test for git bug and commented git sync test for apps

* updated tests

* removed wait

* updated messages.test.ts

* updated git import tests

* added fix for onboarding_spec
2022-04-14 08:32:57 +05:30
NandanAnantharamu
db2310bef7
test: Commands file organised (#12533)
* Commands file seggregated

* updated support file

* updated common method

* updated the support files

* Updated imports
2022-04-11 09:00:37 +05:30