1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.jboss.hal.testsuite.test.configuration.jca;
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.container.WildFlyContainer;
24 import org.jboss.hal.testsuite.fragment.FormFragment;
25 import org.jboss.hal.testsuite.page.configuration.JcaPage;
26 import org.jboss.hal.testsuite.test.Manatoko;
27 import org.junit.jupiter.api.BeforeAll;
28 import org.junit.jupiter.api.BeforeEach;
29 import org.junit.jupiter.api.Test;
30 import org.testcontainers.junit.jupiter.Container;
31 import org.testcontainers.junit.jupiter.Testcontainers;
32 import org.wildfly.extras.creaper.core.online.OnlineManagementClient;
33 import org.wildfly.extras.creaper.core.online.operations.Operations;
34
35 import static org.jboss.hal.testsuite.container.WildFlyConfiguration.DEFAULT;
36 import static org.jboss.hal.testsuite.fixtures.JcaFixtures.TRACER_ADDRESS;
37
38 @Manatoko
39 @Testcontainers
40 class RemoveTracerTest {
41
42 @Container static WildFlyContainer wildFly = WildFlyContainer.standalone(DEFAULT);
43
44 @BeforeAll
45 static void setupModel() throws Exception {
46 OnlineManagementClient client = wildFly.managementClient();
47 Operations operations = new Operations(client);
48 if (!operations.exists(TRACER_ADDRESS)) {
49 operations.add(TRACER_ADDRESS);
50 }
51 }
52
53 @Inject Console console;
54 @Inject CrudOperations crud;
55 @Page JcaPage page;
56 FormFragment form;
57
58 @BeforeEach
59 void setUp() {
60 page.navigate();
61 console.verticalNavigation().selectPrimary(Ids.JCA_TRACER_ITEM);
62 form = page.getTracerForm();
63 }
64
65 @Test
66 void delete() throws Exception {
67 crud.deleteSingleton(TRACER_ADDRESS, form);
68 }
69 }