PromucFlow_constructor/app/client/cypress/support/WorkspaceCommands.js

156 lines
5.1 KiB
JavaScript
Raw Normal View History

/* eslint-disable cypress/no-unnecessary-waiting */
/* eslint-disable cypress/no-assigning-return-values */
/* Contains all methods related to Workspace features*/
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 14:43:58 +00:00
import { AppSidebar } from "./Pages/EditorNavigation";
require("cy-verify-downloads").addCustomCommand();
require("cypress-file-upload");
import homePage from "../locators/HomePage";
import { ObjectsRegistry } from "../support/Objects/Registry";
const agHelper = ObjectsRegistry.AggregateHelper;
const assertHelper = ObjectsRegistry.AssertHelper;
const homePageTS = ObjectsRegistry.HomePage;
export const initLocalstorage = () => {
cy.window().then((window) => {
window.localStorage.setItem("ShowCommentsButtonToolTip", "");
window.localStorage.setItem("updateDismissed", "true");
});
};
Cypress.Commands.add("createWorkspace", () => {
cy.get(homePage.createWorkspace)
.should("be.visible")
.first()
.click({ force: true });
});
Cypress.Commands.add("openWorkspaceOptionsPopup", (workspaceName) => {
cy.get(homePage.workspaceList.concat(workspaceName).concat(")"))
.first()
.scrollIntoView()
.should("be.visible");
cy.get(homePage.workspaceList.concat(workspaceName).concat(")"))
.closest(homePage.workspaceCompleteSection)
.find(homePage.optionsIcon)
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-19 18:37:06 +00:00
.first()
.click({ force: true });
});
Cypress.Commands.add("enablePublicAccess", (editMode = false) => {
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-19 18:37:06 +00:00
cy.xpath(homePage.enablePublicAccess).first().click({ force: true });
cy.wait("@changeAccess").should(
"have.nested.property",
"response.body.responseMeta.status",
200,
);
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-19 18:37:06 +00:00
cy.wait(5000);
const closeButtonLocator = editMode
? homePage.editModeInviteModalCloseBtn
: homePage.closeBtn;
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 https://github.com/appsmithorg/appsmith/commit/7cbb12af886621256224be0c93e6a465dd710ad3, 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 11:41:47 +00:00
cy.get(closeButtonLocator).first().click({ force: true });
});
Cypress.Commands.add("launchApp", () => {
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 https://github.com/appsmithorg/appsmith/commit/7cbb12af886621256224be0c93e6a465dd710ad3, 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 11:41:47 +00:00
cy.get(homePage.appView).should("be.visible").first().click();
cy.get("#loading").should("not.exist");
cy.wait("@getConsolidatedData").should(
"have.nested.property",
"response.body.responseMeta.status",
200,
);
});
Cypress.Commands.add("AppSetupForRename", () => {
cy.wait(2000); //wait a bit for app to load
cy.get(homePage.applicationName).then(($appName) => {
if (!$appName.hasClass(homePage.editingAppName)) {
cy.get(homePage.applicationName).click({ force: true });
cy.get(homePage.portalMenuItem)
fix: Improvements to Sidebar for navigation (#29205) ## Description - Rename to Pages to Editor in the Sidebar - Move Editor to top - Update "Home" to "All apps" #### PR fixes following issue(s) Fixes #29206 #### 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 - [ ] 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
2023-11-30 00:41:59 +00:00
.contains("Rename", { matchCase: false })
.click({ force: true });
}
});
});
Cypress.Commands.add("CreateAppForWorkspace", (workspaceName, appname) => {
cy.get(
homePage.workspaceList
.concat(workspaceName)
.concat(homePage.createAppFrWorkspace),
)
feat: Homepage experience v2 changes (#29282) > Pull Request Template > > Use this template to quickly create a well written pull request. Delete all quotes before creating the pull request. > ## Description > Add a TL;DR when description is extra long (helps content team) > > Please include a summary of the changes and which issue has been fixed. Please also include relevant motivation > and context. List any dependencies that are required for this change > > Links to Notion, Figma or any other documents that might be relevant to the PR > > #### 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 - [ ] 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** - Added new workspace search functionality in the search bar. - Introduced a help button for user assistance. - Implemented new UI components for workspace selection and management. - Enhanced application card with edit permission checks. - Integrated workspace actions for creating and fetching workspaces directly from the UI. - **Improvements** - Improved workspace and application fetching logic. - Enhanced Global Search with updated import paths and logic. - Refined the layout and styling of the applications page and sub-header components. - Optimized workspace-related sagas and reducers for better performance and maintainability. - **Bug Fixes** - Fixed tooltip functionality in "Reconnect Datasources" within templates. - Corrected test logic for forking templates and applications. - Updated Cypress test commands for consistency and reliability. - Addressed issues with application URL test cases and workspace import logic. - **Documentation** - Updated messages and constants related to workspace and application UI elements for clearer user communication. - **Chores** - Cleaned up unused code and simplified selectors across various components and tests. - Refactored application and workspace selectors for improved code organization. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Dipyaman Biswas <dipyaman@appsmith.com> Co-authored-by: Abhijeet <abhi.nagarnaik@gmail.com> Co-authored-by: Nidhi <nidhi@appsmith.com> Co-authored-by: Goutham Pratapa <goutham@appsmith.com> Co-authored-by: Ankita Kinger <ankita@appsmith.com> Co-authored-by: albinAppsmith <87797149+albinAppsmith@users.noreply.github.com> Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com> Co-authored-by: Nayan <nayan@appsmith.com> Co-authored-by: Rishabh Rathod <rishabh.rathod@appsmith.com>
2024-01-25 13:41:48 +00:00
.first()
.scrollIntoView()
.should("be.visible")
.click({ force: true });
feat: Homepage experience v2 changes (#29282) > Pull Request Template > > Use this template to quickly create a well written pull request. Delete all quotes before creating the pull request. > ## Description > Add a TL;DR when description is extra long (helps content team) > > Please include a summary of the changes and which issue has been fixed. Please also include relevant motivation > and context. List any dependencies that are required for this change > > Links to Notion, Figma or any other documents that might be relevant to the PR > > #### 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 - [ ] 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** - Added new workspace search functionality in the search bar. - Introduced a help button for user assistance. - Implemented new UI components for workspace selection and management. - Enhanced application card with edit permission checks. - Integrated workspace actions for creating and fetching workspaces directly from the UI. - **Improvements** - Improved workspace and application fetching logic. - Enhanced Global Search with updated import paths and logic. - Refined the layout and styling of the applications page and sub-header components. - Optimized workspace-related sagas and reducers for better performance and maintainability. - **Bug Fixes** - Fixed tooltip functionality in "Reconnect Datasources" within templates. - Corrected test logic for forking templates and applications. - Updated Cypress test commands for consistency and reliability. - Addressed issues with application URL test cases and workspace import logic. - **Documentation** - Updated messages and constants related to workspace and application UI elements for clearer user communication. - **Chores** - Cleaned up unused code and simplified selectors across various components and tests. - Refactored application and workspace selectors for improved code organization. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Dipyaman Biswas <dipyaman@appsmith.com> Co-authored-by: Abhijeet <abhi.nagarnaik@gmail.com> Co-authored-by: Nidhi <nidhi@appsmith.com> Co-authored-by: Goutham Pratapa <goutham@appsmith.com> Co-authored-by: Ankita Kinger <ankita@appsmith.com> Co-authored-by: albinAppsmith <87797149+albinAppsmith@users.noreply.github.com> Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com> Co-authored-by: Nayan <nayan@appsmith.com> Co-authored-by: Rishabh Rathod <rishabh.rathod@appsmith.com>
2024-01-25 13:41:48 +00:00
agHelper.GetNClick(homePage.newButtonCreateApplication, 0, true);
cy.wait("@createNewApplication").then((xhr) => {
const response = xhr.response;
expect(response.body.responseMeta.status).to.eq(201);
localStorage.setItem("applicationId", response.body.data.id);
cy.wrap(response.body.data.id).as("currentApplicationId");
});
cy.get("#loading").should("not.exist");
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(2000);
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 11:12:53 +00:00
homePageTS.RenameApplication(appname);
});
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 14:03:07 +00:00
Cypress.Commands.add("CreateNewAppInNewWorkspace", () => {
let applicationId, appName;
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 14:03:07 +00:00
let toNavigateToHome = false;
cy.get("body").then(($ele) => {
if ($ele.find(".t--appsmith-logo").length < 0) {
toNavigateToHome = false;
} else {
toNavigateToHome = true;
}
});
homePageTS.CreateNewWorkspace("", toNavigateToHome); //Creating a new workspace for every test, since we are deleting the workspace in the end of the test
cy.get("@workspaceName").then((workspaceName) => {
localStorage.setItem("workspaceName", workspaceName);
homePageTS.CreateAppInWorkspace(localStorage.getItem("workspaceName"));
});
cy.get("@createNewApplication").then((xhr) => {
const response = xhr.response;
expect(response.body.responseMeta.status).to.eq(201);
applicationId = response.body.data.id;
appName = response.body.data.name;
cy.log("appName", appName);
localStorage.setItem("applicationId", applicationId);
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 02:15:47 +00:00
localStorage.setItem("appName", appName);
test: Cypress | Replace static waits from Helpers + Flaky fixes (#29856) ## Description - This PR removes static waits from below helpers & added dynamic checks as needed: - apiPage.CreateApi(), apiPage.CreateAndFillGraphqlApi() - app/client/cypress/support/Pages/AppSettings/ThemeSettings.ts - cy.CreateNewAppInNewWorkspace() - replaced static wait with dynamic check - dataSources.NavigateToDSCreateNew() - removed wait, updated logic - agHelper.VerifyEvaluatedValue() - Flaky fix below specs: - /Git/GitSync/GitSyncedApps_spec.js (fixed testcase # 2 - 4th onwards is failing due to childbranch/master change - to be checked further) - /Git/GitDiscardChange/DiscardChanges_spec.js (EditorNavigation.NavigateToDatasource(), Sidebar.navigate()) - /BugTests/ApiBugs_Spec.ts (3rd case) - /Dropdown/Dropdown_onOptionChange_spec.js (3rd case) - /ServerSide/ApiTests/API_Search_spec.js (3rd case) - Removed extra Refresh call from before hook in /BugTests/ApiBugs_Spec.ts #### Type of change - Script update (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 - **Bug Fixes** - Improved the reliability of API creation processes. - Enhanced the user experience in theme settings by removing unnecessary delays. - Streamlined navigation in the data source creation workflow. - **Refactor** - Optimized test automation scripts for better performance and maintainability. - Updated element interaction methods to increase test robustness. - Refined logic for selecting and asserting UI components within test cases. - **Chores** - Adjusted test suite configurations to include new test cases and exclude a specific test file. - Removed redundant page refresh steps to improve test execution speed. - **Tests** - Added new assertions to validate the evaluated values in test scenarios. - Simplified data source and query creation in widget test cases for clarity. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-01-05 06:12:03 +00:00
agHelper.AssertElementAbsence("#loading", Cypress.config().pageLoadTimeout);
cy.url().then((url) => {
if (url.indexOf("/applications") > -1) {
homePageTS.EditAppFromAppHover(appName);
}
});
});
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 14:43:58 +00:00
AppSidebar.assertVisible();
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 14:03:07 +00:00
// If the intro modal is open, close it
2023-05-02 09:52:05 +00:00
cy.skipSignposting();
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 02:15:47 +00:00
//Removing renaming of app from all tests, since its also verified in other separate tests
// cy.AppSetupForRename();
// cy.get(homePage.applicationName).type(appname + "{enter}");
// assertHelper.AssertNetworkStatus("@updateApplication");
// // Remove tooltip on the Application Name
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 14:03:07 +00:00
// agHelper.RemoveTooltip("Tooltip","Rename application");
/* The server created app always has an old dsl so the layout will migrate
* To avoid race conditions between that update layout and this one
* we wait for that to finish before updating layout here
*/
//cy.wait("@updateLayout");
});