From d9ea6dd1c0e3471a87a58fb7634823464f95305a Mon Sep 17 00:00:00 2001 From: Sagar Khalasi Date: Tue, 4 Feb 2025 14:11:56 +0530 Subject: [PATCH] fix: Fix re-captcha case (#38997) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description Verify toast before disapper. Fixes #`Issue Number` _or_ Fixes `Issue URL` > [!WARNING] > _If no issue exists, please create an issue first, and check with the maintainers if the issue is valid._ ## Automation /ok-to-test tags="@tag.Binding" ### :mag: Cypress test results > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: > Commit: e0a07d11d559eff3a2d6e4e2bf62a98caf096c19 > Cypress dashboard. > Tags: `@tag.Binding` > Spec: >
Tue, 04 Feb 2025 08:41:43 UTC ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [x] No ## Summary by CodeRabbit - **Tests** - Enhanced error notification handling for Google reCAPTCHA failures to ensure users receive consistent and reliable feedback. - Improved the process for validating that error messages display correctly and clear as expected during failure scenarios. --- .../Binding/Button_Text_WithRecaptcha_spec.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/app/client/cypress/e2e/Regression/ClientSide/Binding/Button_Text_WithRecaptcha_spec.js b/app/client/cypress/e2e/Regression/ClientSide/Binding/Button_Text_WithRecaptcha_spec.js index 533a3240ea..72706e81ef 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Binding/Button_Text_WithRecaptcha_spec.js +++ b/app/client/cypress/e2e/Regression/ClientSide/Binding/Button_Text_WithRecaptcha_spec.js @@ -98,7 +98,10 @@ describe( "reCAPTCHA v2", ); _.agHelper.ClickButton("Submit"); - _.agHelper.AssertContains("Google reCAPTCHA token generation failed!"); + _.agHelper.ValidateToastMessage( + "Google reCAPTCHA token generation failed!", + ); + _.agHelper.WaitUntilAllToastsDisappear(); }); it("4. Validate the Button binding with Text Widget with Recaptcha Token with invalid key (after using valid key)", function () { @@ -109,14 +112,16 @@ describe( testdata.invalidKey, ); _.agHelper.ClickButton("Submit"); //for version 3 - _.agHelper.WaitUntilToastDisappear(testdata.errorMsg); + _.agHelper.ValidateToastMessage(testdata.errorMsg); + _.agHelper.WaitUntilAllToastsDisappear(); EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); _.propPane.SelectPropertiesDropDown( "Google reCAPTCHA version", "reCAPTCHA v2", ); _.agHelper.ClickButton("Submit"); - _.agHelper.WaitUntilToastDisappear(testdata.errorMsg); + _.agHelper.ValidateToastMessage(testdata.errorMsg); + _.agHelper.WaitUntilAllToastsDisappear(); }); }, );