Commit f6f7a805 authored by Matthias Larisch's avatar Matthias Larisch

Reflect legal changes in tests

parent 5935bda1
Pipeline #22572423 failed with stages
in 7 minutes and 34 seconds
......@@ -48,6 +48,7 @@ class LegalControl extends Control
$this->gateway->agreeToPp(S::id(), $data->privacy_policy_date);
/* need to reload session cache. TODO: This should be further abstracted */
$this->model->relogin();
$this->func->goSelf();
}
}
$response->setContent($this->render('pages/Legal/page.twig', [
......
......@@ -73,6 +73,7 @@ class Foodsharing extends \Codeception\Module\Db
'handy' => $this->faker->phoneNumber,
'photo_public' => 1,
'active' => 1,
'privacy_policy_accepted_date' => '2016-01-19 14:00:32',
], $extra_params);
$params['passwd'] = $this->encryptMd5($params['email'], $pass);
$params['geb_datum'] = $this->toDateTime($params['geb_datum']);
......
......@@ -7,6 +7,7 @@ class RegisterCest
private $first_name;
private $last_name;
private $password;
private $birthdate;
public function _before()
{
......@@ -83,6 +84,19 @@ class RegisterCest
$I->fillField('email_adress', $this->email);
$I->fillField('password', $this->password);
$I->click('#loginbar input[type=submit]');
$I->seeInDatabase('fs_foodsaver', [
'email' => $this->stripped_email,
'name' => $this->first_name,
'nachname' => $this->last_name,
'geb_datum' => $this->birthdate,
'newsletter' => 0
]);
$I->waitForText('Ich stimme nicht zu und möchte ');
$I->checkOption('#legal_form_privacy_policy');
//$I->submitForm('legal_form', []);
$I->click('Ich bin mit den Bestimmungen einverstanden');
$I->waitForText('Willkommen ' . $this->first_name . '!');
$I->seeInDatabase('fs_foodsaver', [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment