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.security;
17  
18  import org.jboss.arquillian.core.api.annotation.Inject;
19  import org.jboss.arquillian.graphene.page.Page;
20  import org.jboss.hal.testsuite.CrudOperations;
21  import org.jboss.hal.testsuite.container.WildFlyContainer;
22  import org.jboss.hal.testsuite.fragment.FormFragment;
23  import org.jboss.hal.testsuite.page.configuration.ElytronPage;
24  import org.jboss.hal.testsuite.test.Manatoko;
25  import org.junit.jupiter.api.BeforeEach;
26  import org.junit.jupiter.api.Test;
27  import org.testcontainers.junit.jupiter.Container;
28  import org.testcontainers.junit.jupiter.Testcontainers;
29  
30  import static org.jboss.hal.testsuite.container.WildFlyConfiguration.DEFAULT;
31  import static org.jboss.hal.testsuite.fixtures.SecurityFixtures.INITIAL_PROVIDERS;
32  import static org.jboss.hal.testsuite.fixtures.SecurityFixtures.SUBSYSTEM_ADDRESS;
33  
34  @Manatoko
35  @Testcontainers
36  class GlobalSettingsTest {
37  
38      @Container static WildFlyContainer wildFly = WildFlyContainer.standalone(DEFAULT);
39  
40      @Page private ElytronPage page;
41      @Inject private CrudOperations crudOperations;
42  
43      @BeforeEach
44      void prepare() {
45          page.navigate();
46      }
47  
48      @Test
49      public void update() throws Exception {
50          FormFragment form = page.getConfigurationForm();
51          crudOperations.update(SUBSYSTEM_ADDRESS, form, INITIAL_PROVIDERS, "openssl");
52      }
53  }