use of pageobjects.Navigation in project sonarqube by SonarSource.
the class QualityProfilesPageTest method testNotFound.
@Test
public void testNotFound() {
Navigation nav = Navigation.get(orchestrator);
nav.open("/profiles/show?key=unknown");
$(".quality-profile-not-found").should(Condition.visible);
}
use of pageobjects.Navigation in project sonarqube by SonarSource.
the class SettingsTestRestartingOrchestrator method test_settings.
@Test
public void test_settings() throws UnsupportedEncodingException {
URL secretKeyUrl = getClass().getResource("/settings/SettingsTest/sonar-secret.txt");
orchestrator = Orchestrator.builderEnv().addPlugin(pluginArtifact("settings-plugin")).addPlugin(pluginArtifact("license-plugin")).setServerProperty("sonar.secretKeyPath", secretKeyUrl.getFile()).build();
orchestrator.start();
Navigation nav = Navigation.get(orchestrator).openHomepage().logIn().asAdmin();
nav.openSettings(null).assertMenuContains("General").assertSettingDisplayed("sonar.dbcleaner.cleanDirectory").assertSettingNotDisplayed("settings.extension.hidden").assertSettingNotDisplayed("settings.extension.global");
EncryptionPage encryptionPage = nav.openEncryption();
assertThat(encryptionPage.encryptValue("clear")).isEqualTo("{aes}4aQbfYe1lrEjiRzv/ETbyg==");
encryptionPage.generateNewKey();
encryptionPage.generationForm().shouldBe(visible).submit();
encryptionPage.generationForm().shouldNotBe(visible);
encryptionPage.newSecretKey().shouldBe(visible);
}
use of pageobjects.Navigation in project sonarqube by SonarSource.
the class LocalAuthenticationTest method log_in_with_correct_credentials_then_log_out.
@Test
public void log_in_with_correct_credentials_then_log_out() {
nav.shouldNotBeLoggedIn();
Navigation page = nav.logIn().submitCredentials(LOGIN, "123456");
page.getRightBar().shouldHave(Condition.text(LOGIN));
nav.shouldBeLoggedIn();
nav.logOut();
nav.shouldNotBeLoggedIn();
}
use of pageobjects.Navigation in project sonarqube by SonarSource.
the class ProjectDashboardTest method display_a_nice_error_when_requesting_unknown_project.
@Test
@Ignore("there is no more place to show the error")
public void display_a_nice_error_when_requesting_unknown_project() {
Navigation nav = Navigation.get(orchestrator);
nav.open("/dashboard/index?id=unknown");
nav.getErrorMessage().should(text("The requested project does not exist. Either it has never been analyzed successfully or it has been deleted."));
// TODO verify that on global homepage
}
use of pageobjects.Navigation in project sonarqube by SonarSource.
the class ProjectDashboardTest method display_size.
@Test
public void display_size() {
executeBuild("shared/xoo-sample", "sample", "Sample");
Navigation nav = Navigation.get(orchestrator);
ProjectDashboardPage page = nav.openProjectDashboard("sample");
page.getLinesOfCode().should(hasText("13"));
page.getLanguageDistribution().should(hasText("Xoo"), hasText("13"));
}
Aggregations