Skip to content
Closed
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
15 changes: 11 additions & 4 deletions tests/features/bootstrap/ServiceProviderContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -487,13 +487,20 @@ private function startSsoAuthentication(string $nameId, string $loa, array $disp
#[\Behat\Step\When('/^I authenticate at the IdP as ([^\\\']*)$/')]
public function iAuthenticateAtTheIdp($username): void
{
// Fill the credentials and submit the form
$this->minkContext->fillFieldsAndSubmitForm(['username' => $username, 'password' => $username], 'Login');

if ($this->getSession()->getDriver() instanceof SymfonyDriver) {
// Submit the SAML Response from SimpleSamplPHP IdP
// Submit the SAML Response from the SimpleSAMLphp IdP
$this->minkContext->fillFieldsAndSubmitForm(['username' => $username, 'password' => $username], 'Login');
$this->minkContext->pressButton('Yes, continue');
return;
}

// Fill the credentials and submit the form. Newer devssp images only ask for a username,
// older ones also require a password equal to the username.
$this->minkContext->fillField('username', $username);
if ($this->getSession()->getPage()->findField('password') !== null) {
$this->minkContext->fillField('password', $username);
}
$this->minkContext->pressButtonAndWaitForNavigation('Login');
}

#[\Behat\Step\When('/^I authenticate at AzureMFA as "([^"]*)"$/')]
Expand Down
Loading