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

@ -177,7 +177,7 @@ public class QBaseSeleniumTest
.withRouteToFile("/metaData/table/city", "metaData/table/person.json")
.withRouteToFile("/metaData/table/script", "metaData/table/script.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/possibleValues/homeCityId", "data/person/possibleValues/homeCityId.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/possibleValues/homeCityId", "data/person/possibleValues/homeCityId.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/query", "data/person/index.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");
queryScreenLib.gotoAdvancedMode();
qSeleniumLib.waitForSelectorContaining("BUTTON", "Saved Filters").click();
qSeleniumLib.waitForSelectorContaining("BUTTON", "Saved Views").click();
qSeleniumLib.waitForSelectorContaining("LI", "Some People");
////////////////////////////////////////
@ -78,15 +78,15 @@ public class SavedFiltersTest extends QBaseSeleniumTest
qSeleniumJavalin.stop();
qSeleniumJavalin.clearRoutes();
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();
///////////////////////////////////////////////////////
// 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.waitForCondition("Current URL should have filter id", () -> driver.getCurrentUrl().endsWith("/person/savedFilter/2"));
qSeleniumLib.waitForSelectorContaining("DIV", "Current Filter: Some People");
qSeleniumLib.waitForCondition("Current URL should have view id", () -> driver.getCurrentUrl().endsWith("/person/savedView/2"));
qSeleniumLib.waitForSelectorContaining("DIV", "Current View: Some People");
//////////////////////////////
// click into a view screen //
@ -97,11 +97,11 @@ public class SavedFiltersTest extends QBaseSeleniumTest
/////////////////////////////////////////////////////
// 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.waitForCondition("Current URL should have filter id", () -> driver.getCurrentUrl().endsWith("/person/savedFilter/2"));
qSeleniumLib.waitForSelectorContaining("DIV", "Current Filter: Some People");
qSeleniumLib.waitForCondition("Current URL should have View id", () -> driver.getCurrentUrl().endsWith("/person/savedView/2"));
qSeleniumLib.waitForSelectorContaining("DIV", "Current View: Some People");
qSeleniumLib.waitForSelectorContaining(".MuiBadge-badge", "1");
//////////////////////
@ -127,8 +127,8 @@ public class SavedFiltersTest extends QBaseSeleniumTest
///////////////////////////////////////////////////////////////////////////////
qSeleniumJavalin.beginCapture();
qSeleniumLib.waitForSelectorContaining("A", "Person").click();
qSeleniumLib.waitForCondition("Current URL should have filter id", () -> driver.getCurrentUrl().endsWith("/person/savedFilter/2"));
qSeleniumLib.waitForSelectorContaining("DIV", "Current Filter: Some People")
qSeleniumLib.waitForCondition("Current URL should have filter id", () -> driver.getCurrentUrl().endsWith("/person/savedView/2"));
qSeleniumLib.waitForSelectorContaining("DIV", "Current View: Some People")
.findElement(By.cssSelector("CIRCLE"));
qSeleniumLib.waitForSelectorContaining(".MuiBadge-badge", "2");
CapturedContext capturedContext = qSeleniumJavalin.waitForCapturedPath("/data/person/query");
@ -136,7 +136,7 @@ public class SavedFiltersTest extends QBaseSeleniumTest
qSeleniumJavalin.endCapture();
////////////////////////////////////////////////////
// navigate to the table with a filter in the URL //
// navigate to the table with a View in the URL //
////////////////////////////////////////////////////
String filter = """
{
@ -152,7 +152,7 @@ public class SavedFiltersTest extends QBaseSeleniumTest
""".replace('\n', ' ').replaceAll(" ", "");
qSeleniumLib.gotoAndWaitForBreadcrumbHeader("/peopleApp/greetingsApp/person?filter=" + URLEncoder.encode(filter, StandardCharsets.UTF_8), "Person");
qSeleniumLib.waitForSelectorContaining(".MuiBadge-badge", "1");
qSeleniumLib.waitForSelectorContainingToNotExist("DIV", "Current Filter");
qSeleniumLib.waitForSelectorContainingToNotExist("DIV", "Current View");
//////////////////////////////
// click into a view screen //
@ -166,7 +166,7 @@ public class SavedFiltersTest extends QBaseSeleniumTest
/////////////////////////////////////////////////////////////////////////////////
qSeleniumJavalin.beginCapture();
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");
capturedContext = qSeleniumJavalin.waitForCapturedPath("/data/person/query");
assertTrue(capturedContext.getBody().matches("(?s).*id.*LESS_THAN.*10.*"));

View File

@ -1,16 +1,16 @@
{
"values": {
"_qStepTimeoutMillis": "60000",
"savedFilterList": [
"savedViewList": [
{
"tableName": "savedFilter",
"tableName": "savedView",
"values": {
"label": "Some People",
"id": 2,
"createDate": "2023-02-20T18:40:58Z",
"modifyDate": "2023-02-20T18:40:58Z",
"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"
}
}

View File

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