- Revert "Fixed/stabilized User access browser test." 61aa8fb84a
.
- Removed dead comments. - Simple code cleanup without changing behavior.
This commit is contained in:
parent
c50d6a49ed
commit
9d972f9efd
1 changed files with 40 additions and 70 deletions
|
@ -10,8 +10,7 @@ class AgentProfilePermissionsTest < TestCase
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all()
|
||||||
|
|
||||||
# search and open user
|
user_open_by_search(value: 'Braun')
|
||||||
user_open_by_search(value: 'Nicole')
|
|
||||||
|
|
||||||
verify_task(
|
verify_task(
|
||||||
data: {
|
data: {
|
||||||
|
@ -29,7 +28,6 @@ class AgentProfilePermissionsTest < TestCase
|
||||||
value: 'email',
|
value: 'email',
|
||||||
)
|
)
|
||||||
|
|
||||||
# update note
|
|
||||||
set(
|
set(
|
||||||
css: '.content.active [data-name="note"]',
|
css: '.content.active [data-name="note"]',
|
||||||
value: 'some note 123',
|
value: 'some note 123',
|
||||||
|
@ -99,7 +97,6 @@ class AgentProfilePermissionsTest < TestCase
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all()
|
||||||
|
|
||||||
# search and open user
|
|
||||||
user_open_by_search(value: 'Test Master')
|
user_open_by_search(value: 'Test Master')
|
||||||
|
|
||||||
verify_task(
|
verify_task(
|
||||||
|
@ -121,10 +118,7 @@ class AgentProfilePermissionsTest < TestCase
|
||||||
sleep 2
|
sleep 2
|
||||||
|
|
||||||
click(css: '.content.active .js-action .icon-arrow-down', fast: true)
|
click(css: '.content.active .js-action .icon-arrow-down', fast: true)
|
||||||
|
exists_not(css: '.content.active .js-action [data-type="edit"]')
|
||||||
exists_not(
|
|
||||||
css: '.content.active .js-action [data-type="edit"]'
|
|
||||||
)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_agent_to_edit_admin_ticket_user_details
|
def test_agent_to_edit_admin_ticket_user_details
|
||||||
|
@ -140,8 +134,8 @@ class AgentProfilePermissionsTest < TestCase
|
||||||
data: {
|
data: {
|
||||||
customer: 'master',
|
customer: 'master',
|
||||||
group: 'Users',
|
group: 'Users',
|
||||||
title: 'test_user_access_permissions_1 - ticket 1',
|
title: 'test_user_access_permissions - ticket 1',
|
||||||
body: 'test_user_access_permissions_1 - ticket 1',
|
body: 'test_user_access_permissions - ticket 1',
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -156,7 +150,6 @@ class AgentProfilePermissionsTest < TestCase
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all()
|
||||||
|
|
||||||
# open ticket#1
|
|
||||||
ticket_open_by_search(
|
ticket_open_by_search(
|
||||||
number: ticket1[:number],
|
number: ticket1[:number],
|
||||||
)
|
)
|
||||||
|
@ -185,12 +178,10 @@ class AgentProfilePermissionsTest < TestCase
|
||||||
data: {
|
data: {
|
||||||
customer: 'nico',
|
customer: 'nico',
|
||||||
group: 'Users',
|
group: 'Users',
|
||||||
title: 'test_user_access_permissions_2 - ticket 2',
|
title: 'test_user_access_permissions - ticket 2',
|
||||||
body: 'test_user_access_permissions_2 - ticket 2',
|
body: 'test_user_access_permissions - ticket 2',
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
# open ticket#1
|
|
||||||
ticket_open_by_search(
|
ticket_open_by_search(
|
||||||
number: ticket1[:number],
|
number: ticket1[:number],
|
||||||
)
|
)
|
||||||
|
@ -216,20 +207,12 @@ class AgentProfilePermissionsTest < TestCase
|
||||||
value: 'some note abc',
|
value: 'some note abc',
|
||||||
)
|
)
|
||||||
|
|
||||||
# search and open user
|
watch_for(
|
||||||
user_open_by_search(value: 'Nicole')
|
css: '.content.active .sidebar[data-tab="customer"] .sidebar-block h3[title="Name"]',
|
||||||
|
value: 'Nicole B2',
|
||||||
verify_task(
|
|
||||||
data: {
|
|
||||||
title: 'Nicole B2',
|
|
||||||
}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
ticket_open_by_search(
|
sleep 2
|
||||||
number: ticket1[:number],
|
|
||||||
)
|
|
||||||
sleep 0.3
|
|
||||||
|
|
||||||
# change lastname back
|
# change lastname back
|
||||||
click(css: '.content.active .sidebar[data-tab="customer"] .js-actions')
|
click(css: '.content.active .sidebar[data-tab="customer"] .js-actions')
|
||||||
click(css: 'li[data-type="customer-edit"]')
|
click(css: 'li[data-type="customer-edit"]')
|
||||||
|
@ -254,13 +237,9 @@ class AgentProfilePermissionsTest < TestCase
|
||||||
value: 'some note abc',
|
value: 'some note abc',
|
||||||
)
|
)
|
||||||
|
|
||||||
# search and open user
|
watch_for(
|
||||||
user_open_by_search(value: 'Nicole')
|
css: '.content.active .sidebar[data-tab="customer"] .sidebar-block [title="Name"]',
|
||||||
|
value: 'Nicole Braun',
|
||||||
verify_task(
|
|
||||||
data: {
|
|
||||||
title: 'Nicole Braun',
|
|
||||||
}
|
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -274,25 +253,27 @@ class AgentProfilePermissionsTest < TestCase
|
||||||
)
|
)
|
||||||
tasks_close_all()
|
tasks_close_all()
|
||||||
|
|
||||||
# search and open user
|
|
||||||
user_open_by_search(value: 'Nicole')
|
|
||||||
|
|
||||||
ticket1 = ticket_create(
|
ticket1 = ticket_create(
|
||||||
data: {
|
data: {
|
||||||
customer: 'nico',
|
customer: 'nico',
|
||||||
group: 'Users',
|
group: 'Users',
|
||||||
title: 'test_user_access_permissions_2 - ticket 2',
|
title: 'test_user_access_permissions - ticket 3',
|
||||||
body: 'test_user_access_permissions_2 - ticket 2',
|
body: 'test_user_access_permissions - ticket 3',
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
ticket_open_by_search(
|
ticket_open_by_search(
|
||||||
number: ticket1[:number],
|
number: ticket1[:number],
|
||||||
)
|
)
|
||||||
|
|
||||||
click(css: '.content.active .tabsSidebar .tabsSidebar-tab[data-tab="customer"]')
|
exists(css: '.content.active .tabsSidebar .tabsSidebar-tab[data-tab="customer"]')
|
||||||
click(css: '.content.active .sidebar[data-tab="customer"] .js-actions .dropdown-toggle')
|
exists(css: '.content.active .sidebar[data-tab="customer"] .js-actions .dropdown-toggle')
|
||||||
click(css: '.content.active .sidebar[data-tab="customer"] .js-actions [data-type="customer-edit"]')
|
exists(css: '.content.active .sidebar[data-tab="customer"] .js-actions [data-type="customer-edit"]')
|
||||||
|
|
||||||
|
click(css: '.content.active .tabsSidebar-holder .js-avatar')
|
||||||
|
|
||||||
|
# check and change note again in edit screen
|
||||||
|
click(css: '.content.active .js-action .dropdown-toggle')
|
||||||
|
click(css: '.content.active .js-action [data-type="edit"]')
|
||||||
|
|
||||||
watch_for(
|
watch_for(
|
||||||
css: '.content.active .modal',
|
css: '.content.active .modal',
|
||||||
|
@ -310,29 +291,19 @@ class AgentProfilePermissionsTest < TestCase
|
||||||
click(css: '.content.active .modal button.js-submit')
|
click(css: '.content.active .modal button.js-submit')
|
||||||
|
|
||||||
watch_for(
|
watch_for(
|
||||||
css: '.content.active .sidebar[data-tab="customer"] .sidebar-block [data-name="note"]',
|
css: '.content.active .profile-window',
|
||||||
value: 'some note abc',
|
value: 'some note abc',
|
||||||
)
|
)
|
||||||
|
|
||||||
tasks_close_all()
|
|
||||||
|
|
||||||
# search and open user
|
|
||||||
user_open_by_search(value: 'Nicole')
|
|
||||||
|
|
||||||
verify_task(
|
verify_task(
|
||||||
data: {
|
data: {
|
||||||
title: 'Nicole B2',
|
title: 'Nicole B2',
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
ticket_open_by_search(
|
|
||||||
number: ticket1[:number],
|
|
||||||
)
|
|
||||||
|
|
||||||
# change lastname back
|
# change lastname back
|
||||||
click(css: '.content.active .tabsSidebar .tabsSidebar-tab[data-tab="customer"]')
|
click(css: '.content.active .js-action .dropdown-toggle')
|
||||||
click(css: '.content.active .tabsSidebar .sidebar[data-tab="customer"] .js-actions .dropdown-toggle')
|
click(css: '.content.active .js-action [data-type="edit"]')
|
||||||
click(css: '.content.active .tabsSidebar .sidebar[data-tab="customer"] .js-actions li[data-type="customer-edit"]')
|
|
||||||
|
|
||||||
watch_for(
|
watch_for(
|
||||||
css: '.content.active .modal',
|
css: '.content.active .modal',
|
||||||
|
@ -348,9 +319,6 @@ class AgentProfilePermissionsTest < TestCase
|
||||||
)
|
)
|
||||||
click(css: '.content.active .modal button.js-submit')
|
click(css: '.content.active .modal button.js-submit')
|
||||||
|
|
||||||
# search and open user
|
|
||||||
user_open_by_search(value: 'Nicole')
|
|
||||||
|
|
||||||
verify_task(
|
verify_task(
|
||||||
data: {
|
data: {
|
||||||
title: 'Nicole Braun',
|
title: 'Nicole Braun',
|
||||||
|
@ -372,8 +340,8 @@ class AgentProfilePermissionsTest < TestCase
|
||||||
data: {
|
data: {
|
||||||
customer: 'master',
|
customer: 'master',
|
||||||
group: 'Users',
|
group: 'Users',
|
||||||
title: 'test_user_access_permissions_2 - ticket 2',
|
title: 'test_user_access_permissions - ticket 4',
|
||||||
body: 'test_user_access_permissions_2 - ticket 2',
|
body: 'test_user_access_permissions - ticket 4',
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -381,11 +349,13 @@ class AgentProfilePermissionsTest < TestCase
|
||||||
number: ticket1[:number],
|
number: ticket1[:number],
|
||||||
)
|
)
|
||||||
|
|
||||||
click(css: '.content.active .tabsSidebar .tabsSidebar-tab[data-tab="customer"]')
|
exists(css: '.content.active .tabsSidebar .tabsSidebar-tab[data-tab="customer"]')
|
||||||
click(css: '.content.active .sidebar[data-tab="customer"] .js-actions .dropdown-toggle')
|
exists(css: '.content.active .sidebar[data-tab="customer"] .js-actions .dropdown-toggle')
|
||||||
|
exists_not(css: '.content.active .sidebar[data-tab="customer"] .js-actions [data-type="customer-edit"]')
|
||||||
|
|
||||||
exists_not(
|
click(css: '.content.active .tabsSidebar-holder .js-avatar')
|
||||||
css: '.content.active .sidebar[data-tab="customer"] .js-actions [data-type="customer-edit"]'
|
|
||||||
)
|
click(css: '.content.active .js-action .icon-arrow-down', fast: true)
|
||||||
|
exists_not(css: '.content.active .js-action [data-type="edit"]')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue