From 54a72306dc40ed5c3dd45e95e4ac92381134eb40 Mon Sep 17 00:00:00 2001 From: metalbote <metalbote@2809357.no-reply.drupal.org> Date: Sun, 19 May 2019 13:47:20 +0300 Subject: [PATCH] Issue #3055619 by metalbote: Change Varbase Behat Context to use form element ids instead of labels, so that tests run on non-english installs --- tests/features/bootstrap/VarbaseContext.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/features/bootstrap/VarbaseContext.php b/tests/features/bootstrap/VarbaseContext.php index 583a86ca..b1e05e6c 100644 --- a/tests/features/bootstrap/VarbaseContext.php +++ b/tests/features/bootstrap/VarbaseContext.php @@ -71,9 +71,9 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext } $element = $this->getSession()->getPage(); $this->getSession()->visit($this->locatePath('/user')); - $element->fillField('Username', $username); - $element->fillField('Password', $password); - $submit = $element->findButton('Log in'); + $element->fillField('edit-name', $username); + $element->fillField('edit-pass', $password); + $submit = $element->findButton('op'); $submit->click(); } @@ -93,9 +93,9 @@ class VarbaseContext extends RawDrupalContext implements SnippetAcceptingContext // Login with the $element = $this->getSession()->getPage(); $this->getSession()->visit($this->locatePath('/user')); - $element->fillField('Username', $username); - $element->fillField('Password', $password); - $submit = $element->findButton('Log in'); + $element->fillField('edit-name', $username); + $element->fillField('edit-pass', $password); + $submit = $element->findButton('op'); $submit->click(); } -- GitLab