1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.jboss.hal.testsuite.test.configuration.transaction;
17
18 import org.jboss.arquillian.core.api.annotation.Inject;
19 import org.jboss.arquillian.graphene.page.Page;
20 import org.jboss.hal.resources.Ids;
21 import org.jboss.hal.testsuite.Console;
22 import org.jboss.hal.testsuite.CrudOperations;
23 import org.jboss.hal.testsuite.Random;
24 import org.jboss.hal.testsuite.container.WildFlyContainer;
25 import org.jboss.hal.testsuite.fixtures.PathsFixtures;
26 import org.jboss.hal.testsuite.fixtures.TransactionFixtures;
27 import org.jboss.hal.testsuite.page.configuration.TransactionPage;
28 import org.jboss.hal.testsuite.test.Manatoko;
29 import org.junit.jupiter.api.BeforeAll;
30 import org.junit.jupiter.api.BeforeEach;
31 import org.junit.jupiter.api.Test;
32 import org.testcontainers.junit.jupiter.Container;
33 import org.testcontainers.junit.jupiter.Testcontainers;
34 import org.wildfly.extras.creaper.core.online.OnlineManagementClient;
35 import org.wildfly.extras.creaper.core.online.operations.Operations;
36 import org.wildfly.extras.creaper.core.online.operations.Values;
37
38 import static org.jboss.hal.testsuite.container.WildFlyConfiguration.DEFAULT;
39
40 @Manatoko
41 @Testcontainers
42 class PathTest {
43
44 @Container static WildFlyContainer wildFly = WildFlyContainer.standalone(DEFAULT);
45
46 @BeforeAll
47 static void setupModel() throws Exception {
48 OnlineManagementClient client = wildFly.managementClient();
49 Operations operations = new Operations(client);
50 operations.add(PathsFixtures.pathAddress(TransactionFixtures.PATH_EDIT), Values.of("value", Random.name()));
51 }
52
53 @Inject Console console;
54 @Inject CrudOperations crudOperations;
55 @Page TransactionPage page;
56
57 @BeforeEach
58 void prepare() {
59 page.navigate();
60 console.verticalNavigation()
61 .selectPrimary(Ids.build("tx", "path", "config", "item"));
62 }
63
64 @Test
65 void editObjectStorePath() throws Exception {
66 crudOperations.update(TransactionFixtures.TRANSACTIONS_ADDRESS, page.getPathForm(), "object-store-path");
67 }
68
69 @Test
70 void editObjectStoreRelativeTo() throws Exception {
71 crudOperations.update(TransactionFixtures.TRANSACTIONS_ADDRESS, page.getPathForm(),
72 TransactionFixtures.OBJECT_STORE_RELATIVE_TO);
73 }
74 }