1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- # encoding: utf-8
- require 'browser_test_helper'
- class PreferencesPermissionCheckTest < TestCase
- def test_permission_agent
- @browser = browser_instance
- login(
- username: 'master@example.com',
- password: 'test',
- url: browser_url,
- )
- click(css: 'a[href="#current_user"]')
- click(css: 'a[href="#profile"]')
- match(
- css: '.content .NavBarProfile',
- value: 'Password',
- )
- match(
- css: '.content .NavBarProfile',
- value: 'Language',
- )
- match(
- css: '.content .NavBarProfile',
- value: 'Notifications',
- )
- match(
- css: '.content .NavBarProfile',
- value: 'Calendar',
- )
- match(
- css: '.content .NavBarProfile',
- value: 'Token Access',
- )
- end
- def test_permission_customer
- @browser = browser_instance
- login(
- username: 'nicole.braun@zammad.org',
- password: 'test',
- url: browser_url,
- )
- click(css: 'a[href="#current_user"]')
- click(css: 'a[href="#profile"]')
- match(
- css: '.content .NavBarProfile',
- value: 'Password',
- )
- match(
- css: '.content .NavBarProfile',
- value: 'Language',
- )
- match_not(
- css: '.content .NavBarProfile',
- value: 'Notifications',
- )
- match_not(
- css: '.content .NavBarProfile',
- value: 'Calendar',
- )
- match_not(
- css: '.content .NavBarProfile',
- value: 'Token Access',
- )
- end
- end
|