12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- 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
|