|
@@ -1,5 +1,5 @@
|
|
/*
|
|
/*
|
|
- * Copyright 2020-2022 the original author or authors.
|
|
|
|
|
|
+ * Copyright 2020-2025 the original author or authors.
|
|
*
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* you may not use this file except in compliance with the License.
|
|
@@ -17,13 +17,13 @@ package sample;
|
|
|
|
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
|
|
|
|
-import com.gargoylesoftware.htmlunit.Page;
|
|
|
|
-import com.gargoylesoftware.htmlunit.WebClient;
|
|
|
|
-import com.gargoylesoftware.htmlunit.WebResponse;
|
|
|
|
-import com.gargoylesoftware.htmlunit.html.HtmlButton;
|
|
|
|
-import com.gargoylesoftware.htmlunit.html.HtmlElement;
|
|
|
|
-import com.gargoylesoftware.htmlunit.html.HtmlInput;
|
|
|
|
-import com.gargoylesoftware.htmlunit.html.HtmlPage;
|
|
|
|
|
|
+import org.htmlunit.Page;
|
|
|
|
+import org.htmlunit.WebClient;
|
|
|
|
+import org.htmlunit.WebResponse;
|
|
|
|
+import org.htmlunit.html.HtmlButton;
|
|
|
|
+import org.htmlunit.html.HtmlElement;
|
|
|
|
+import org.htmlunit.html.HtmlInput;
|
|
|
|
+import org.htmlunit.html.HtmlPage;
|
|
import org.junit.jupiter.api.BeforeEach;
|
|
import org.junit.jupiter.api.BeforeEach;
|
|
import org.junit.jupiter.api.Test;
|
|
import org.junit.jupiter.api.Test;
|
|
import org.junit.jupiter.api.extension.ExtendWith;
|
|
import org.junit.jupiter.api.extension.ExtendWith;
|
|
@@ -86,7 +86,7 @@ public class DefaultAuthorizationServerApplicationTests {
|
|
|
|
|
|
HtmlElement alert = loginErrorPage.querySelector("div[role=\"alert\"]");
|
|
HtmlElement alert = loginErrorPage.querySelector("div[role=\"alert\"]");
|
|
assertThat(alert).isNotNull();
|
|
assertThat(alert).isNotNull();
|
|
- assertThat(alert.getTextContent()).isEqualTo("Bad credentials");
|
|
|
|
|
|
+ assertThat(alert.getTextContent()).isEqualTo("Invalid credentials");
|
|
}
|
|
}
|
|
|
|
|
|
@Test
|
|
@Test
|