diff --git a/pom.xml b/pom.xml index 52cedf8d..9457ed1e 100644 --- a/pom.xml +++ b/pom.xml @@ -187,10 +187,10 @@ target/jacoco-ut - ch/ethz/seb/sebserver/gui/content/* - ch/ethz/seb/sebserver/gui/form/* - ch/ethz/seb/sebserver/gui/table/* - ch/ethz/seb/sebserver/gui/widget/* + ch/ethz/seb/sebserver/gui/content/**/* + ch/ethz/seb/sebserver/gui/form/**/* + ch/ethz/seb/sebserver/gui/table/**/* + ch/ethz/seb/sebserver/gui/widget/**/* @@ -199,6 +199,12 @@ ch/ethz/seb/sebserver/* + + ch/ethz/seb/sebserver/gui/content/**/* + ch/ethz/seb/sebserver/gui/form/**/* + ch/ethz/seb/sebserver/gui/table/**/* + ch/ethz/seb/sebserver/gui/widget/**/* + target/jacoco.exec diff --git a/src/test/java/ch/ethz/seb/sebserver/gui/integration/UseCasesIntegrationTest.java b/src/test/java/ch/ethz/seb/sebserver/gui/integration/UseCasesIntegrationTest.java index acc1cec6..4f7498f6 100644 --- a/src/test/java/ch/ethz/seb/sebserver/gui/integration/UseCasesIntegrationTest.java +++ b/src/test/java/ch/ethz/seb/sebserver/gui/integration/UseCasesIntegrationTest.java @@ -963,7 +963,8 @@ public class UseCasesIntegrationTest extends GuiIntegrationTest { new SaveExamConfigTableValues(), new GetConfigurationValues(), new ActivateExamConfig(), - new DeactivateExamConfig()); + new DeactivateExamConfig(), + new GetUserAccountNames()); final Result newConfigResponse = restService .getBuilder(NewExamConfig.class) @@ -971,12 +972,25 @@ public class UseCasesIntegrationTest extends GuiIntegrationTest { .withFormParam(Domain.CONFIGURATION_NODE.ATTR_DESCRIPTION, "This is a New Exam Config") .call(); + // get user id + final String userId = restService + .getBuilder(GetUserAccountNames.class) + .call() + .getOrThrow() + .stream() + .filter(userName -> "examAdmin2".equals(userName.name)) + .map(EntityName::getModelId) + .findFirst() + .orElse(null); + + assertNotNull(userId); + assertNotNull(newConfigResponse); assertFalse(newConfigResponse.hasError()); final ConfigurationNode newConfig = newConfigResponse.get(); assertEquals("New Exam Config", newConfig.name); assertEquals(Long.valueOf(0), newConfig.templateId); - + assertEquals(userId, newConfig.owner); } }