## Description This PR enables server side filtering for the table widget. #### PR fixes following issue(s) Fixes #25529 #### Type of change - New feature (non-breaking change which adds functionality) ## Testing > #### How Has This Been Tested? > Please describe the tests that you ran to verify your changes. Also list any relevant details for your test configuration. > Delete anything that is not relevant - [x] Manual - should test that the filter apply button text color should be clear and visible - should test that the value property of `table.filters` is number when number is provided inside the filter. - should test that client side filtering is disabled when server side filtering is enabled - should test that `filters` property appears as an autocomplete. - All the cases mentioned in this [test plan](https://docs.google.com/spreadsheets/d/1TgKPH5XPzIuaHAPooYr5o5jrhpjxFhBTq_Q6wv5rnVk/edit#gid=1701564241) - [ ] Jest - [ ] Cypress - should test that server side filtering properties exists in the property pane - should test that select query gets executed on filter change and no data is filtered from client-side when serverside filtering is turned on - should test that removing the table filter executes the query - should test that data is filtered client-side when serverside filtering is turned off > > #### Test Plan > Add Testsmith test cases links that relate to this PR > > #### Issues raised during DP testing > Link issues raised during DP testing for better visiblity and tracking (copy link from comments dropped on this PR) > > > ## Checklist: #### Dev activity - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [x] 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
121 lines
2.8 KiB
JavaScript
121 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": ""
|
|
}
|
|
]
|
|
`;
|
|
|
|
export const DEFAULT_COLUMN_NAME = "Table Column";
|