spec: add account calendar auto subscribe tests
This is one of a series of test patchsets to augment the unit tests for validating new UI for auto-subscription of accound calendars. Closes LF-257 Test Plan: Passes Jenkins Change-Id: I8950c6cef803e455cff5d353d0260b6807b80bab Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318193 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Ed Schiebel <eschiebel@instructure.com> QA-Review: Ed Schiebel <eschiebel@instructure.com> Product-Review: Robin Kuss <rkuss@instructure.com>
This commit is contained in:
parent
8804722a70
commit
29817df954
|
@ -270,5 +270,30 @@ describe "calendar2" do
|
|||
expect(event_popover_content).not_to contain_css("a")
|
||||
end
|
||||
end
|
||||
|
||||
context "auto subscription for an account calendar" do
|
||||
before :once do
|
||||
@subaccount1.account_calendar_subscription_type = "auto"
|
||||
@subaccount1.save!
|
||||
end
|
||||
|
||||
it "cannot uncheck auto-subscribed calendar on selection modal" do
|
||||
@student.set_preference(:enabled_account_calendars, @subaccount1.id)
|
||||
user_session(@student)
|
||||
get "/calendar2"
|
||||
|
||||
open_other_calendars_modal
|
||||
expect(f(account_calendar_checkbox_selector(@subaccount1.id))).to be_disabled
|
||||
end
|
||||
|
||||
it "can uncheck auto-subscribed calendar for viewing on calendar" do
|
||||
@student.set_preference(:enabled_account_calendars, @subaccount1.id)
|
||||
user_session(@student)
|
||||
get "/calendar2"
|
||||
|
||||
account_calendar_available_list_item.click
|
||||
expect(account_calendar_available_list_item).not_to be_checked
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -89,6 +89,10 @@ module CalendarOtherCalendarsPage
|
|||
"#{account_calendars_list_selector} > li"
|
||||
end
|
||||
|
||||
def account_calendar_available_list_item_selector
|
||||
"#other-calendars-context-list .context_list_context .context-list-toggle-box"
|
||||
end
|
||||
|
||||
def event_popover_header_selector
|
||||
".event-details-header"
|
||||
end
|
||||
|
@ -170,6 +174,10 @@ module CalendarOtherCalendarsPage
|
|||
ffj(account_calendar_list_items_selector)
|
||||
end
|
||||
|
||||
def account_calendar_available_list_item
|
||||
f(account_calendar_available_list_item_selector)
|
||||
end
|
||||
|
||||
def event_popover_title
|
||||
f(event_popover_header_selector)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue