CE-793 - Replace/rename savedFilter as savedView

This commit is contained in:
2024-01-29 19:34:00 -06:00
parent f6b2713639
commit c5c756d84f
10 changed files with 34 additions and 34 deletions

View File

@ -355,7 +355,7 @@ export default function App()
routeList.push({ routeList.push({
name: `${app.label}`, name: `${app.label}`,
key: app.name, key: app.name,
route: `${path}/savedFilter/:id`, route: `${path}/savedView/:id`,
component: <RecordQuery table={table} key={table.name} />, component: <RecordQuery table={table} key={table.name} />,
}); });

View File

@ -123,7 +123,7 @@ export function QActionsMenuButton({isOpen, onClickHandler}: QActionsMenuButtonP
); );
} }
export function QSavedFiltersMenuButton({isOpen, onClickHandler}: QActionsMenuButtonProps): JSX.Element export function QSavedViewsMenuButton({isOpen, onClickHandler}: QActionsMenuButtonProps): JSX.Element
{ {
return ( return (
<Box width={standardWidth} ml={1}> <Box width={standardWidth} ml={1}>
@ -132,9 +132,9 @@ export function QSavedFiltersMenuButton({isOpen, onClickHandler}: QActionsMenuBu
color="dark" color="dark"
onClick={onClickHandler} onClick={onClickHandler}
fullWidth fullWidth
startIcon={<Icon>filter_alt</Icon>} startIcon={<Icon>visibility</Icon>}
> >
saved&nbsp;filters&nbsp; Saved&nbsp;Views&nbsp;
<Icon>keyboard_arrow_down</Icon> <Icon>keyboard_arrow_down</Icon>
</MDButton> </MDButton>
</Box> </Box>

View File

@ -92,7 +92,7 @@ function QBreadcrumbs({icon, title, route, light}: Props): JSX.Element
let accumulatedPath = ""; let accumulatedPath = "";
for (let i = 0; i < routes.length; i++) for (let i = 0; i < routes.length; i++)
{ {
if(routes[i] === "savedFilter") if(routes[i] === "savedView")
{ {
continue; continue;
} }

View File

@ -177,7 +177,7 @@ public class QBaseSeleniumTest
.withRouteToFile("/metaData/table/city", "metaData/table/person.json") .withRouteToFile("/metaData/table/city", "metaData/table/person.json")
.withRouteToFile("/metaData/table/script", "metaData/table/script.json") .withRouteToFile("/metaData/table/script", "metaData/table/script.json")
.withRouteToFile("/metaData/table/scriptRevision", "metaData/table/scriptRevision.json") .withRouteToFile("/metaData/table/scriptRevision", "metaData/table/scriptRevision.json")
.withRouteToFile("/processes/querySavedFilter/init", "processes/querySavedFilter/init.json"); .withRouteToFile("/processes/querySavedView/init", "processes/querySavedView/init.json");
} }

View File

@ -55,7 +55,7 @@ public class QueryScreenFilterInUrlAdvancedModeTest extends QBaseSeleniumTest
.withRouteToFile("/data/person/query", "data/person/index.json") .withRouteToFile("/data/person/query", "data/person/index.json")
.withRouteToFile("/data/person/possibleValues/homeCityId", "data/person/possibleValues/homeCityId.json") .withRouteToFile("/data/person/possibleValues/homeCityId", "data/person/possibleValues/homeCityId.json")
.withRouteToFile("/data/person/variants", "data/person/variants.json") .withRouteToFile("/data/person/variants", "data/person/variants.json")
.withRouteToFile("/processes/querySavedFilter/init", "processes/querySavedFilter/init.json"); .withRouteToFile("/processes/querySavedView/init", "processes/querySavedView/init.json");
} }

View File

@ -55,7 +55,7 @@ public class QueryScreenFilterInUrlBasicModeTest extends QBaseSeleniumTest
.withRouteToFile("/data/person/query", "data/person/index.json") .withRouteToFile("/data/person/query", "data/person/index.json")
.withRouteToFile("/data/person/possibleValues/homeCityId", "data/person/possibleValues/homeCityId.json") .withRouteToFile("/data/person/possibleValues/homeCityId", "data/person/possibleValues/homeCityId.json")
.withRouteToFile("/data/person/variants", "data/person/variants.json") .withRouteToFile("/data/person/variants", "data/person/variants.json")
.withRouteToFile("/processes/querySavedFilter/init", "processes/querySavedFilter/init.json"); .withRouteToFile("/processes/querySavedView/init", "processes/querySavedView/init.json");
} }

View File

@ -48,7 +48,7 @@ public class QueryScreenTest extends QBaseSeleniumTest
.withRouteToFile("/data/person/count", "data/person/count.json") .withRouteToFile("/data/person/count", "data/person/count.json")
.withRouteToFile("/data/person/query", "data/person/index.json") .withRouteToFile("/data/person/query", "data/person/index.json")
.withRouteToFile("/data/person/variants", "data/person/variants.json") .withRouteToFile("/data/person/variants", "data/person/variants.json")
.withRouteToFile("/processes/querySavedFilter/init", "processes/querySavedFilter/init.json"); .withRouteToFile("/processes/querySavedView/init", "processes/querySavedView/init.json");
} }

