Skip to content

Commit

Permalink
Revert "Temporarily disable integration tests in demo-authorizationse…
Browse files Browse the repository at this point in the history
…rver sample"

This reverts commit d25331c.
  • Loading branch information
jgrandja committed Mar 16, 2024
1 parent d25331c commit 0d7ba70
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public void setUp() {
this.webClient.getCookieManager().clearCookies(); // log out
}

// @Test
@Test
public void whenLoginSuccessfulThenDisplayBadRequestError() throws IOException {
HtmlPage page = this.webClient.getPage("/");

Expand All @@ -79,7 +79,7 @@ public void whenLoginSuccessfulThenDisplayBadRequestError() throws IOException {
assertThat(signInResponse.getStatusCode()).isEqualTo(HttpStatus.BAD_REQUEST.value()); // there is no "default" index page
}

// @Test
@Test
public void whenLoginFailsThenDisplayBadCredentials() throws IOException {
HtmlPage page = this.webClient.getPage("/");

Expand All @@ -90,14 +90,14 @@ public void whenLoginFailsThenDisplayBadCredentials() throws IOException {
assertThat(alert.asNormalizedText()).isEqualTo("Invalid username or password.");
}

// @Test
@Test
public void whenNotLoggedInAndRequestingTokenThenRedirectsToLogin() throws IOException {
HtmlPage page = this.webClient.getPage(AUTHORIZATION_REQUEST);

assertLoginPage(page);
}

// @Test
@Test
public void whenLoggingInAndRequestingTokenThenRedirectsToClientApplication() throws IOException {
// Log in
this.webClient.getOptions().setThrowExceptionOnFailingStatusCode(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public void setUp() {
when(this.authorizationConsentService.findById(any(), any())).thenReturn(null);
}

// @Test
@Test
@WithMockUser("user1")
public void whenUserConsentsToAllScopesThenReturnAuthorizationCode() throws IOException {
final HtmlPage consentPage = this.webClient.getPage(this.authorizationRequestUri);
Expand Down Expand Up @@ -107,7 +107,7 @@ public void whenUserConsentsToAllScopesThenReturnAuthorizationCode() throws IOEx
assertThat(location).contains("code=");
}

// @Test
@Test
@WithMockUser("user1")
public void whenUserCancelsConsentThenReturnAccessDeniedError() throws IOException {
final HtmlPage consentPage = this.webClient.getPage(this.authorizationRequestUri);
Expand Down

0 comments on commit 0d7ba70

Please sign in to comment.