mirror of
https://github.com/silverstripe/silverstripe-behat-extension
synced 2024-10-22 17:05:32 +02:00
Fixed Behat scope for "I log in as"
Fixes an issues where multiple "Email" form fields are present on a page, e.g. through a global login overlay in the header.
This commit is contained in:
parent
02a6db854c
commit
d79acc457a
@ -129,9 +129,9 @@ class LoginContext extends BehatContext
|
||||
$form = $page->find('css', 'form[action="Security/LoginForm"]');
|
||||
assertNotNull($form, 'Login form not found');
|
||||
|
||||
$emailField = $page->find('css', '[name=Email]');
|
||||
$passwordField = $page->find('css', '[name=Password]');
|
||||
$submitButton = $page->find('css', '[type=submit]');
|
||||
$emailField = $form->find('css', '[name=Email]');
|
||||
$passwordField = $form->find('css', '[name=Password]');
|
||||
$submitButton = $form->find('css', '[type=submit]');
|
||||
|
||||
assertNotNull($emailField, 'Email field on login form not found');
|
||||
assertNotNull($passwordField, 'Password field on login form not found');
|
||||
|
Loading…
Reference in New Issue
Block a user