PromucFlow_constructor/app/client/cypress/support/Pages/Canvas.ts

31 lines
858 B
TypeScript
Raw Normal View History

chore: cypress test for canvas view mode (#32354) ## Description This PR added cypress test for canvas view mode. Fixes #31874 ## Automation /ok-to-test tags="@tag.Sanity, @tag.IDE" ### :mag: Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!IMPORTANT] > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/8534736683> > Commit: `f1d8cc5c4437571b5bbe9a43e892068ae774c75f` > Cypress dashboard url: <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8534736683&attempt=1" target="_blank">Click here!</a> > All cypress tests have passed 🎉🎉🎉 <!-- end of auto-generated comment: Cypress test results --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced testing functionality for Canvas view mode in IDE, including various interactions and validations. - Added a new Cypress command for asserting the presence and content of tooltips. - Enhanced tooltip message customization in the Canvas view mode with a new message creation function. - **Refactor** - Improved code organization in Canvas support files with better method implementations. - **Tests** - Added end-to-end tests for new and existing functionalities related to the Canvas view mode. - **Documentation** - Updated Cypress support documentation with the new `assertTooltipPresence` method. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-03 09:22:09 +00:00
import { agHelper } from "../Objects/ObjectsCore";
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 EditorNavigation from "./EditorNavigation";
class Canvas {
selectMultipleWidgets(widgetNames: string[]) {
EditorNavigation.ShowCanvas();
for (const widget of widgetNames) {
// Ctrl click on widget name component
chore: cypress test for canvas view mode (#32354) ## Description This PR added cypress test for canvas view mode. Fixes #31874 ## Automation /ok-to-test tags="@tag.Sanity, @tag.IDE" ### :mag: Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!IMPORTANT] > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/8534736683> > Commit: `f1d8cc5c4437571b5bbe9a43e892068ae774c75f` > Cypress dashboard url: <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8534736683&attempt=1" target="_blank">Click here!</a> > All cypress tests have passed 🎉🎉🎉 <!-- end of auto-generated comment: Cypress test results --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced testing functionality for Canvas view mode in IDE, including various interactions and validations. - Added a new Cypress command for asserting the presence and content of tooltips. - Enhanced tooltip message customization in the Canvas view mode with a new message creation function. - **Refactor** - Improved code organization in Canvas support files with better method implementations. - **Tests** - Added end-to-end tests for new and existing functionalities related to the Canvas view mode. - **Documentation** - Updated Cypress support documentation with the new `assertTooltipPresence` method. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-03 09:22:09 +00:00
this.commandClickWidget(widget);
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
}
}
chore: cypress test for canvas view mode (#32354) ## Description This PR added cypress test for canvas view mode. Fixes #31874 ## Automation /ok-to-test tags="@tag.Sanity, @tag.IDE" ### :mag: Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!IMPORTANT] > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/8534736683> > Commit: `f1d8cc5c4437571b5bbe9a43e892068ae774c75f` > Cypress dashboard url: <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8534736683&attempt=1" target="_blank">Click here!</a> > All cypress tests have passed 🎉🎉🎉 <!-- end of auto-generated comment: Cypress test results --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced testing functionality for Canvas view mode in IDE, including various interactions and validations. - Added a new Cypress command for asserting the presence and content of tooltips. - Enhanced tooltip message customization in the Canvas view mode with a new message creation function. - **Refactor** - Improved code organization in Canvas support files with better method implementations. - **Tests** - Added end-to-end tests for new and existing functionalities related to the Canvas view mode. - **Documentation** - Updated Cypress support documentation with the new `assertTooltipPresence` method. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-03 09:22:09 +00:00
hoverOnWidget(widgetName: string) {
const selector = `[data-widgetname-cy="${widgetName}"] > div`;
agHelper.Sleep(500);
cy.get(selector).trigger("mouseover", { force: true }).wait(500);
}
commandClickWidget(widgetName: string) {
cy.get(`div[data-widgetname-cy='${widgetName}']`).realHover();
cy.get(`div[data-testid="t--settings-controls-positioned-wrapper"]`)
.contains(widgetName)
.click({
force: true,
ctrlKey: true,
});
}
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
}
export default new Canvas();