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.logging.subsystem;
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.container.WildFlyContainer;
22  import org.jboss.hal.testsuite.fixtures.LoggingFixtures;
23  import org.jboss.hal.testsuite.page.configuration.LoggingConfigurationPage;
24  import org.jboss.hal.testsuite.page.configuration.LoggingSubsystemConfigurationPage;
25  import org.jboss.hal.testsuite.test.Manatoko;
26  import org.jboss.hal.testsuite.test.configuration.logging.AbstractRootLoggerTest;
27  import org.testcontainers.junit.jupiter.Container;
28  import org.testcontainers.junit.jupiter.Testcontainers;
29  import org.wildfly.extras.creaper.core.online.operations.Address;
30  
31  import static org.jboss.hal.testsuite.container.WildFlyConfiguration.DEFAULT;
32  
33  @Manatoko
34  @Testcontainers
35  class RootLoggerTest extends AbstractRootLoggerTest {
36  
37      @Container static WildFlyContainer wildFly = WildFlyContainer.standalone(DEFAULT);
38  
39      @Inject Console console;
40      @Page LoggingSubsystemConfigurationPage page;
41  
42      @Override
43      protected Address rootLoggerAddress() {
44          return LoggingFixtures.ROOT_LOGGER_ADDRESS;
45      }
46  
47      @Override
48      protected void navigateToPage() {
49          page.navigate();
50          console.verticalNavigation().selectPrimary("logging-root-logger-item");
51      }
52  
53      @Override
54      protected LoggingConfigurationPage getPage() {
55          return page;
56      }
57  }