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