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