From f7951726115776366faea51705367a5c214d7d5b Mon Sep 17 00:00:00 2001 From: Josh Cummings Date: Thu, 1 Aug 2024 12:35:15 -0600 Subject: [PATCH] Change Request Parameter Lookup - For this sample, the expression param.error always has a value upon querying it - This isn't the case for the other samples, it may be that in reactive applications, the request is wrapped in something that always returns a value --- .../form/src/integTest/java/example/pages/LoginPage.java | 4 ++-- .../form/src/main/resources/templates/login.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/reactive/webflux/java/authentication/username-password/form/src/integTest/java/example/pages/LoginPage.java b/reactive/webflux/java/authentication/username-password/form/src/integTest/java/example/pages/LoginPage.java index 13e7b7b..1760669 100644 --- a/reactive/webflux/java/authentication/username-password/form/src/integTest/java/example/pages/LoginPage.java +++ b/reactive/webflux/java/authentication/username-password/form/src/integTest/java/example/pages/LoginPage.java @@ -55,12 +55,12 @@ public class LoginPage { } public LoginPage assertError() { - assertThat(this.alert).extracting(WebElement::getText).contains("Invalid username and password."); + assertThat(this.alert).extracting(WebElement::getText).containsOnly("Invalid username and password."); return this; } public LoginPage assertLogout() { - assertThat(this.alert).extracting(WebElement::getText).contains("You have been logged out."); + assertThat(this.alert).extracting(WebElement::getText).containsOnly("You have been logged out."); return this; } diff --git a/reactive/webflux/java/authentication/username-password/form/src/main/resources/templates/login.html b/reactive/webflux/java/authentication/username-password/form/src/main/resources/templates/login.html index 4fa5c65..5afc882 100644 --- a/reactive/webflux/java/authentication/username-password/form/src/main/resources/templates/login.html +++ b/reactive/webflux/java/authentication/username-password/form/src/main/resources/templates/login.html @@ -13,9 +13,9 @@