Fix test
This commit is contained in:
@ -46,6 +46,7 @@ $this->title = Yii::t('usuario', 'Privacy settings');
|
||||
Yii::t('usuario', 'Delete account'),
|
||||
['delete'],
|
||||
[
|
||||
'id' => 'gdpr-del-button',
|
||||
'class' => 'btn btn-danger',
|
||||
'data-method' => 'post',
|
||||
'data-confirm' => Yii::t('usuario', 'Are you sure? There is no going back'),
|
||||
@ -54,7 +55,11 @@ $this->title = Yii::t('usuario', 'Privacy settings');
|
||||
<? else:
|
||||
echo Html::a(Yii::t('usuario', 'Delete'),
|
||||
['/user/settings/gdprdelete'],
|
||||
['class' => 'btn btn-danger'])
|
||||
[
|
||||
'class' => 'btn btn-danger',
|
||||
'id' => 'gdpr-del-button',
|
||||
|
||||
])
|
||||
?>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
|
||||
@ -141,11 +141,11 @@ class GdprCest
|
||||
$I->amOnRoute('/user/settings/privacy');
|
||||
$I->see('Export my data', 'h3');
|
||||
$I->see('Delete my account', 'h3');
|
||||
$I->click('Delete');
|
||||
$I->fillField('#gdprdeleteform-password', 'wrongpassword');
|
||||
$I->amOnRoute('/user/settings/gdprdelete');
|
||||
$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');
|
||||
}
|
||||
@ -157,14 +157,14 @@ class GdprCest
|
||||
*/
|
||||
public function testPrivacyPageAccess(FunctionalTester $I)
|
||||
{
|
||||
|
||||
$I->amGoingTo('Try that a user cant access to privacy if GDPR is not enabled');
|
||||
$this->_prepareModule(false, false, false);
|
||||
$this->_prepareModule(false, false,false);
|
||||
$I->amLoggedInAs(1);
|
||||
$I->amOnRoute('/user/settings/privacy');
|
||||
$I->see('Not Found');
|
||||
$I->amOnRoute('/user/settings/gdprdelete');
|
||||
$I->see('Not Found');
|
||||
$I->amOnRoute('/user/settings/export');
|
||||
$I->amOnRoute('/user/settings/privacy');
|
||||
$I->see('Not Found');$I->amOnRoute('/user/settings/privacy');
|
||||
$I->see('Not Found');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user