mirror of
https://github.com/Kingsrook/qqq-frontend-material-dashboard.git
synced 2025-07-18 05:10:45 +00:00
Merge branch 'feature/CTLE-434-oms-update-business-logic' into integration/sprint-26
This commit is contained in:
@ -74,7 +74,8 @@ public class QBaseSeleniumTest
|
||||
.withRouteToFile("/metaData", "metaData/index.json")
|
||||
.withRouteToFile("/metaData/authentication", "metaData/authentication.json")
|
||||
.withRouteToFile("/metaData/table/person", "metaData/table/person.json")
|
||||
.withRouteToFile("/metaData/table/city", "metaData/table/person.json");
|
||||
.withRouteToFile("/metaData/table/city", "metaData/table/person.json")
|
||||
.withRouteToFile("/processes/querySavedFilter/init", "processes/querySavedFilter/init.json");
|
||||
}
|
||||
|
||||
|
||||
|
@ -3,10 +3,11 @@ package com.kingsrook.qqq.materialdashboard.lib.javalin;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.kingsrook.qqq.materialdashboard.lib.QSeleniumLib;
|
||||
import io.javalin.Javalin;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.eclipse.jetty.server.Connector;
|
||||
@ -25,8 +26,8 @@ public class QSeleniumJavalin
|
||||
|
||||
private long WAIT_SECONDS = 10;
|
||||
|
||||
private List<Pair<String, String>> routesToFiles = new ArrayList<>();
|
||||
private List<Pair<String, String>> routesToStrings = new ArrayList<>();
|
||||
private Map<String, String> routesToFiles = new LinkedHashMap<>();
|
||||
private Map<String, String> routesToStrings = new LinkedHashMap<>();
|
||||
|
||||
private Javalin javalin;
|
||||
|
||||
@ -71,9 +72,9 @@ public class QSeleniumJavalin
|
||||
{
|
||||
if(this.routesToFiles == null)
|
||||
{
|
||||
this.routesToFiles = new ArrayList<>();
|
||||
this.routesToFiles = new LinkedHashMap<>();
|
||||
}
|
||||
this.routesToFiles.add(Pair.of(path, fixtureFilePath));
|
||||
this.routesToFiles.put(path, fixtureFilePath);
|
||||
return (this);
|
||||
}
|
||||
|
||||
@ -86,9 +87,9 @@ public class QSeleniumJavalin
|
||||
{
|
||||
if(this.routesToStrings == null)
|
||||
{
|
||||
this.routesToStrings = new ArrayList<>();
|
||||
this.routesToStrings = new LinkedHashMap<>();
|
||||
}
|
||||
this.routesToStrings.add(Pair.of(path, responseString));
|
||||
this.routesToStrings.put(path, responseString);
|
||||
return (this);
|
||||
}
|
||||
|
||||
@ -105,11 +106,11 @@ public class QSeleniumJavalin
|
||||
{
|
||||
javalin.routes(() ->
|
||||
{
|
||||
for(Pair<String, String> routeToFile : routesToFiles)
|
||||
for(Map.Entry<String, String> routeToFile : routesToFiles.entrySet())
|
||||
{
|
||||
LOG.debug("Setting up route for [" + routeToFile.getKey() + "] => [" + routeToFile.getValue() + "]");
|
||||
get(routeToFile.getKey(), new RouteFromFileHandler(this, routeToFile));
|
||||
post(routeToFile.getKey(), new RouteFromFileHandler(this, routeToFile));
|
||||
get(routeToFile.getKey(), new RouteFromFileHandler(this, routeToFile.getKey(), routeToFile.getValue()));
|
||||
post(routeToFile.getKey(), new RouteFromFileHandler(this, routeToFile.getKey(), routeToFile.getValue()));
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -118,11 +119,11 @@ public class QSeleniumJavalin
|
||||
{
|
||||
javalin.routes(() ->
|
||||
{
|
||||
for(Pair<String, String> routeToString : routesToStrings)
|
||||
for(Map.Entry<String, String> routeToString : routesToStrings.entrySet())
|
||||
{
|
||||
LOG.debug("Setting up route for [" + routeToString.getKey() + "] => [" + routeToString.getValue() + "]");
|
||||
get(routeToString.getKey(), new RouteFromStringHandler(this, routeToString));
|
||||
post(routeToString.getKey(), new RouteFromStringHandler(this, routeToString));
|
||||
get(routeToString.getKey(), new RouteFromStringHandler(this, routeToString.getKey(), routeToString.getValue()));
|
||||
post(routeToString.getKey(), new RouteFromStringHandler(this, routeToString.getKey(), routeToString.getValue()));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -6,7 +6,6 @@ import java.util.List;
|
||||
import io.javalin.http.Context;
|
||||
import io.javalin.http.Handler;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
@ -28,11 +27,11 @@ public class RouteFromFileHandler implements Handler
|
||||
** Constructor
|
||||
**
|
||||
*******************************************************************************/
|
||||
public RouteFromFileHandler(QSeleniumJavalin qSeleniumJavalin, Pair<String, String> routeToFilePath)
|
||||
public RouteFromFileHandler(QSeleniumJavalin qSeleniumJavalin, String route, String filePath)
|
||||
{
|
||||
this.qSeleniumJavalin = qSeleniumJavalin;
|
||||
this.route = routeToFilePath.getKey();
|
||||
this.filePath = routeToFilePath.getValue();
|
||||
this.route = route;
|
||||
this.filePath = filePath;
|
||||
}
|
||||
|
||||
|
||||
|
@ -3,7 +3,6 @@ package com.kingsrook.qqq.materialdashboard.lib.javalin;
|
||||
|
||||
import io.javalin.http.Context;
|
||||
import io.javalin.http.Handler;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
@ -25,11 +24,11 @@ public class RouteFromStringHandler implements Handler
|
||||
** Constructor
|
||||
**
|
||||
*******************************************************************************/
|
||||
public RouteFromStringHandler(QSeleniumJavalin qSeleniumJavalin, Pair<String, String> routeToStringPath)
|
||||
public RouteFromStringHandler(QSeleniumJavalin qSeleniumJavalin, String route, String responseString)
|
||||
{
|
||||
this.qSeleniumJavalin = qSeleniumJavalin;
|
||||
this.route = routeToStringPath.getKey();
|
||||
this.responseString = routeToStringPath.getValue();
|
||||
this.route = route;
|
||||
this.responseString = responseString;
|
||||
}
|
||||
|
||||
|
||||
|
@ -39,7 +39,6 @@ public class BulkEditTest extends QBaseSeleniumTest
|
||||
@Override
|
||||
protected void addJavalinRoutes(QSeleniumJavalin qSeleniumJavalin)
|
||||
{
|
||||
super.addJavalinRoutes(qSeleniumJavalin);
|
||||
addCommonRoutesForThisTest(qSeleniumJavalin);
|
||||
qSeleniumJavalin
|
||||
.withRouteToFile("/metaData/process/person.bulkEdit", "metaData/process/person.bulkEdit.json")
|
||||
@ -56,8 +55,10 @@ public class BulkEditTest extends QBaseSeleniumTest
|
||||
*******************************************************************************/
|
||||
private void addCommonRoutesForThisTest(QSeleniumJavalin qSeleniumJavalin)
|
||||
{
|
||||
super.addJavalinRoutes(qSeleniumJavalin);
|
||||
qSeleniumJavalin.withRouteToFile("/data/person/count", "data/person/count.json");
|
||||
qSeleniumJavalin.withRouteToFile("/data/person/query", "data/person/index.json");
|
||||
qSeleniumJavalin.withRouteToString("/processes/person.bulkEdit/74a03a7d-2f53-4784-9911-3a21f7646c43/records", "[]");
|
||||
}
|
||||
|
||||
|
||||
|
@ -46,7 +46,6 @@ public class SavedFiltersTest extends QBaseSeleniumTest
|
||||
protected void addJavalinRoutes(QSeleniumJavalin qSeleniumJavalin)
|
||||
{
|
||||
addStandardRoutesForThisTest(qSeleniumJavalin);
|
||||
qSeleniumJavalin.withRouteToFile("/processes/querySavedFilter/init", "processes/querySavedFilter/init.json");
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user