Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions tests/features/bootstrap/FeatureContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,18 @@ public function doSomethingNotThereYet()
*/
public function iAmAuthenticatedAsAdmin() {
$this->visit('/lists/admin/');
$this->getSession()->wait(5000, "document.readyState === 'complete'");
$this->fillField('login', $this->params['admin_username']);
$this->fillField('password', $this->params['admin_password']);
$this->pressButton('Continue');

// Clicking does not wait for the next page to load with Selenium, so wait
// until we are on a logged in page before the next step looks for links.
$this->spins(function () {
if ($this->getSession()->getPage()->findById('logout') === null) {
throw new Exception('Not logged in yet');
}
});
}

/**
Expand Down
Loading