Search in sources :

Example 6 with Navigation

use of pageobjects.Navigation in project sonarqube by SonarSource.

the class ServerSystemTest method generate_server_id.

@Test
public void generate_server_id() throws IOException {
    Navigation nav = Navigation.get(orchestrator).openHomepage().logIn().asAdmin();
    String validIpAddress = getValidIpAddress();
    nav.openServerId().setOrganization("Name with invalid chars like $").setIpAddress(validIpAddress).submitForm().assertError();
    nav.openServerId().setOrganization("DEMO").setIpAddress("invalid_address").submitForm().assertError();
    ServerIdPage page = nav.openServerId().setOrganization("DEMO").setIpAddress(validIpAddress).submitForm();
    String serverId = page.serverIdInput().val();
    assertThat(serverId).isNotEmpty();
}
Also used : Navigation(pageobjects.Navigation) ServerIdPage(pageobjects.ServerIdPage) Test(org.junit.Test)

Example 7 with Navigation

use of pageobjects.Navigation in project sonarqube by SonarSource.

the class ForceAuthenticationTest method redirect_to_login_page.

@Test
public void redirect_to_login_page() {
    Navigation page = nav.openHomepage();
    page.shouldBeRedirectToLogin();
    page.openLogin().submitCredentials("admin", "admin").shouldBeLoggedIn();
    page.logOut().shouldBeRedirectToLogin();
}
Also used : Navigation(pageobjects.Navigation) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)7 Navigation (pageobjects.Navigation)7 URL (java.net.URL)1 Ignore (org.junit.Ignore)1 EncryptionPage (pageobjects.EncryptionPage)1 ProjectDashboardPage (pageobjects.ProjectDashboardPage)1 ServerIdPage (pageobjects.ServerIdPage)1