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

119 lines
2.8 KiB
JavaScript
Raw Normal View History

perf: Widget re-rendering refactor (#14485) * initial commit * props hoc * changes * removed ignores and withWidgetProps * added extra props to canvasStructure * widget props changes * list widget changes * reintroduced widget props hook and other refactors * remove warnings * added deepequal for childWidgets selector * fix global hotkeys and tabs widget jest test * fix main container test fix * fixed view mode width * fix form widget values * minor fix * fix skeleton * form widget validity fix * jest test fix * fixed tests: GlobalHotkeys, Tabs, CanvasSelectectionArena and fixed main container rendering * minor fix * minor comments * reverted commented code * simplified structure, selective redux state updates and other inconsistencies * fix junit test cases * stop form widget from force rendering children * fix test case * random commit to re run tests * update isFormValid prop only if it exists * detangling circular dependency * fixing cypress tests * cleaned up code * clean up man cnavas props and fix jest cases * fix rendering order of child widgets for canvas * fix dropdown reset spec * adding comments * cleaning up unwanted code * fix multiselect widget on deploy * adressing review comments * addressing minor review comment changes * destructuring modal widget child and fix test case * fix communityIssues cypress spec * rewrite isVisible logic to match previous behaviour * merging widget props with component props before checking isVisible * adressing review comments for modal widget's isVisible Co-authored-by: rahulramesha <rahul@appsmith.com>
2022-08-19 10:10:36 +00:00
export const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl";
feat: added column freeze and unfreeze functionality to table widget (#18757) **PRD**: https://www.notion.so/appsmith/Ability-to-freeze-columns-dd118f7ed2e14e008ee305056b79874a?d=300f4968889244da9f737e1bfd8c06dc#2ddaf28e10a0475cb69f1af77b938d0b This PR adds the following features to the table widget: - Freeze the columns to the left or right of the table.(Both canvas and page view mode). - Unfreeze the frozen columns. (Both canvas and page view mode). - Columns that are left frozen, will get unfrozen at a position after the last left frozen column. (Both canvas and page view mode). - Columns that are right frozen, will get unfrozen at a position before the first right frozen column. (Both canvas and page view mode). - Column order can be persisted in the Page view mode. - Users can also unfreeze the columns that are frozen by the developers. - Columns that are frozen cannot be reordered(Both canvas and page view mode) - **Property pane changes (Columns property)**: - If the column is frozen to the left then that column should appear at top of the list. - If the column is frozen to the right then that column should appear at the bottom of the list. - The columns that are frozen cannot be moved or re-ordered in the list. They remain fixed in their position. - In-Page mode, If there is a change in frozen or unfrozen columns in multiple tables then the order of columns and frozen and unfrozen columns should get persisted on refresh i.e. changes should get persisted across refreshes.
2023-02-15 11:42:46 +00:00
export const TABLE_COLUMN_ORDER_KEY = "tableWidgetColumnOrder";
fix: column order of frozen columns when query changes (#22691) ## Description This PR focuses on reordering the frozen columns when the query changes. With this PR, we intend to retain the position of the frozen columns. Fixes #21154 ## Type of change - Bug fix (non-breaking change which fixes an issue) ## How Has This Been Tested? - Manual - Order of the unfrozen common columns should appear as expected. - Column order of common columns should work as expected as before - Cypress - Frozen custom columns should retain the position on query change - Custom common columns should retain the position on query change - Frozen column should remain frozen and unfrozen column should come first when query changes - The order of the frozen columns should remain the same. - When 2 common columns, one is frozen to left, other is unfrozen, then post query change, unfrozen comes after frozen ### Test Plan > https://github.com/appsmithorg/TestSmith/issues/2164 ### 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: - [x] 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 - [ ] Added Test Plan Approved label after reveiwing all Cypress test
2023-05-03 06:26:08 +00:00
export const TABLE_DATA_DYNAMIC = `{{[
fix: column dragging and column reordering (#20928) ## Description This PR implements the following changes: - Move the drag events from the Parent component's useEffect to the `HeaderCell` component. - Refactored the code. Inside the table component, we refactored the code such that when SSP is disabled the component uses `StaticTable` and when SSP enabled then we use `VirtualTable`. - It also includes the fix for the following issue. Whenever the user has a scroll to the bottom of the page, on clicking of add new button it is expected that the scroll should move to the top but it wasn't happening. > Add a TL;DR when description is extra long (helps content team) Fixes #20858 > if no issue exists, please create an issue and ask the maintainers about this first ## Type of change - Bug fix (non-breaking change which fixes an issue) ## How Has This Been Tested? - Manual - Test cases: - Column name should appear on update from the property pane - reorder whenever SSP is enabled - On column re-size - When a col is frozen - When a col is unfrozen - When all the headers or one of them is removed - When sorted also should work - Enable multi-row selection - When in preview mode and back and forth(Check the above cases) - When in Deployed mode - Dragging of columns from the column header should work as expected both in Deploy and Published mode. - 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 - [ ] 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 - [ ] 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-05 14:19:44 +00:00
{
"id": 2381224,
"email": "michael.lawson@reqres.in",
"userName": "Michael Lawson",
"productName": "Chicken Sandwich",
"orderAmount": 4.99
},
{
"id": 2736212,
"email": "lindsay.ferguson@reqres.in",
"userName": "Lindsay Ferguson",
"productName": "Tuna Salad",
"orderAmount": 9.99
},
{
"id": 6788734,
"email": "tobias.funke@reqres.in",
"userName": "Tobias Funke",
"productName": "Beef steak",
"orderAmount": 19.99
},
{
"id": 7434532,
"email": "byron.fields@reqres.in",
"userName": "Byron Fields",
"productName": "Chicken Sandwich",
"orderAmount": 4.99
},
{
"id": 7434532,
"email": "ryan.holmes@reqres.in",
"userName": "Ryan Holmes",
"productName": "Avocado Panini",
"orderAmount": 7.99
},
{
"id": 7434532,
"email": "byron.fields@reqres.in",
"userName": "Byron Fields",
"productName": "Chicken Sandwich",
"orderAmount": 4.99
},
{
"id": 7434532,
"email": "ryan.holmes@reqres.in",
"userName": "Ryan Holmes",
"productName": "Avocado Panini",
"orderAmount": 7.99
},
{
"id": 7434532,
"email": "byron.fields@reqres.in",
"userName": "Byron Fields",
"productName": "Chicken Sandwich",
"orderAmount": 4.99
},
{
"id": 7434532,
"email": "ryan.holmes@reqres.in",
"userName": "Ryan Holmes",
"productName": "Avocado Panini",
"orderAmount": 7.99
},
{
"id": 7434532,
"email": "byron.fields@reqres.in",
"userName": "Byron Fields",
"productName": "Chicken Sandwich",
"orderAmount": 4.99
},
{
"id": 7434532,
"email": "ryan.holmes@reqres.in",
"userName": "Ryan Holmes",
"productName": "Avocado Panini",
"orderAmount": 7.99
},
{
"id": 7434532,
"email": "byron.fields@reqres.in",
"userName": "Byron Fields",
"productName": "Chicken Sandwich",
"orderAmount": 4.99
},
{
"id": 7434532,
"email": "ryan.holmes@reqres.in",
"userName": "Ryan Holmes",
"productName": "Avocado Panini",
"orderAmount": 7.99
}
]}}`;
fix: column order of frozen columns when query changes (#22691) ## Description This PR focuses on reordering the frozen columns when the query changes. With this PR, we intend to retain the position of the frozen columns. Fixes #21154 ## Type of change - Bug fix (non-breaking change which fixes an issue) ## How Has This Been Tested? - Manual - Order of the unfrozen common columns should appear as expected. - Column order of common columns should work as expected as before - Cypress - Frozen custom columns should retain the position on query change - Custom common columns should retain the position on query change - Frozen column should remain frozen and unfrozen column should come first when query changes - The order of the frozen columns should remain the same. - When 2 common columns, one is frozen to left, other is unfrozen, then post query change, unfrozen comes after frozen ### Test Plan > https://github.com/appsmithorg/TestSmith/issues/2164 ### 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: - [x] 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 - [ ] Added Test Plan Approved label after reveiwing all Cypress test
2023-05-03 06:26:08 +00:00
export const TABLE_DATA_STATIC = `
[
{
"id": "#1",
"task": "Drop a table",
"status": "✅",
"action": ""
},
{
"id": "#2",
"task": "Create a query fetch_users with the Mock DB",
"status": "--",
"action": ""
},
{
"id": "#3",
"task": "Bind the query using => fetch_users.data",
"status": "--",
"action": ""
}
]
`;