Commit Graph

10 Commits

Author SHA1 Message Date
Aishwarya-U-R
fe3863eb65
test: Cypress | Replace static with Dynamic waits - Part 1 (#29405)
## Description
- Removed hard waits from below specs:
    - Apps/CurrencyInputIssue_Spec.js
    - ClientSide/Widgets/Modal/Modal_spec.ts (Fix & unskip)
    - /Binding/TableV2_Widget_API_Pagination_spec.js
- Unskip - ApiTests/API_Unique_name_spec.js
- Flaky fix - TableV2_Widget_API_Pagination_spec.js
- Flaky fix - /ServerSide/QueryPane/S3_1_spec.js
- Removed empty ReusableHelper.ts
- Improved agHelper.GetElement() to include the assertion for element
presence/absence
- Modified helpers/function calls to fit the above syntax of
GetElement()
- Improved WaitUntilEleAppear(), WaitUntilEleDisappear() to use timeout
from cypress config

#### 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

- **Tests**
- Enhanced end-to-end test stability by replacing static waits with
dynamic element-based synchronization.
  - Skipped certain test suites to streamline the testing process.
- Improved test assertions and control flow for more reliable
verification of UI components.

- **Chores**
  - Updated test helper methods to support new verification strategies.
- Cleaned up unnecessary imports and inheritance in test support
classes.

- **Documentation**
- Adjusted test case descriptions to reflect the new synchronization
methods used.

- **Bug Fixes**
- Fixed issues with test synchronization that could lead to flaky test
results.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2023-12-11 14:39:36 +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
4ffc5bb62a
test: Cypress | CI Stabilize + Other test improvements (#28172)
## Description
- **This PR flaky fixes below specs:**
    - GenerateCRUD/MySQL2_Spec.ts script fix
   - ServerSide/ApiTests/API_All_Verb_spec.js
   - Regression/Apps/PromisesApp_spec.js
   - TableV2_Property_ToggleJs_With_Binding_spec.js
   - GSheet cases failures due to EditApponHover method fix
- Radio/Radio2_spec.ts, using `GetHeight` instead of
`GetWidgetCSSHeight`
   - Select/Select3_Spec.ts
   - Widgets/Text/Text_new_feature_spec.js
   - Binding/API_with_List_Widget_spec.js
   - Workspace/LoginFromUIApp_spec.js - removed redundant code
   - QueryPane/DSDocs_Spec.ts
   - ServerSide/QueryPane/GoogleSheets_spec.ts
   - TableV2/Date_column_editing_1_spec.ts
- Git/ExistingApps/v1.9.24/DSCrudAndBindings_Spec.ts - script flow
corrected
   - ServerSide/QueryPane/Mongo_Spec.js
- **Added validation for form plugin response data, which addresses the
Empty toast issue**

- **Below specs are fixed for new appName localStorage changes:**
    - /SettingsPane/PageSettings_spec.ts
    - BugTests/Moment_Spec.ts
    - /Fork/ForkAppWithMultipleDS_Spec.ts
    - Fork/ForkApplicationWithinAppEditor_spec.ts
    - Fork/ForkApplication_spec.ts
    - /ClientSide/OtherUIFeatures/Analytics_spec.js
    - OtherUIFeatures/ApplicationURL_spec.js
    - OtherUIFeatures/ExportApplication_spec.js - Duplicate case removed
    - OtherUIFeatures/UpdateApplication_spec.js
    - VisualTests/JSEditorIndent_spec.js
    - Workspace/WorkspaceImportApplication_spec.js
 
- **Improvemnets:**
- deployMode.StubWindowNAssert() improved to validate `getPluginForm`
instead of `getWorkspace`
  - agHelper.AddDsl() improved, removed wait times
  - appSettings.CheckUrl() - appName url updated
  - assertHelper.AssertDocumentReady() -removed wait times
- assertHelper.AssertNetworkResponseData() - added for `getPluginForm`
validation for Page loads
  - deployMode.DeployApp() -removed wait times
- homePage.CreateNewWorkspace() - improved to set localStorage for
workspaceName, workspaceId & create new workspace without new name
- homePage.CreateNewApplication() - - improved to set localStorage for
appName
  - jsEditor.NavigateToNewJSEditor() - improved to remove tooltip
- cy.CreateAppInFirstListedWorkspace() - improved to set localStorage
for appName, removed waitTimes, Removed rename of every app for every
spec, calling AssertNetworkResponseData(getPluginForm)
  - cy.DeleteWorkspaceByApi() added
- e2e.js - removed guid generation for first app, added
cy.DeleteWorkspaceByApi() in after()
  
#### 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-20 07:45:47 +05:30
Aishwarya-U-R
178f8f16f5
test: Cypress | (DI) S3 added validations (Cont.,) + CI Stabilize (#26486)
## Description
**- This PR includes below:**
- NavigateBacktoEditor() improved
- Flaky fixed - ClientSide/EmbedSettings/EmbedSettings_spec.js- 1st test
- ServerSide/QueryPane/S3_1_spec.js - 1st test - handling added error
message
- Sanity/Datasources/Arango_Basic_Spec.ts - 3rd test - schema pop-up
handle
- ClientSide/FormLogin/EnableFormLogin_spec.js - server restart fix
- Moved AssertNetworkExecutionSuccess to AssertHelper
- GetNAssertContains() simplified
- Widgets/ListV2/DataIdentifierProperty_spec.ts - 7th case flaky fix
- /Widgets/Checkbox/CheckboxGroup2_spec.js - flaky fix
- BugTests/AllWidgets_Reset_Spec.ts - script improved
- /Widgets/Radio/Radio_spec.js - script improved
- AssertExistingCheckedState() improved to validate attribute & checked
state
- ClickButton() improved
- AssertElementEnabledDisabled() improved
- UpdateInput(), replaced with TypeText()
**- New scripting for:**
- S3 - Deploy mode validations added
- S3 - Edit File validation added from Deploy page
- S3 - Upon file upload, validating button changes
- S3 - Verify max number of files upload
- S3 - File name Prefix search & Delete improved
- S3_2_spec from js to ts helpers
- Tc # 2439 scripted

#### 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-21 13:19:28 +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
Aishwarya-U-R
8e868b3093
test: Cypress | Flaky fixes (#25087)
## Description
- This PR improves RefreshPage()
- Improves StubbingDeployPage()
- Fixes below flaky tests;
- Datasources/ElasticSearch_Basic_Spec.ts
- Datasources/MsSQL_Basic_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:
- [ ] Added `Test Plan Approved` label after changes were reviewed
2023-07-06 10:43:15 +05:30
Aishwarya-U-R
22dce834d1
test: Cypress | Flakyfix + New Scripts (#25085)
## Description
- This PR has below:
- improves StubWindowNAssert()
- Adds new test for Bug # 25004
- AssertNetworkStatus() fixed

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

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

## Checklist:
#### QA activity:
- [X] Added `Test Plan Approved` label after changes were reviewed
2023-07-05 02:08:31 +05:30
Aishwarya-U-R
b15087af65
test: Cypress | Flaky fixes (#25083)
## Description
- This PR adds new method - WaitForNetworkCall()
- Trail fix for flaky spec ClientSide/AppNavigation/TopStacked_spec.ts

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

## Checklist:
#### QA activity:
- [X] Added `Test Plan Approved` label after changes were reviewed
2023-07-05 00:59:22 +05:30
Aishwarya-U-R
959fdce6ac
test: Cypress | Flaky fixes (#24508)
## Description
- This PR improves the sign up method to work even if telemetry related
details are not asked at start
- Also alters the Commit message based on the repository/workflow or
push runs
 - Improves DragDropWidgetNVerify()
 - Fixes flaky TableV2/Inline_editing_spec.js spec with TS methods
 - Improved EditTableCell()
 - Skipping deleting apps during local runs for debugging purpose
 - Fixes PropertyPane_Search_spec.ts
- Fixed ever flaky AppNavigationWithMultiplePages_spec,
AppNavigationWithAutoLayout_spec

#### 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:
- [ ] Added `Test Plan Approved` label after changes were reviewed
2023-06-17 00:10:10 +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