Handle GitHub logout properly (#22463)

Add profile info update to GitHub login test cases

Closes #22461

Signed-off-by: Tomas Ondrusko <tondrusk@redhat.com>
This commit is contained in:
Tomas Ondrusko 2023-08-28 10:06:12 +02:00 committed by GitHub
parent c6da903ac1
commit e70ffd0105
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

@ -50,6 +50,8 @@ public class GitHubLoginPage extends AbstractSocialLoginPage {
public void logout() {
log.info("performing logout from GitHub");
URLUtils.navigateToUri("https://github.com/logout");
UIUtils.clickLink(logoutButton);
if (URLUtils.currentUrlEquals("https://github.com/logout")) {
UIUtils.clickLink(logoutButton);
}
}
}

View file

@ -372,6 +372,7 @@ public class SocialLoginTest extends AbstractKeycloakTest {
public void githubLogin() throws InterruptedException {
setTestProvider(GITHUB);
performLogin();
assertUpdateProfile(true, true, false);
appPage.assertCurrent();
testTokenExchange();
}
@ -380,6 +381,7 @@ public class SocialLoginTest extends AbstractKeycloakTest {
public void githubPrivateEmailLogin() throws InterruptedException {
setTestProvider(GITHUB_PRIVATE_EMAIL);
performLogin();
assertUpdateProfile(true, true, false);
appPage.assertCurrent();
}