This commit is contained in:
parent
29b616d61d
commit
1efcb9d89f
2 changed files with 56 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
||||||
class App.Overview extends App.Model
|
class App.Overview extends App.Model
|
||||||
@configure 'Overview', 'name', 'prio', 'condition', 'order', 'group_by', 'group_direction', 'view', 'user_ids', 'organization_shared', 'role_ids', 'active'
|
@configure 'Overview', 'name', 'prio', 'condition', 'order', 'group_by', 'group_direction', 'view', 'user_ids', 'organization_shared', 'out_of_office', 'role_ids', 'active'
|
||||||
@extend Spine.Model.Ajax
|
@extend Spine.Model.Ajax
|
||||||
@url: @apiPath + '/overviews'
|
@url: @apiPath + '/overviews'
|
||||||
@configure_attributes = [
|
@configure_attributes = [
|
||||||
|
|
|
@ -125,4 +125,59 @@ class AdminOverviewTest < TestCase
|
||||||
get_location( css: "td[title='#{title}']").y]
|
get_location( css: "td[title='#{title}']").y]
|
||||||
end.sort_by { |x| x[1] }.map { |x| x[0] }
|
end.sort_by { |x| x[1] }.map { |x| x[0] }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# verify fix for issue #2235 - Overview setting isn't applied on submit
|
||||||
|
def test_overview_toggle_out_of_office_setting
|
||||||
|
@browser = browser_instance
|
||||||
|
login(
|
||||||
|
username: 'master@example.com',
|
||||||
|
password: 'test',
|
||||||
|
url: browser_url,
|
||||||
|
)
|
||||||
|
tasks_close_all()
|
||||||
|
|
||||||
|
out_of_office_css = '.content.active .modal select[name="out_of_office"]'
|
||||||
|
first_overview_css = '.content.active tr[data-id="1"] td'
|
||||||
|
|
||||||
|
click( css: 'a[href="#manage"]' )
|
||||||
|
click( css: '.content.active a[href="#manage/overviews"]' )
|
||||||
|
|
||||||
|
# round 1, open the overview and set out_of_office to true
|
||||||
|
click( css: first_overview_css )
|
||||||
|
modal_ready
|
||||||
|
watch_for(
|
||||||
|
css: out_of_office_css,
|
||||||
|
value: 'no',
|
||||||
|
)
|
||||||
|
select(
|
||||||
|
css: out_of_office_css,
|
||||||
|
value: 'yes',
|
||||||
|
)
|
||||||
|
click( css: '.content.active .modal .js-submit' )
|
||||||
|
modal_disappear
|
||||||
|
|
||||||
|
# round 2, open the overview and set out_of_office back to false
|
||||||
|
click( css: first_overview_css )
|
||||||
|
modal_ready
|
||||||
|
watch_for(
|
||||||
|
css: out_of_office_css,
|
||||||
|
value: 'yes',
|
||||||
|
)
|
||||||
|
select(
|
||||||
|
css: out_of_office_css,
|
||||||
|
value: 'no',
|
||||||
|
)
|
||||||
|
click( css: '.content.active .modal .js-submit' )
|
||||||
|
modal_disappear
|
||||||
|
|
||||||
|
# round 3, open the overview and confirm that it's still false
|
||||||
|
click( css: first_overview_css )
|
||||||
|
modal_ready
|
||||||
|
watch_for(
|
||||||
|
css: out_of_office_css,
|
||||||
|
value: 'no',
|
||||||
|
)
|
||||||
|
click( css: '.content.active .modal .js-submit' )
|
||||||
|
modal_disappear
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue