diff --git a/e2e-test/java/org/alfresco/rest/discovery/DiscoveryTests.java b/e2e-test/java/org/alfresco/rest/discovery/DiscoveryTests.java index 2328c3182..bb87dcec4 100644 --- a/e2e-test/java/org/alfresco/rest/discovery/DiscoveryTests.java +++ b/e2e-test/java/org/alfresco/rest/discovery/DiscoveryTests.java @@ -80,4 +80,24 @@ public class DiscoveryTests extends RestTest List modulesStates = restClient.onResponse().getResponse().jsonPath().getList("entry.repository.modules.installState", String.class); assertEquals(Collections.frequency(modulesStates, "INSTALLED"), 10); } + + @Test(groups = { TestGroup.REST_API, TestGroup.DISCOVERY, TestGroup.SANITY, TestGroup.CORE }) + @TestRail(section = { TestGroup.REST_API, TestGroup.DISCOVERY }, executionType = ExecutionType.SANITY, + description = "Sanity tests for GET /discovery endpoint") + public void getDefaultRepositoryInstalledModules() throws Exception + { + // Get repository info using Discovery API + restClient.authenticateUser(userModel).withDiscoveryAPI().getRepositoryInfo(); + restClient.assertStatusCodeIs(HttpStatus.OK); + + // Check that all modules are present + List modules = restClient.onResponse().getResponse().jsonPath().getList("entry.repository.modules.id", String.class); + assertTrue(modules.contains("alfresco-aos-module")); + assertTrue(modules.contains("org.alfresco.integrations.google.docs")); + assertTrue(modules.contains("alfresco-share-services")); + + // Check that all installed modules are in INSTALLED state + List modulesStates = restClient.onResponse().getResponse().jsonPath().getList("entry.repository.modules.installState", String.class); + assertEquals(Collections.frequency(modulesStates, "INSTALLED"), 3); + } }