From edfe812bf9e9c7ceb1d6859620af9cbde1046f83 Mon Sep 17 00:00:00 2001
From: Rajab Natshah <rajabn@gmail.com>
Date: Sun, 28 Nov 2021 20:18:15 +0200
Subject: [PATCH] Issue #3251531: Start a 9.1.x branch for Varbase and Varbase
 Project to support Bootstrap 5

---
 tests/features/bootstrap/VarbaseContext.php      | 16 +++++++++-------
 .../02-01-request-new-password.feature           |  4 ++--
 ...tions-and-choose-layouts-for-sections.feature |  2 +-
 3 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/tests/features/bootstrap/VarbaseContext.php b/tests/features/bootstrap/VarbaseContext.php
index ac9e6783..793d66dd 100644
--- a/tests/features/bootstrap/VarbaseContext.php
+++ b/tests/features/bootstrap/VarbaseContext.php
@@ -1503,7 +1503,7 @@ JS;
    * Example #1: When I scrolldown
    * Example #2:  And I scrolldown.
    *
-   * @When I scrolldown
+   * @When /^(?:|I )scrolldown$/
    */
   public function iScrolldown() {
     $this->getSession()->executeScript("javascript:window.scrollBy(200,350)");
@@ -1516,7 +1516,7 @@ JS;
    *
    * Example #1: When I scrollup.
    *
-   * @When I scrollup
+   * @When /^(?:|I )scrollup$/
    */
   public function iScrollup() {
     $this->getSession()->executeScript("javascript:window.scrollBy(0,-350)");
@@ -1530,7 +1530,7 @@ JS;
    * Example #1: When I scrolldown 800
    * Example #2:  And I scrolldown 2000
    *
-   * @When I scrolldown (?P<value>\d+)
+   * @When /^(?:|I )scrolldown (?P<value>\d+)$/
    */
   public function iScrolldownWithValue($value) {
     $this->getSession()->executeScript("javascript:window.scrollBy(200," . $value . ")");
@@ -1543,7 +1543,7 @@ JS;
    *
    * Example #1: When I scrollup 1000
    *
-   * @When I scrollup (?P<value>\d+)
+   * @When /^(?:|I ) scrollup (?P<value>\d+)$/
    */
   public function iScrollupWithValue($value) {
     $this->getSession()->executeScript("javascript:window.scrollBy(0,-" . $value . ")");
@@ -1557,8 +1557,9 @@ JS;
    * Example #1: When I scroll to top
    * Example #2: When I scroll to the top
    * Example #3: When I scroll to the top of the page
+   * Example #4: And scroll to top
    *
-   * @When I scroll to (?:|the )top(?:| of the page)
+   * @When /^(?:|I )scroll to (?:|the )top(?:| of the page)$/
    */
   public function iScrollToTop() {
     $this->getSession()->executeScript("javascript:window.scrollBy(0,0)");
@@ -1570,10 +1571,11 @@ JS;
    * Varbase Context #varbase.
    *
    * Example #1: When I scroll to bottom
-   * Example #2: When I scroll to the bottom
+   * Example #2: And I scroll to the bottom
    * Example #3: When I scroll to the bottom of the page
+   * Example #4: And scroll to bottom
    *
-   * @When I scroll to (?:|the )bottom(?:| of the page)
+   * @When /^(?:|I )scroll to (?:|the )bottom(?:| of the page)$/
    */
   public function iScrollToBottom() {
     $this->getSession()->executeScript("javascript:window.scrollBy(0,document.body.scrollHeight)");
diff --git a/tests/features/varbase/step2-apply-tests/02-user-management/02-01-request-new-password.feature b/tests/features/varbase/step2-apply-tests/02-user-management/02-01-request-new-password.feature
index a1f5ec37..03bc89fb 100644
--- a/tests/features/varbase/step2-apply-tests/02-user-management/02-01-request-new-password.feature
+++ b/tests/features/varbase/step2-apply-tests/02-user-management/02-01-request-new-password.feature
@@ -18,10 +18,10 @@ So that I can reset my password for the account
       And I wait
      Then I should see "Username or email address"
      When I fill in "not.existing.email@vardot.com" for "Username"
-      And I scroll to bottom
+      And I scroll to the bottom
       And I press the "edit-submit" button
       And I wait
-      And I scroll to bottom
+      And I scroll to the bottom
       And I fill in "not.existing.email@vardot.com" for "Username"
       And I wait 8 seconds
       And I press the "edit-submit" button
diff --git a/tests/features/varbase/step2-apply-tests/04-content-structure/04-08-landing-page-layout-builder_check-to-add-sections-and-choose-layouts-for-sections.feature b/tests/features/varbase/step2-apply-tests/04-content-structure/04-08-landing-page-layout-builder_check-to-add-sections-and-choose-layouts-for-sections.feature
index 32e3a9b3..514dc70e 100644
--- a/tests/features/varbase/step2-apply-tests/04-content-structure/04-08-landing-page-layout-builder_check-to-add-sections-and-choose-layouts-for-sections.feature
+++ b/tests/features/varbase/step2-apply-tests/04-content-structure/04-08-landing-page-layout-builder_check-to-add-sections-and-choose-layouts-for-sections.feature
@@ -16,7 +16,7 @@ So that the "Landing (Layout Builder) page" will show up having the listed secti
       And I wait
      Then I should see "Landing page (Layout Builder) Full Width - No Background Color - Text only has been created"
       And I should see "This layout builder tool allows you to configure the layout of the main content area."
-     When I scroll to bottom
+     When I scroll to the bottom of the page
      Then I should see "Add section at end of layout"
      When I click "Add section at end of layout"
       And I wait for AJAX to finish
-- 
GitLab