Skip to content

Commit

Permalink
add user views
Browse files Browse the repository at this point in the history
  • Loading branch information
TonisOrmisson committed Nov 6, 2017
1 parent b1190ab commit e88b2c9
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion application/views/admin/user/editusers.php
Expand Up @@ -3,7 +3,7 @@
/* @var $dataProvider CActiveDataProvider */

// DO NOT REMOVE This is for automated testing to validate we see that page
echo viewHelper::getViewTestTag('modifyUser');
echo viewHelper::getViewTestTag('usersIndex');

?>
<div class="container-fluid">
Expand Down
2 changes: 1 addition & 1 deletion application/views/admin/user/modifyuser.php
Expand Up @@ -3,7 +3,7 @@
* @var User $oUser
*/
// DO NOT REMOVE This is for automated testing to validate we see that page
echo viewHelper::getViewTestTag('usersIndex');
echo viewHelper::getViewTestTag('modifyUser');
?>

<div class="pagetitle h3">
Expand Down
5 changes: 5 additions & 0 deletions application/views/admin/user/setuserpermissions.php
@@ -1,7 +1,12 @@
<?php
/**
* @var $this AdminController
* Set user permissions
*/

// DO NOT REMOVE This is for automated testing to validate we see that page
echo viewHelper::getViewTestTag('setUserPermissions');

?>

<!-- set user permissions -->
Expand Down
7 changes: 6 additions & 1 deletion tests/controllers/AdminViewsTest.php
Expand Up @@ -92,7 +92,12 @@ public function testSettingsViews($name, $view)
*/
public function testUsersViews($name,$view){
// use Admin user
$view['route'] = ReplaceFields($view['route'],['{UID}'=>1]);
$uid = 1;
// non-adminuser for some views
if(in_array($name,['setUserPermissions','setUserTemplates'])){
$uid = 2;
}
$view['route'] = ReplaceFields($view['route'],['{UID}'=>$uid]);
$this->findViewTag($name, $view);
}
}
4 changes: 2 additions & 2 deletions tests/data/views/adminUsersViews.php
Expand Up @@ -12,6 +12,6 @@
['modifyUser', ['route'=>'user/sa/modifyuser/uid/{UID}']],

// needs POST implementation
//['modifyUser', ['route'=>'user/sa/setuserpermissions/uid/']],
setusertemplates
['setUserPermissions', ['route'=>'user/sa/setuserpermissions/uid/{UID}']],
['setUserTemplates', ['route'=>'user/sa/setusertemplates/uid/{UID}']],
];

0 comments on commit e88b2c9

Please sign in to comment.