use of pageobjects.ServerIdPage 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();
}
Aggregations