Commit Graph

463 Commits

Author SHA1 Message Date
Aishwarya-U-R
084e28ab21
test: Cypress | Flaky fixes (#24581)
## Description
- This PR fixes the below flaky:
- ReconnectDatasource_spec.js
- ConversionAlgorithm_AutoLayout_Validation_BasicSpec.js
- Improves CreateApplication with intercept assert
- Changes all agHelper.AssertN.wStatus to assertHelper() method

#### 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-06-18 10:25:16 +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
Nilesh Sarupriya
0bbb8008b0
fix: move instance-name to tenant config; move update tenant config flow to CE (#24468)
## Description
> Move the Instance Name to Tenant Configuration.
> Move the updateTenantConfiguration API to CE

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

#### Type of change
- Chore (housekeeping or task changes that don't impact user perception)

## Testing
> Currently this has been tested manually. Need to add unit test for the
same.

#### 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: Nilesh Sarupriya <20905988+nsarupr@users.noreply.github.com>
Co-authored-by: Sangeeth Sivan <sangeeth@appsmith.com>
Co-authored-by: Ankita Kinger <ankita@appsmith.com>
2023-06-16 19:01:00 +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
arunvjn
eb51866dfb
fix: show callback button in action selector cards for chainable actions by default (#24071)
## Description
show callback button in action selector cards for chain-able actions by
default
- Removed touched state from ActionCard that tracks interaction on card.
- Added unit test to assert callback button render

#### Fixes #23857

#### Media
<img width="272" alt="Screenshot 2023-06-06 at 13 13 27"
src="https://github.com/appsmithorg/appsmith/assets/32433245/17a98382-988f-4a62-b15f-a026aebf45b0">

#### Type of change
- Bug fix (non-breaking change which fixes an issue)
>
>
## Testing
>
#### How Has This Been Tested?
- [x] Manual
- [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
- [ ] 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
- [x] 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
2023-06-09 14:55:52 +05:30
Tanvi Bhakta
eeaf4ec044
fix: casing changes (#23515)
Fixes: 
https://github.com/appsmithorg/appsmith/issues/24202

#### 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
- [ ] 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/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
2023-06-09 14:22:27 +05:30
Rahul Barwal
756d1083ec
feat: Adds support for showing navbar in embedded view. (#23725)
## Description

- Adds support for query param navbar. We will show navbar and user
settings in the embedded view based on this.
- Made sure that user profile settings are not visiblie in embedded view
when navbar=true
- Adds logic to let user decide Template iframe URL. Till now, we forced
`embed=true` flag, moving forward we let this on user(devrel's)
descretion.
- Adds correct url for embed settings tab.

- Adds relevant tests for both embed settings and appview.

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

#### Media

| App normal preview | ?embed=true | ?embed=true&navbar=true |
|----------|:-------------:|------:|
| ![Screenshot 2023-05-26 at 3 08 16
PM](https://github.com/appsmithorg/appsmith/assets/6761673/019bbefd-719f-4f18-9373-77abac789fa2)
| ![Screenshot 2023-05-26 at 3 08 39
PM](https://github.com/appsmithorg/appsmith/assets/6761673/292035ec-5a2c-4139-ae86-119a872bae58)
| ![Screenshot 2023-05-26 at 3 08 59
PM](https://github.com/appsmithorg/appsmith/assets/6761673/a0a7fb8d-0f9f-42a7-b909-272e5ac310ad)
|

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

## Testing
- [ ] 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
- [x] 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
2023-06-05 19:37:39 +05:30
Dipyaman Biswas
ba0cedc052
fix: split button into 2 button components to fix issue in firefox. (#23900)
## Description

Split button into 2 button components to fix issue in firefox.
Slack Thread:
https://theappsmith.slack.com/archives/CGBPVEJ5C/p1685460441276709

#### PR fixes following issue(s)
Fixes #23902
#### 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
- [ ] Jest
- [x] 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/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
2023-05-31 14:43:25 +05:30
akash-codemonk
5fbdb11ef4
chore: update test to match ee code (#23860) 2023-05-30 15:18:45 +05:30
akash-codemonk
198084f93a
chore: fix flaky login cypress test (#23695) 2023-05-30 12:02:07 +05:30
Dipyaman Biswas
4cf655db21
ci: add failure cases for airgapped superuser creation cypress check (#23778)
## Description
Fix Airgapped cypress tests failing due to superuser expecting
anonymousdata and newsletter to be true.


#### 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
- [ ] Jest
- [x] 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/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
2023-05-26 22:56:52 +05:30
Dipyaman Biswas
94f5744800
feat: onboarding flow revamp for first time admin users: ce (#23581)
Onboarding flow revamp for first time admin users.
Uses the new ADS2.0 Components.
Shows telemetry popup.

zeplin:
https://app.zeplin.io/project/642f9f61af65ec6928659130/screen/64476316d729f744cb695232

#### PR fixes following issue(s)
Fixes #https://github.com/appsmithorg/cloud-services/issues/673

#### Type of change
> Please delete options that are not relevant.
- Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- This change requires a documentation update
>
>
>
## 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
- [ ] Jest
- [x] Cypress
>
>
#### Test Plan
> 
> https://github.com/appsmithorg/TestSmith/issues/2401
>
#### 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
- [ ] 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
2023-05-25 23:51:56 +05:30
Ankita Kinger
2ec6610399
chore: Updating locators for EE tests (#23563)
## Description

Updating locators for EE tests

#### PR fixes following issue(s)
Fixes # (issue number)
> 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
>
>
>
## 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
- [ ] 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/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
2023-05-20 06:19:33 +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
Rajat Agrawal
e6c9a4d0aa
chore: Refactor RapidMode and add optimization if a test uses DSL (#23338)
Fixes #23264
2023-05-18 15:38:38 +05:30
Sangeeth Sivan
bc5a23e8cd
feat: ci changes & cypress tests with cypress tags (#22989)
## Description

This includes

> Building a new image for airgapped instances
> Running ci-tests on airgapped image
> Running cypress tests selectively ignoring non supported features for
airgap like Templates, Custom JS lib and also alternating test
behaviours for some tests like tests using mock db, since it doesn't
work on airgap we have to create a ds. So this selective testing was
done using cypress-tags
> Having a new client build for airgapped images which bundles all the
assets.
> And changes in the workflow files to account for all the above. 

With airgap, we can ignore certain tests and also need to account for
tests using mock datasources and such by creating new datasources
instead of mock datasources. Since those are blocked. So to perform a
selective testing we are using a plugin called `cypress-tags` and to
perform conditional testing when required we use the `AIRGAPPED` cypress
env. This PR introduces both and also modified the codebase to support
this new way of running cypress.

Since we can't trigger `/ok-to-test` on this because ci-test needs the
CYPRESS_EXCLUDE_TAGS and slash command doesn't dispatch from current
branch,

I manually triggered the `TBP` workflow to run ci-test on this branch. 
And the new `TBP airgap` workflow to run ci-test on airgapped docker
image on this branch.

Here is the link to the run 
https://github.com/appsmithorg/appsmith/actions/runs/4882041416

Fixes #22007 
Fixes #22814 


## Type of change

> Please delete options that are not relevant.

- New feature (non-breaking change which adds functionality)
- Chore (housekeeping or task changes that don't impact user perception)


## How Has This Been Tested?

- Manual
- 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
- [ ] 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
- [x] 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
2023-05-12 00:15:06 +05:30
Hetu Nandu
a4dec4bb6e
feat: Update order of action file operations (#22754)
## Description

In order to improve new user experience, we want to update the order of
items listed in the new action list. This will show app datasources
higher in the order and generic creation action lower in the order.
Create JS objects is still listed on the top.
This also will update the list sorting on the omni bar.

<img width="524" alt="Screenshot 2023-04-26 at 3 49 31 PM"
src="https://user-images.githubusercontent.com/12022471/234547215-c15c8f12-7be1-4462-8b78-190e7dc75dea.png">

<img width="513" alt="Screenshot 2023-04-26 at 3 53 39 PM"
src="https://user-images.githubusercontent.com/12022471/234547574-46308912-28de-49f7-a3bf-f872def42adb.png">


> Improve the order of action create list

Fixes #22618

## Type of change

- New feature (non-breaking change which adds functionality)


## How Has This Been Tested?

Extracted the function and adding some jest cases for the functionality 

- Manual
- Jest
- Cypress

### Test Plan
TBA

### Issues raised during DP testing

https://github.com/appsmithorg/appsmith/pull/22754#issuecomment-1527503666


## 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
- [ ] 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
- [x] 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
- [x] Added Test Plan Approved label after reveiwing all Cypress test
2023-05-08 14:43:23 +05:30
Rajat Agrawal
58fea85a38
chore: Add rapid mode to skip new app creation in cypress test (#22854)
Fixes #22878

This pr adds a flag called 'rapidMode' in cypress index file.

```
cypress/support/index.js

let rapidMode = {
  enabled: false, // Set it to true to skip app creation during a test re-run
  appName: "4a9b62a0", // Replace it with your app name
  pageName: "page1", // Replace it with the page name
  pageID: "644f8d6e21506c33a366854b", // Replace it with pageID

  url: function () {
    return `app/${this.appName}/${this.pageName}-${this.pageID}/edit`;
  },
};
```
When rapid mode is enabled, the cypress test will

1. Skip relogin if the test user is already logged in.
2. Skip creation of a new app and use a previously created app, passed
as param.

The flag needs to be disabled when the code needs to be merged to
release, and is meant for debugging/testing while writing tests on local
development setup only.

When enabled, a cypress test saves around 25 sec per rerun.

Future fixes would include skipping multiple workspace page visit if a
developer is using dsl for setting up fixtures. It would save around
another 10-15 seconds per test re-run.
2023-05-02 16:17:23 +05:30
akash-codemonk
bdab68c2ff
feat: signposting stickiness (#22088) 2023-05-02 15:22:05 +05:30
Aishwarya-U-R
c55bebbbee
test: Cypress - fix for ExplorerTests/Admin_settings_spec.js (#22686)
## Description

- This PR fixes the flaky ExplorerTests/Admin_settings_spec.js in CI
runs

## Type of change

- Script update

## How Has This Been Tested?
- Cypress local run

## Checklist:


### QA activity:
- [ ] Added Test Plan Approved label after reviewing all changes
2023-04-25 03:23:36 +05:30
Ankita Kinger
3d41a37590
chore: Updating permission check for share modal to invite users (#22396)
## Description

Updating permission check for share modal to invite users

Fixes [#22410](https://github.com/appsmithorg/appsmith/issues/22410)

## Type of change
- Chore (housekeeping or task changes that don't impact user perception)


## How Has This Been Tested?
- Manual
- Cypress

## 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
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [x] 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: Dipyaman Biswas <dipyaman@appsmith.com>
2023-04-21 18:53:05 +05:30
Anand Srinivasan
9af64f7310
test: handle login success & errors properly (#22524)
Fixes #22537

- [x] check for test failures in CE & EE
- [ ] check for merge conflicts in EE (index.js)

## Description

cy command : `LoginFromAPI`

We were calling the login API as a XHR call and navigated to
`/applications` manually in cases where login has actually failed.

Login success & errors are now handled properly.
- Now it will behave like submitting a form.
(https://docs.cypress.io/api/commands/visit#Submit-a-form)
- Performs navigation to `/applications` automatically on login success.
- Performs navigation to `/login?error=true` automatically on login
failure.
- Added origin as a header.


## Media
Before: (navigates to /application even when login fails)
https://www.loom.com/share/086ef8c743ab460194b785a4d22e87cf

Now: (stops when login fails)
https://www.loom.com/share/cc78be2ee2944d0ab9f094f8fd709539


## Type of change
- Chore (housekeeping or task changes that don't impact user perception)


## How Has This Been Tested?
- Cypress


## Checklist:
### Dev activity
- [x] My code follows the style guidelines of this project
- [x] 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
2023-04-19 15:20:54 +05:30
Aishwarya-U-R
b21d23fac3
test: Cypress - flaky fixes the before hook failures due to redirect login (#22520)
## Description

- This PR adds validation to check the logout happened successfully
before login can happen via api

Fixes #22261

## Type of change

- Script fix (non-breaking change which fixes CI failure issue)

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


## Checklist:
### QA activity:
- [x] Added Test Plan Approved label after reviewing all changes
2023-04-19 15:07:39 +05:30
NandanAnantharamu
fea88972fc
test: Tests for auto conversion and mobile viewport (#21931)
covered use-cases documented in 

https://www.notion.so/AutoLayout-cypress-tests-b66ef64b1d6543fb80264358f320d27c

---------

Co-authored-by: Arsalan Yaldram <arsalanyaldram0211@outlook.com>
Co-authored-by: Aswath K <aswath@appsmith.com>
Co-authored-by: Aswath K <aswath.sana@gmail.com>
Co-authored-by: Ashok Kumar M <35134347+marks0351@users.noreply.github.com>
Co-authored-by: rahulramesha <rahul@appsmith.com>
Co-authored-by: Preet <preetsidhu.bits@gmail.com>
Co-authored-by: Nandan <nandan@thnikify.io>
2023-04-14 17:03:50 +05:30
Ravi Kumar Prasad
6ac99037b0
feat: Action selector (#21582)
## Description
Replaces the old boring action selector dropdown with a much more
sophisticated UI that is capable of going above and beyond. Users with
an aversion to code can now build their more complex workflows with a
click of a few buttons.

Consider this code snippet 
```javascript
Api1.run(() => {
  showAlert("Hello");
  navigateTo('Page1', {}, 'SAME_WINDOW');
}, () => {
  removeValue("test");
});
```
|**Old action selector** |**New action selector**|
|:-:|:-:|
|<img width="250" alt="Screenshot 2023-03-29 at 16 54 14"
src="https://user-images.githubusercontent.com/32433245/228520661-a639b580-8986-4aec-a0f5-e2786d1a0f56.png">|
<img width="250" alt="Screenshot 2023-03-29 at 16 55 15"
src="https://user-images.githubusercontent.com/32433245/228521043-5025aa42-af95-4574-b586-bc4c721240bc.png">|

**Click on an action block to edit its parameters.**
<img width="500" alt="Screenshot 2023-03-29 at 17 01 18"
src="https://user-images.githubusercontent.com/32433245/228522479-493769d0-9d2c-4b67-b493-a79e3bb9c947.png">

**Switch to JS mode to get the raw code**
<img width="273" alt="Screenshot 2023-03-29 at 17 05 51"
src="https://user-images.githubusercontent.com/32433245/228523458-13bc0302-4c94-4176-b5aa-3ec208122f57.png">

### Code changes
**New UI components**
  - ActionCreator component splits the code into block statements.
  - Each block statement is represented by ActionTree.tsx UI component.
  - ActionTree.tsx represents an action and its chains.
- ActionCard.tsx is the block that represents the individual action on
the UI.
- ActionSelector.tsx component is popover that contains the form for
editing individual action.
- TabView, TextView, SelectorView, ActionSelectorView and KeyValueView
are components that represent configurable fields in ActionSelector
form.
  
**AST methods**
  - Added methods to get/set function names, expressions, arguments.
- Added methods to get/set then/catch blocks to allow chaining of
actions.
  - Added methods to check if code is convertible to UI.

Fixes #10160
Fixes #21588 
Fixes #21392
Fixes #21393
Fixes #7903
Fixes #15895
Fixes #17765
Fixes #14562

Depends on https://github.com/appsmithorg/design-system/pull/306

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

## How Has This Been Tested?
- Manual
- Jest
- Cypress

### Test Plan
https://github.com/appsmithorg/TestSmith/issues/2296

### 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
- [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
- [x] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag


### 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: Rimil Dey <rimil@appsmith.com>
Co-authored-by: arunvjn <arun@appsmith.com>
Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
Co-authored-by: Parthvi Goswami <parthvigoswami@Parthvis-MacBook-Pro.local>
2023-04-06 22:19:12 +05:30
Aishwarya-U-R
ca6ab330c5
test: test: Cypress - Automated tests for Elasticsearch datasource (#22101)
## Description

- This PR includes tests for Elastic Search datasource - with querying &
usage of various fields in the query page

## Type of change

- New script

## How Has This Been Tested?

- Cypress local/CI runs

## Checklist:

### QA activity:
- [X] Added Test Plan Approved label after reviewing all Cypress test
2023-04-06 09:37:04 +05:30
Aishwarya-U-R
83ea3c04cf
test: Cypress - Automated tests for Firestore datasource (#22057)
## Description

- This PR includes tests for Firestore ds - with querying & usage of
various fields in the query page

## Type of change

- New script

## How Has This Been Tested?

- Cypress CI runs

## Checklist:

### QA activity:
- [ ] Added Test Plan Approved label after reviewing all changes
2023-04-04 21:26:57 +05:30
Ankita Kinger
778922bd74
chore: Updating tests which will fail on app invites getting merged (#21949)
## Description

> Updating tests which will fail when app invites are merged on EE.
Along with that, updating permission check for the invite modal content
on app level.

Fixes [#21952](https://github.com/appsmithorg/appsmith/issues/21952)

## Type of change

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

## How Has This Been Tested?
> Ran the cypress tests on local and it works fine.

- Manual
- Cypress

## 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
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [x] 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
2023-03-31 17:07:09 +05:30
Hetu Nandu
c058e29030
chore: Add new navigation scenarios for route change event (#21682)
## Description

Added following new events for gaps inside analytics
- ActionBackButton
- CanvasClick

Fixes #21417

## Type of change

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


## How Has This Been Tested?

- Manual

### Test Plan

### 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
2023-03-30 11:03:29 +05:30
Nilansh Bansal
210a5a9eb8
fix: Login Redirection fixed for Authentication failure (#21495)
## Description
> This PR fixes the `redirectUrl` for the `/login` POST API in case of
an authentication failure.

Fixes #18670 

## Type of change

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



## How Has This Been Tested?

- Manual
https://github.com/appsmithorg/TestSmith/issues/2203

## Checklist:
### Dev activity
- [x] My code follows the style guidelines of this project
- [x] 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
- [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:
- [ ] 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: Anand Srinivasan <anand.a.srinivasan@outlook.com>
Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
2023-03-29 23:56:24 +06:00
Aishwarya-U-R
e7343d12ac
test: Cypress - Flaky fix (#21860)
## Description

- This PR fixes the welcome screen button click - which sometimes fails
the spec in before hook itself

## Type of change

- Script fix

## How Has This Been Tested?
- Cypress local run

## Checklist:
### QA activity:
- [X] Added Test Plan Approved label after reviewing all changes
2023-03-29 15:12:29 +05:30
Aishwarya-U-R
05030959c3
test: Cypress - Automated tests for Basic Arango/Curl Import datasources (#21808)
## Description

- This PR includes tests for Arango ds - along with curl import &
querying & usage of various fields in the query page

## Type of change

- New script


## How Has This Been Tested?

- Cypress CI runs

## Checklist:
### QA activity:
- [X] Added Test Plan Approved label after reviewing all Cypress test

---------

Co-authored-by: Saroj <43822041+sarojsarab@users.noreply.github.com>
2023-03-29 01:37:07 +05:30
Ankita Kinger
c9e4f6a5ec
ci: Adding intercept for admin env API to send origin request header (#21814)
## Description

> Adding intercept for admin env API to send origin request header

Fixes # (issue)
> if no issue exists, please create an issue and ask the maintainers
about this first

## Type of change

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


## How Has This Been Tested?
> Ran analytics spec locally and tested it out to be successfully
completed.

- Cypress

## 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
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [x] 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
2023-03-28 15:45:44 +05:30
Aishwarya-U-R
e7bed2de14
test: Segment call interception conts., (#21763)
## Description

- This PR corrects the api request validation in case of the welcome
toggles left ON

## Type of change

- Script fix

## How Has This Been Tested?
- Cypress local run


## Checklist:
### QA activity:
- [X] Added Test Plan Approved label after reviewing all changes
2023-03-25 00:37:06 +05:30
Aishwarya-U-R
2bc6013b2c
test: Segment call interception cont., (#21762)
## Description

- Keeping the telemetry & Stay in touch toggles on which was missed in
previous merge


## Type of change

- Script update


## How Has This Been Tested?
- Cypress run local

## Checklist:
### QA activity:
- [X] Added Test Plan Approved label after reviewing all changes
2023-03-24 23:12:49 +05:30
Aishwarya-U-R
413d430025
test: Cypress - Segment calls intercepted (#21726)
## Description

- This PR adds the host for segment calls as localhost as opposed to
sending it to Segment itself
- Diverting segment calls to Localhost for Cypress CI runs &
intercepting the response
- Updated to Analytics spec to validate the enableTelemtry false state
- Bug 21191, validation included
- Welcome screen - not toggling off the Usage Details anymore

## Type of change

- Yml file update
- Script updates


## Checklist:
### QA activity:
- [X] Added Test Plan Approved label after reviewing all changes
2023-03-24 21:36:48 +05:30
Vijetha-Kaja
f1779b4f63
test: Cypress - Fix Flaky Tests (#21755)
## Description

**Fixed below flaky tests**

- Listv2_Meta_Hydration_ServerSide_spec.js
- Listv2_dataIdentifierProperty_spec.js
- ListV2_PropertyPane_spec.js

## 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-03-24 21:11:12 +05:30
Aishwarya-U-R
8f20f0980d
test: Cypress - Disabling back welcome screen triggers (#21728)
## Description

- This PR adds back the toggling off for telemetry & stay in touch
toggles. Adds wait for toggles to settle before clicking on the button.

## Type of change

- Script fix


## How Has This Been Tested?

- Cypress runs local

## Checklist:

### QA activity:
- [X] Added Test Plan Approved label after reviewing all Cypress test
2023-03-23 15:56:44 +05:30
Aishwarya-U-R
f52209c691
test: Cypress - Welcome screen - Before hook FailureFix - CI runs (#21714)
## Description

- This PR aims to fix the welcome screen button click failures seen
recently in CI runs

## Type of change

- Script fix


## How Has This Been Tested?

- Cypress local run


## Checklist:
### QA activity:
- [X] Added Test Plan Approved label after reviewing all Cypress test
2023-03-23 14:11:09 +05:30
Vijetha-Kaja
e7573eadf2
test: Cypress - Fix flaky tests (#21614)
## Description

**Fixed below flaky tests**

- Listv2_Meta_Hydration_ServerSide_spec
- RegenerateSSHKey_spec

## 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-03-22 01:54:32 +05:30
Valera Melnikov
805256a274
chore: corrections for eslint and prettier (#21543)
Correction of eslint and printer errors/warnings. It is associated with [this activity](https://theappsmith.slack.com/archives/CGBPVEJ5C/p1678968535728579) in order to avoid conflicts with others.

  1. Fix eslint warnings in unit tests. All unit tests are passed.
  2. Fix prettier at cypress.

Co-authored-by: Valera Melnikov <melnikov.vv@greendatasoft.ru>
2023-03-17 19:50:51 +05:30
sidhantgoel
214fb1705a
feat: migrate JsonIgnore to JsonView (#20086)
In summary, the change comprises adding `JsonView` annotations on
domain/model fields, controller methods, and arguments.
applying JsonView annotation on controller methods will include fields
which are marked with the same view in domain objects.
Similarly, usage on controller method arguments will only deserialize
the fields which are marked with same view in Domain object, which is
helpful in case we don't want the client to send some fields for
security reasons.
This change replaces the previous use of JsonIgnore for restricting
fields in API response and allows for more flexibility and will enable
us to have fine-grain control over fields serialized for different
contexts, such as API response, export, and import.
The following views are defined as of now.
`View.Internal` - View used to serialize for internal use. It inherits
from `Views.Public` and `Views.Export`, so it will also include those
fields.
`Views.Public` - View used for API request/response.
`Views.Export` - View used for making field exportable, like in the case
of Git sync and file export.
Also, we can define more views by adding an interface inside the Views
class and Views can also inherit fields marked with different view by
simple interface inheritance.

A small tutorial on JsonView - [Jackson JSON Views |
Baeldung](https://www.baeldung.com/jackson-json-view-annotation)

---------

Signed-off-by: Sidhant Goel <sidhant@appsmith.com>
Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
Co-authored-by: Nayan <nayan@appsmith.com>
2023-03-17 17:19:24 +06:00
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
sneha122
43e7a00db0
fix: filepicker not showing in firefox issue fixed (#21257)
## Description

This PR fixes issue of file picker not showing up in firefox, The issue
occurred because the function being triggered on script load
`gapiLoaded`, was defined in a script that would load after `gapi`. Even
though `gapi` is being loaded asynchronously, in case of firefox when
using with windows OS, it would load before the script which had onload
function defined. This PR fixes the issue by defining onload function in
a script that loads before `gapi`

> Add a TL;DR when description is extra long (helps content team)

Fixes #21033 
> 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)


## 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
- [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
- [x] 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: “sneha122” <“sneha@appsmith.com”>
2023-03-15 16:33:14 +05:30
Shrikant Sharat Kandula
7b56706717
feat: Add static header for CSRF protection (#20965)
We add a static constant value header, to all requests made by the
client, whose method isn't `GET` or `HEAD`.

More discussion in [this Slack
thread](https://theappsmith.slack.com/archives/C03RPDB936Z/p1669701485071579?thread_ts=1669460732.544859&cid=C03RPDB936Z).
2023-03-15 15:32:24 +05:30
Vijetha-Kaja
59d2e0460a
test: Cypress - mock api url update + Flaky fixes (#20754)
## Description

- Modified mock api url and refactored specs accordingly

**Flaky fixes below:**

- Listv2_BasicChildWidgetInteraction_spec.js
- QueryPane/Mongo_Spec.js
- CreateNewApp_spec.js
- Enabling S3_1_spec - upload case back

## 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-03-11 12:31:39 +05:30
Tolulope Adetula
72738b95e2
fix: remove parent list widget from child widget level data (#20963)
## Description

Avoid cyclic dependency in child widget when using level data to
reference Parent List widget

Fixes #20793 

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



## How Has This Been Tested?

- Cypress

### Test Plan
> https://github.com/appsmithorg/TestSmith/issues/2187

### 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
- [x] 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
2023-03-02 16:49:14 +01:00
Vijetha-Kaja
870ae0e41a
test:flaky test fix (#20888)
## Description

**Fixed below flaky tests**
- Button_tooltip_spec.js
- Date_column_editing_spec.js
- Basic_spec.js
- Gitimport_spec.js

## 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-23 23:29:05 +05:30
Tolulope Adetula
7dc9056834
chore: improve ListV2 cypress scripts (#20905)
## Description
Improve Listv2 tests

Fixes # (issue)
https://theappsmith.slack.com/archives/C02JV8G1MP0/p1676925949886009



## Type of change

> Please delete options that are not relevant.

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



## How Has This Been Tested?

- Cypress



## 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
- [x] 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: ashit-rath <ashit@appsmith.com>
Co-authored-by: Favour Ohanekwu <fohanekwu@gmail.com>
2023-02-23 21:02:31 +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