View Javadoc
1   /*
2    *  Copyright 2022 Red Hat
3    *
4    *  Licensed under the Apache License, Version 2.0 (the "License");
5    *  you may not use this file except in compliance with the License.
6    *  You may obtain a copy of the License at
7    *
8    *      https://www.apache.org/licenses/LICENSE-2.0
9    *
10   *  Unless required by applicable law or agreed to in writing, software
11   *  distributed under the License is distributed on an "AS IS" BASIS,
12   *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   *  See the License for the specific language governing permissions and
14   *  limitations under the License.
15   */
16  package org.jboss.hal.testsuite.test.configuration.ee;
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.EEPage;
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.EEFixtures.SUBSYSTEM_ADDRESS;
34  
35  @Manatoko
36  @Testcontainers
37  class EEAttributesTest {
38  
39      static final String ANNOTATION_PROPERTY_REPLACEMENT = "annotation-property-replacement";
40      @Container static WildFlyContainer wildFly = WildFlyContainer.standalone(DEFAULT);
41  
42      @Inject Console console;
43      @Inject CrudOperations crud;
44      @Page EEPage page;
45      FormFragment form;
46  
47      @BeforeEach
48      void prepare() {
49          page.navigate();
50          console.verticalNavigation().selectPrimary(Ids.EE_ATTRIBUTES_ITEM);
51          form = page.getAttributesForm();
52      }
53  
54      @Test
55      void update() throws Exception {
56          crud.update(SUBSYSTEM_ADDRESS, form, ANNOTATION_PROPERTY_REPLACEMENT, true);
57      }
58  
59      @Test
60      void reset() throws Exception {
61          crud.reset(SUBSYSTEM_ADDRESS, form);
62      }
63  }