diff --git a/Plan/common/src/test/java/com/djrapitops/plan/db/DatabaseTest.java b/Plan/common/src/test/java/com/djrapitops/plan/db/DatabaseTest.java index 5dd085e48..713ceb1c1 100644 --- a/Plan/common/src/test/java/com/djrapitops/plan/db/DatabaseTest.java +++ b/Plan/common/src/test/java/com/djrapitops/plan/db/DatabaseTest.java @@ -1234,6 +1234,11 @@ public interface DatabaseTest { OptionalAssert.equals("0.5", tabData.getDouble("doubleVal_total").map(data -> data.getFormattedValue(Objects::toString))); OptionalAssert.equals("5", tabData.getNumber("value_avg").map(data -> data.getFormattedValue(Objects::toString))); OptionalAssert.equals("5", tabData.getNumber("value_total").map(data -> data.getFormattedValue(Objects::toString))); + + List tableData = tabData.getTableData(); + assertEquals(1, tableData.size()); + TableContainer table = tableData.get(0).getHtmlTable(); + assertEquals("Group1", table.parseBody()); } @Test @@ -1268,7 +1273,6 @@ public interface DatabaseTest { } default void checkThatPlayerDataExists(boolean condition) { - // TODO Add Group data to this test if (condition) { // Condition is true, conditional values exist List ofServer = db().query(new ExtensionPlayerDataQuery(playerUUID)).get(serverUUID()); assertTrue(ofServer != null && !ofServer.isEmpty() && !ofServer.get(0).getTabs().isEmpty(), "There was no data left"); @@ -1277,6 +1281,7 @@ public interface DatabaseTest { OptionalAssert.equals("Yes", tabData.getBoolean("isCondition").map(ExtensionBooleanData::getFormattedValue)); OptionalAssert.equals("Conditional", tabData.getString("conditionalValue").map(ExtensionStringData::getFormattedValue)); OptionalAssert.equals("unconditional", tabData.getString("unconditional").map(ExtensionStringData::getFormattedValue)); // Was not removed + OptionalAssert.equals("Group", tabData.getString("conditionalGroups").map(ExtensionStringData::getFormattedValue)); // Was not removed assertFalse(tabData.getString("reversedConditionalValue").isPresent(), "Value was not removed: reversedConditionalValue"); } else { // Condition is false, reversed conditional values exist List ofServer = db().query(new ExtensionPlayerDataQuery(playerUUID)).get(serverUUID()); @@ -1286,6 +1291,7 @@ public interface DatabaseTest { OptionalAssert.equals("Reversed", tabData.getString("reversedConditionalValue").map(ExtensionStringData::getFormattedValue)); OptionalAssert.equals("unconditional", tabData.getString("unconditional").map(ExtensionStringData::getFormattedValue)); // Was not removed assertFalse(tabData.getString("conditionalValue").isPresent(), "Value was not removed: conditionalValue"); + assertFalse(tabData.getString("conditionalGroups").isPresent(), "Value was not removed: conditionalGroups"); } }