re #224 add option to require consent
This commit is contained in:
@ -142,10 +142,10 @@ class GdprCest
|
||||
$I->see('Export my data', 'h3');
|
||||
$I->see('Delete my account', 'h3');
|
||||
$I->amOnRoute('/user/settings/gdpr-delete');
|
||||
$I->fillField('#gdprdeleteform-password','wrongpassword');
|
||||
$I->fillField('#gdprdeleteform-password', 'wrongpassword');
|
||||
$I->click('Delete');
|
||||
$I->see('Invalid password');
|
||||
$I->fillField('#gdprdeleteform-password','qwerty');
|
||||
$I->fillField('#gdprdeleteform-password', 'qwerty');
|
||||
$I->click('Delete');
|
||||
$I->see('Login');
|
||||
}
|
||||
@ -163,5 +163,22 @@ class GdprCest
|
||||
$I->amLoggedInAs(1);
|
||||
$I->amOnRoute('/user/settings/privacy');
|
||||
$I->seeResponseCodeIs(404);
|
||||
$I->amOnRoute('/user/settings/privacy');
|
||||
$I->see('Not Found');
|
||||
}
|
||||
|
||||
public function testForcedConsentRequirement(FunctionalTester $I)
|
||||
{
|
||||
$this->_prepareModule(false,false);
|
||||
/** @var Module $module */
|
||||
$module = Yii::$app->getModule('user');
|
||||
$module->gdprRequireConsentToAll = true;
|
||||
$I->amGoingTo('Try to access a page without giving data processing consent');
|
||||
$I->amLoggedInAs(1);
|
||||
$I->amOnRoute('/site/index');
|
||||
$I->seeElement('.give-consent-panel');
|
||||
$I->checkOption('#dynamicmodel-gdpr_consent');
|
||||
$I->click('Submit');
|
||||
$I->see('Profile settings');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user