use of pageobjects.licenses.LicensesPage in project sonarqube by SonarSource.
the class LicensesPageTest method change_licenses.
@Test
public void change_licenses() {
String EXAMPLE_LICENSE = "TmFtZTogRGV2ZWxvcHBlcnMKUGx1Z2luOiBhdXRvY29udHJvbApFeHBpcmVzOiAyMDEyLTA0LTAxCktleTogNjI5N2MxMzEwYzg2NDZiZTE5MDU1MWE4ZmZmYzk1OTBmYzEyYTIyMgo=";
LicensesPage page = nav.logIn().asAdmin().openLicenses();
LicenseItem licenseItem = page.getLicenseByKey("typed.license.secured");
licenseItem.setLicense(EXAMPLE_LICENSE);
ValuesWsResponse response = wsClient.settingsService().values(ValuesRequest.builder().setKeys("typed.license.secured").build());
assertThat(response.getSettings(0).getValue()).isEqualTo(EXAMPLE_LICENSE);
}
use of pageobjects.licenses.LicensesPage in project sonarqube by SonarSource.
the class LicensesPageTest method display_licenses.
@Test
public void display_licenses() {
LicensesPage page = nav.logIn().asAdmin().openLicenses();
page.getLicenses().shouldHaveSize(2);
page.getLicensesAsItems().get(0).getName().shouldHave(text("Typed property"));
page.getLicensesAsItems().get(1).getName().shouldHave(text("Property without license type"));
}
Aggregations