View File

@ -29,9 +29,9 @@ import org.junit.jupiter.api.Test;
/******************************************************************************* /*******************************************************************************
** Test for Saved Filters functionality on the Query screen. ** Test for Saved View functionality on the Query screen.
*******************************************************************************/ *******************************************************************************/
public class SavedFiltersTest extends QBaseSeleniumTest public class SavedViewsTest extends QBaseSeleniumTest
{ {
/******************************************************************************* /*******************************************************************************
@ -69,7 +69,7 @@ public class SavedFiltersTest extends QBaseSeleniumTest
qSeleniumLib.gotoAndWaitForBreadcrumbHeader("/peopleApp/greetingsApp/person", "Person"); qSeleniumLib.gotoAndWaitForBreadcrumbHeader("/peopleApp/greetingsApp/person", "Person");
queryScreenLib.gotoAdvancedMode(); queryScreenLib.gotoAdvancedMode();
qSeleniumLib.waitForSelectorContaining("BUTTON", "Saved Filters").click(); qSeleniumLib.waitForSelectorContaining("BUTTON", "Saved Views").click();
qSeleniumLib.waitForSelectorContaining("LI", "Some People"); qSeleniumLib.waitForSelectorContaining("LI", "Some People");
//////////////////////////////////////// ////////////////////////////////////////
@ -78,15 +78,15 @@ public class SavedFiltersTest extends QBaseSeleniumTest
qSeleniumJavalin.stop(); qSeleniumJavalin.stop();
qSeleniumJavalin.clearRoutes(); qSeleniumJavalin.clearRoutes();
addStandardRoutesForThisTest(qSeleniumJavalin); addStandardRoutesForThisTest(qSeleniumJavalin);
qSeleniumJavalin.withRouteToFile("/processes/querySavedFilter/init", "processes/querySavedFilter/init-id=2.json"); qSeleniumJavalin.withRouteToFile("/processes/querySavedView/init", "processes/querySavedView/init-id=2.json");
qSeleniumJavalin.restart(); qSeleniumJavalin.restart();
/////////////////////////////////////////////////////// /////////////////////////////////////////////////////
// go to a specific filter - assert that it's loaded // // go to a specific view - assert that it's loaded //
/////////////////////////////////////////////////////// /////////////////////////////////////////////////////
qSeleniumLib.waitForSelectorContaining("LI", "Some People").click(); qSeleniumLib.waitForSelectorContaining("LI", "Some People").click();
qSeleniumLib.waitForCondition("Current URL should have filter id", () -> driver.getCurrentUrl().endsWith("/person/savedFilter/2")); qSeleniumLib.waitForCondition("Current URL should have view id", () -> driver.getCurrentUrl().endsWith("/person/savedView/2"));
qSeleniumLib.waitForSelectorContaining("DIV", "Current Filter: Some People"); qSeleniumLib.waitForSelectorContaining("DIV", "Current View: Some People");
////////////////////////////// //////////////////////////////
// click into a view screen // // click into a view screen //
@ -97,11 +97,11 @@ public class SavedFiltersTest extends QBaseSeleniumTest
///////////////////////////////////////////////////// /////////////////////////////////////////////////////
// take breadcrumb back to table query // // take breadcrumb back to table query //
// assert the previously selected filter is loaded // // assert the previously selected View is loaded //
///////////////////////////////////////////////////// /////////////////////////////////////////////////////
qSeleniumLib.waitForSelectorContaining("A", "Person").click(); qSeleniumLib.waitForSelectorContaining("A", "Person").click();
qSeleniumLib.waitForCondition("Current URL should have filter id", () -> driver.getCurrentUrl().endsWith("/person/savedFilter/2")); qSeleniumLib.waitForCondition("Current URL should have View id", () -> driver.getCurrentUrl().endsWith("/person/savedView/2"));
qSeleniumLib.waitForSelectorContaining("DIV", "Current Filter: Some People"); qSeleniumLib.waitForSelectorContaining("DIV", "Current View: Some People");
qSeleniumLib.waitForSelectorContaining(".MuiBadge-badge", "1"); qSeleniumLib.waitForSelectorContaining(".MuiBadge-badge", "1");
////////////////////// //////////////////////
@ -127,8 +127,8 @@ public class SavedFiltersTest extends QBaseSeleniumTest
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
qSeleniumJavalin.beginCapture(); qSeleniumJavalin.beginCapture();
qSeleniumLib.waitForSelectorContaining("A", "Person").click(); qSeleniumLib.waitForSelectorContaining("A", "Person").click();
qSeleniumLib.waitForCondition("Current URL should have filter id", () -> driver.getCurrentUrl().endsWith("/person/savedFilter/2")); qSeleniumLib.waitForCondition("Current URL should have filter id", () -> driver.getCurrentUrl().endsWith("/person/savedView/2"));
qSeleniumLib.waitForSelectorContaining("DIV", "Current Filter: Some People") qSeleniumLib.waitForSelectorContaining("DIV", "Current View: Some People")
.findElement(By.cssSelector("CIRCLE")); .findElement(By.cssSelector("CIRCLE"));
qSeleniumLib.waitForSelectorContaining(".MuiBadge-badge", "2"); qSeleniumLib.waitForSelectorContaining(".MuiBadge-badge", "2");
CapturedContext capturedContext = qSeleniumJavalin.waitForCapturedPath("/data/person/query"); CapturedContext capturedContext = qSeleniumJavalin.waitForCapturedPath("/data/person/query");
@ -136,7 +136,7 @@ public class SavedFiltersTest extends QBaseSeleniumTest
qSeleniumJavalin.endCapture(); qSeleniumJavalin.endCapture();
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
// navigate to the table with a filter in the URL // // navigate to the table with a View in the URL //
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
String filter = """ String filter = """
{ {
@ -152,7 +152,7 @@ public class SavedFiltersTest extends QBaseSeleniumTest
""".replace('\n', ' ').replaceAll(" ", ""); """.replace('\n', ' ').replaceAll(" ", "");
qSeleniumLib.gotoAndWaitForBreadcrumbHeader("/peopleApp/greetingsApp/person?filter=" + URLEncoder.encode(filter, StandardCharsets.UTF_8), "Person"); qSeleniumLib.gotoAndWaitForBreadcrumbHeader("/peopleApp/greetingsApp/person?filter=" + URLEncoder.encode(filter, StandardCharsets.UTF_8), "Person");
qSeleniumLib.waitForSelectorContaining(".MuiBadge-badge", "1"); qSeleniumLib.waitForSelectorContaining(".MuiBadge-badge", "1");
qSeleniumLib.waitForSelectorContainingToNotExist("DIV", "Current Filter"); qSeleniumLib.waitForSelectorContainingToNotExist("DIV", "Current View");
////////////////////////////// //////////////////////////////
// click into a view screen // // click into a view screen //
@ -166,7 +166,7 @@ public class SavedFiltersTest extends QBaseSeleniumTest
///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////
qSeleniumJavalin.beginCapture(); qSeleniumJavalin.beginCapture();
qSeleniumLib.waitForSelectorContaining("A", "Person").click(); qSeleniumLib.waitForSelectorContaining("A", "Person").click();
qSeleniumLib.waitForCondition("Current URL should not have filter id", () -> !driver.getCurrentUrl().endsWith("/person/savedFilter/2")); qSeleniumLib.waitForCondition("Current URL should not have filter id", () -> !driver.getCurrentUrl().endsWith("/person/savedView/2"));
qSeleniumLib.waitForSelectorContaining(".MuiBadge-badge", "1"); qSeleniumLib.waitForSelectorContaining(".MuiBadge-badge", "1");
capturedContext = qSeleniumJavalin.waitForCapturedPath("/data/person/query"); capturedContext = qSeleniumJavalin.waitForCapturedPath("/data/person/query");
assertTrue(capturedContext.getBody().matches("(?s).*id.*LESS_THAN.*10.*")); assertTrue(capturedContext.getBody().matches("(?s).*id.*LESS_THAN.*10.*"));

View File

@ -1,16 +1,16 @@
{ {
"values": { "values": {
"_qStepTimeoutMillis": "60000", "_qStepTimeoutMillis": "60000",
"savedFilterList": [ "savedViewList": [
{ {
"tableName": "savedFilter", "tableName": "savedView",
"values": { "values": {
"label": "Some People", "label": "Some People",
"id": 2, "id": 2,
"createDate": "2023-02-20T18:40:58Z", "createDate": "2023-02-20T18:40:58Z",
"modifyDate": "2023-02-20T18:40:58Z", "modifyDate": "2023-02-20T18:40:58Z",
"tableName": "person", "tableName": "person",
"filterJson": "{\"criteria\":[{\"fieldName\":\"firstName\",\"operator\":\"STARTS_WITH\",\"values\":[\"D\"]}],\"orderBys\":[{\"fieldName\":\"id\",\"isAscending\":false}],\"booleanOperator\":\"AND\"}", "filterJson": "{\"filter\":{\"criteria\":[{\"fieldName\":\"firstName\",\"operator\":\"STARTS_WITH\",\"values\":[\"D\"]}],\"orderBys\":[{\"fieldName\":\"id\",\"isAscending\":false}],\"booleanOperator\":\"AND\"}}",
"userId": "darin.kelkhoff@kingsrook.com" "userId": "darin.kelkhoff@kingsrook.com"
} }
} }

View File

@ -1,28 +1,28 @@
{ {
"values": { "values": {
"_qStepTimeoutMillis": "60000", "_qStepTimeoutMillis": "60000",
"savedFilterList": [ "savedViewList": [
{ {
"tableName": "savedFilter", "tableName": "savedView",
"values": { "values": {
"label": "All People", "label": "All People",
"id": 1, "id": 1,
"createDate": "2023-02-20T18:39:11Z", "createDate": "2023-02-20T18:39:11Z",
"modifyDate": "2023-02-20T18:39:11Z", "modifyDate": "2023-02-20T18:39:11Z",
"tableName": "person", "tableName": "person",
"filterJson": "{\"orderBys\":[{\"fieldName\":\"id\",\"isAscending\":false}],\"booleanOperator\":\"AND\"}", "filterJson": "{\"filter\":{\"orderBys\":[{\"fieldName\":\"id\",\"isAscending\":false}],\"booleanOperator\":\"AND\"}}",
"userId": "darin.kelkhoff@kingsrook.com" "userId": "darin.kelkhoff@kingsrook.com"
} }
}, },
{ {
"tableName": "savedFilter", "tableName": "savedView",
"values": { "values": {
"label": "Some People", "label": "Some People",
"id": 2, "id": 2,
"createDate": "2023-02-20T18:40:58Z", "createDate": "2023-02-20T18:40:58Z",
"modifyDate": "2023-02-20T18:40:58Z", "modifyDate": "2023-02-20T18:40:58Z",
"tableName": "person", "tableName": "person",
"filterJson": "{\"criteria\":[{\"fieldName\":\"firstName\",\"operator\":\"STARTS_WITH\",\"values\":[\"D\"]}],\"orderBys\":[{\"fieldName\":\"id\",\"isAscending\":false}],\"booleanOperator\":\"AND\"}", "filterJson": "{\"filter\":{\"criteria\":[{\"fieldName\":\"firstName\",\"operator\":\"STARTS_WITH\",\"values\":[\"D\"]}],\"orderBys\":[{\"fieldName\":\"id\",\"isAscending\":false}],\"booleanOperator\":\"AND\"}}",
"userId": "darin.kelkhoff@kingsrook.com" "userId": "darin.kelkhoff@kingsrook.com"
} }
} }