Skip to content

Instantly share code, notes, and snippets.

@sheise
Last active October 10, 2017 20:29
Show Gist options
  • Save sheise/364e88b93c0532496f6a33649ed3fe99 to your computer and use it in GitHub Desktop.
Save sheise/364e88b93c0532496f6a33649ed3fe99 to your computer and use it in GitHub Desktop.
diff --git a/../vendor/drupal/drupal-extension/src/Drupal/DrupalExtension/Context/RawDrupalContext.php b/../vendor/drupal/drupal-extension/src/Drupal/DrupalExtension/Context/RawDrupalContext.php
index d0ab556..a5362b9 100644
--- a/../vendor/drupal/drupal-extension/src/Drupal/DrupalExtension/Context/RawDrupalContext.php
+++ b/../vendor/drupal/drupal-extension/src/Drupal/DrupalExtension/Context/RawDrupalContext.php
@@ -474,7 +474,7 @@ public function login() {
$this->getSession()->visit($this->locatePath('/user'));
$element = $this->getSession()->getPage();
- $element->fillField($this->getDrupalText('username_field'), $this->user->name);
+ $element->fillField($this->getDrupalText('username_field'), $this->user->mail);
$element->fillField($this->getDrupalText('password_field'), $this->user->pass);
$submit = $element->findButton($this->getDrupalText('log_in'));
if (empty($submit)) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment