1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.jboss.hal.testsuite.test.configuration.remoting;
17
18 import org.jboss.arquillian.core.api.annotation.Inject;
19 import org.jboss.arquillian.graphene.page.Page;
20 import org.jboss.hal.testsuite.Console;
21 import org.jboss.hal.testsuite.CrudOperations;
22 import org.jboss.hal.testsuite.Random;
23 import org.jboss.hal.testsuite.container.WildFlyContainer;
24 import org.jboss.hal.testsuite.fragment.FormFragment;
25 import org.jboss.hal.testsuite.page.configuration.RemotingPage;
26 import org.jboss.hal.testsuite.test.Manatoko;
27 import org.junit.jupiter.api.BeforeEach;
28 import org.junit.jupiter.api.Test;
29 import org.testcontainers.junit.jupiter.Container;
30 import org.testcontainers.junit.jupiter.Testcontainers;
31
32 import static org.jboss.hal.testsuite.container.WildFlyConfiguration.DEFAULT;
33 import static org.jboss.hal.testsuite.fixtures.RemotingFixtures.AUTH_REALM;
34 import static org.jboss.hal.testsuite.fixtures.RemotingFixtures.BUFFER_REGION_SIZE;
35 import static org.jboss.hal.testsuite.fixtures.RemotingFixtures.MAX_INBOUND_CHANNELS;
36 import static org.jboss.hal.testsuite.fixtures.RemotingFixtures.SUBSYSTEM_ADDRESS;
37
38 @Manatoko
39 @Testcontainers
40 class ConfigurationTest {
41
42 @Container static WildFlyContainer wildFly = WildFlyContainer.standalone(DEFAULT);
43
44 @Inject Console console;
45 @Inject CrudOperations crud;
46 @Page RemotingPage page;
47
48 @BeforeEach
49 void prepare() {
50 page.navigate();
51 console.verticalNavigation().selectPrimary("remoting-configuration-item");
52 }
53
54 @Test
55 void updateAttributes() throws Exception {
56 page.getConfigurationTabs().select("remoting-configuration-attributes-tab");
57 FormFragment form = page.getConfigurationAttributesForm();
58 crud.update(SUBSYSTEM_ADDRESS, form, BUFFER_REGION_SIZE, Random.number());
59 }
60
61 @Test
62 void updateSecurity() throws Exception {
63 page.getConfigurationTabs().select("remoting-configuration-security-tab");
64 FormFragment form = page.getConfigurationSecurityForm();
65 crud.update(SUBSYSTEM_ADDRESS, form, AUTH_REALM, Random.name());
66 }
67
68 @Test
69 void updateChannels() throws Exception {
70 page.getConfigurationTabs().select("remoting-configuration-channels-tab");
71 FormFragment form = page.getConfigurationChannelsForm();
72 crud.update(SUBSYSTEM_ADDRESS, form, MAX_INBOUND_CHANNELS, Random.number());
73 }
74 }