## 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
119 lines
2.8 KiB
JavaScript
119 lines
2.8 KiB
JavaScript
export const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl";
|
|
export const TABLE_COLUMN_ORDER_KEY = "tableWidgetColumnOrder";
|
|
export const TABLE_DATA_DYNAMIC = `{{[
|
|
{
|
|
"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
|
|
}
|
|
]}}`;
|
|
|
|
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": ""
|
|
}
|
|
]
|
|
`;
|