Fixed issue #1616 by adding adding observe active: true to org profile

This commit is contained in:
Billy Zhou 2018-08-03 20:55:15 +08:00
parent 9b495847d2
commit fb0ef19e7d
2 changed files with 93 additions and 0 deletions

View file

@ -195,6 +195,7 @@ class Member extends App.ObserverController
lastname: true
login: true
email: true
active: true
globalRerender: false
render: (user) =>

View file

@ -156,4 +156,96 @@ class AgentOrganizationProfileTest < TestCase
value: message,
)
end
def test_org_profile_user_active_update
@browser = browser_instance
login(
username: 'master@example.com',
password: 'test',
url: browser_url,
)
tasks_close_all()
# search and open org
organization_open_by_search(
value: 'Zammad Foundation',
)
watch_for(
css: '.active .profile-window .userList-entry a.user-popover',
value: 'Nicole Braun',
)
exists(
css: '.active .profile-window .userList-entry .avatar--unique',
)
# open user and change status to inactive
click(
css: '.active .profile-window .userList-entry a.user-popover',
)
click(
css: '.active .profile-window .dropdown #userAction',
)
click(
css: '.active .profile-window .dropdown li[data-type="edit"]',
)
modal_ready()
select(
css: '.active .modal select[name="active"]',
value: 'inactive'
)
click(
css: '.modal .js-submit',
)
modal_disappear()
# go back to the org and check for inactive status update
click(
css: '#navigation .nav-tab[data-key="Organization-1"]',
)
watch_for(
css: '.active .profile-window .userList-entry .avatar--unique.avatar--inactive',
)
# open user and change status to active again
click(
css: '.active .profile-window .userList-entry a.user-popover',
)
click(
css: '.active .profile-window .dropdown #userAction',
)
click(
css: '.active .profile-window .dropdown li[data-type="edit"]',
)
modal_ready()
select(
css: '.active .modal select[name="active"]',
value: 'active'
)
click(
css: '.modal .js-submit',
)
modal_disappear()
# go back to the org and check for active status update
click(
css: '#navigation .nav-tab[data-key="Organization-1"]',
)
watch_for(
css: '.active .profile-window .userList-entry .avatar--unique',
)
exists_not(
css: '.active .profile-window .userList-entry .avatar--unique.avatar--inactive',
)
end
end