From 03f7275f0ac8543ea0d37d3a442583e9c920e2de Mon Sep 17 00:00:00 2001
From: Rajab Natshah <rajabn@gmail.com>
Date: Mon, 29 Mar 2021 02:46:41 +0300
Subject: [PATCH] Issue #3205085: Add a tag release-varbase workflow job for
 the CircleCI automated testing pipelines

---
 tests/features/bootstrap/VarbaseContext.php | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/tests/features/bootstrap/VarbaseContext.php b/tests/features/bootstrap/VarbaseContext.php
index d8d16764..6083c048 100644
--- a/tests/features/bootstrap/VarbaseContext.php
+++ b/tests/features/bootstrap/VarbaseContext.php
@@ -87,11 +87,8 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext
 
       $this->getSession()->visit($this->locatePath('/user/login'));
       $page = $this->getSession()->getPage();
-      $username_in_page = $this->matchingElementAfterWait('css', '[data-drupal-selector="edit-name"]');
-      $password_in_page = $this->matchingElementAfterWait('css', '[data-drupal-selector="edit-pass"]');
-      $submit_in_page = $this->matchingElementAfterWait('css', '[data-drupal-selector="edit-submit"]');
 
-      if ($username_in_page && $password_in_page && $submit_in_page) {
+      if ($this->matchingElementAfterWait('css', '[data-drupal-selector="edit-name"]', 6000)) {
         $page->fillField('name', $username);
         $page->fillField('pass', $password);
         $submit = $page->findButton('op');
@@ -122,11 +119,8 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext
     // Login with the.
     $this->getSession()->visit($this->locatePath('/user/login'));
     $page = $this->getSession()->getPage();
-    $username_in_page = $this->matchingElementAfterWait('css', '[data-drupal-selector="edit-name"]');
-    $password_in_page = $this->matchingElementAfterWait('css', '[data-drupal-selector="edit-pass"]');
-    $submit_in_page = $this->matchingElementAfterWait('css', '[data-drupal-selector="edit-submit"]');
 
-    if ($username_in_page && $password_in_page && $submit_in_page) {
+    if ($this->matchingElementAfterWait('css', '[data-drupal-selector="edit-name"]', 6000)) {
       $page->fillField('name', $username);
       $page->fillField('pass', $password);
       $submit = $page->findButton('op');
-- 
GitLab