use of org.jenkinsci.test.acceptance.po.User in project acceptance-test-harness by jenkinsci.
the class LdapPluginTest method custom_mail_filter.
@Test
public void custom_mail_filter() {
// Given
useLdapAsSecurityRealm(createDefaults(ldap.get()).mailAdressAttributeName("givenName"));
// When
Login login = jenkins.login();
login.doLogin("jenkins", "root");
User userJenkins = new User(jenkins, "jenkins");
// Then
assertThat(userJenkins, mailAddressIs("givenname@mailaddress.com"));
}
use of org.jenkinsci.test.acceptance.po.User in project acceptance-test-harness by jenkinsci.
the class JenkinsDatabaseSecurityRealmTest method login_and_logout.
@Test
public // @Category(SmokeTest.class)
void login_and_logout() {
User user = realm.signup().fullname(FULL_NAME).email(EMAIL).password(PWD).signup(NAME);
jenkins.login().doLogin(user.id(), PWD);
assertEquals(user, jenkins.getCurrentUser());
jenkins.logout();
assertEquals(null, jenkins.getCurrentUser().id());
}
use of org.jenkinsci.test.acceptance.po.User in project acceptance-test-harness by jenkinsci.
the class LdapPluginTest method resolve_group_memberships_with_defaults.
@Test
public void resolve_group_memberships_with_defaults() {
// Given
useLdapAsSecurityRealm(createDefaults(ldap.get()));
// When
Login login = jenkins.login();
login.doLogin("jenkins", "root");
User userJenkins = new User(jenkins, "jenkins");
// Then
assertThat(userJenkins, isMemberOf("ldap1"));
assertThat(userJenkins, isMemberOf("ldap2"));
}
use of org.jenkinsci.test.acceptance.po.User in project acceptance-test-harness by jenkinsci.
the class LdapPluginTest method resolve_group_memberships_with_defaults_negative.
@Test
public void resolve_group_memberships_with_defaults_negative() {
// Given
useLdapAsSecurityRealm(createDefaults(ldap.get()));
// When
Login login = jenkins.login();
login.doLogin("homer", "cisco");
User homer = new User(jenkins, "homer");
// Then
assertThat(homer, isMemberOf("ldap2"));
assertThat(homer, not(isMemberOf("ldap1")));
}
use of org.jenkinsci.test.acceptance.po.User in project acceptance-test-harness by jenkinsci.
the class LdapPluginTest method resolve_display_name_with_defaults.
@Test
@Issue("JENKINS-18355")
public void resolve_display_name_with_defaults() {
// Given
useLdapAsSecurityRealm(createDefaults(ldap.get()));
// When
Login login = jenkins.login();
login.doLogin("jenkins", "root");
User userJenkins = new User(jenkins, "jenkins");
// Then
assertThat(userJenkins, fullNameIs("Jenkins displayname"));
}
Aggregations