canvas-lms/spec/selenium
Jackson Howe 827e0dba19 Validate k5 based off flag and account setting
When an account enables k5 mode, store that account's id in its root
account's settings hash. Similarly, when an account disables the
setting, remove it from the set.

Also updates the checks on the dashboard to see if a user should see
the k5 dashboard based on whether they're associated with an account
who has enabled the k5 setting and with a root account where the FF is
enabled.

flag=canvas_for_elementary
closes LS-1919
closes LS-1920

Test plan:
 - Have an account with a subaccount
 - Enable k5 FF at the root
 - In the subaccount's account settings, enable the k5 setting
 - In a rails console, expect
   `Account.find({root_id}).settings[:k5_accounts]` to include the
   account id of the subaccount
 - Disable the subaccount k5 setting
 - Expect the query to now not include anything
 - Enroll a user in a course that's part of a subaccount with the
   k5 setting enabled
 - On that user's dashboard, expect to see k5 dashboard
 - Disable either the setting or the flag; expect to see traditional
   dashboard
 - Expect other user's dashboards not to be affected

Change-Id: I7a70a10063fad8f78677cf8be9be77cbdb1a49d7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/259865
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jeff Largent <jeff.largent@instructure.com>
QA-Review: Jeff Largent <jeff.largent@instructure.com>
Product-Review: Jackson Howe <jackson.howe@instructure.com>
2021-03-08 20:08:13 +00:00
..
add_people spec: remove unneeded instances of ignore_js_errors 2021-02-25 14:56:29 +00:00
admin Make k5 mode an account setting 2021-03-08 16:14:42 +00:00
announcements Change canvas_for_elementary flag to RootAccount flag 2021-03-04 16:35:24 +00:00
assignments spec: enhanced RCE for set of selenium specs 2021-02-19 13:32:10 +00:00
assignments_v2 add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
authorization add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
calendar spec: next set of enhanced RCE selenium scripts. 2021-02-05 15:03:17 +00:00
client_apps add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
conditional_release Allow setting 0 on middle tier of conditional release 2021-02-04 16:33:10 +00:00
conferences add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
content_migrations add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
context_modules add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
conversations spec: wrap inbox specs in react_inbox off context 2020-12-23 17:04:33 +00:00
course_wiki_pages remove bulk delete pages feature flag 2021-02-03 16:29:22 +00:00
courses add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
dashboard Validate k5 based off flag and account setting 2021-03-08 20:08:13 +00:00
differentiated_assignments add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
discussions spec: next set of enhanced RCE selenium scripts. 2021-02-05 15:03:17 +00:00
grades Update column header for view ungraded as 0 2021-03-02 18:04:06 +00:00
helpers Validate k5 based off flag and account setting 2021-03-08 20:08:13 +00:00
master_courses spec: next set of enhanced RCE selenium scripts. 2021-02-05 15:03:17 +00:00
outcomes Remove Common Core top-level display in Find Outcomes 2021-02-19 21:03:04 +00:00
people/pages add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
performance/grades add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
plugins add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
profile add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
quizzes spec: remove unneeded instances of ignore_js_errors 2021-02-25 14:56:29 +00:00
rcs Pretty HTML Editor Screen Reader Label and Focus 2021-03-02 22:02:59 +00:00
shared_components add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
sis add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
syllabus add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
test_setup fix flakey quizzes selenium specs (again) 2021-02-12 22:44:27 +00:00
accessibility_assignments_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
accounts_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
admin_tools_spec.rb add CSV download to bounced emails search 2021-01-21 19:58:12 +00:00
alerts_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
all_courses_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
application_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
brandable_css_js_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
browser_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
cdn_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
collaborations_form_student_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
collaborations_form_teacher_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
collaborations_student_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
collaborations_teacher_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
common.rb bump sanitize to latest 2021-02-17 18:17:57 +00:00
communication_channels_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
concluded_unconcluded_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
content_exports_spec.rb update to inst-jobs 1.0 via shims 2020-10-28 13:46:49 +00:00
content_participation_counts_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
content_security_policy_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
context_modules_menu_tools_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
context_modules_observer_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
context_modules_progressions_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
context_modules_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
context_modules_student_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
context_modules_teacher_a11y_spec.rb split slow context modules spec 2020-12-01 14:46:10 +00:00
context_modules_teacher_homepage_spec.rb change creation language from "New" to "Create" 2021-01-22 21:53:35 +00:00
context_modules_teacher_regressions_spec.rb split slow context modules spec 2020-12-01 14:46:10 +00:00
context_modules_teacher_spec.rb split slow context modules spec 2020-12-01 14:46:10 +00:00
course_copy_spec.rb remove migration shims for auditors datastore 2020-11-09 16:30:30 +00:00
course_sections_spec.rb remove granular permissions for course sections FF 2021-02-01 16:14:42 +00:00
course_settings_spec.rb Change canvas_for_elementary flag to RootAccount flag 2021-03-04 16:35:24 +00:00
course_statistics_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
courses_spec.rb spec: remove unneeded instances of ignore_js_errors 2021-02-25 14:56:29 +00:00
cross_listing_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
dashboard_coming_up_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
dashboard_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
dashboard_teacher_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
dashboard_todo_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
dashcards_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
default_plugins_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
discussion_group_submit_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
discussions_post_grades_to_sis_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
enhanceable_content_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
eportfolios_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
equation_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
excuse_assignment_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
flash_notifications_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
force_failure_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
google_analytics_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
groups_admin_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
groups_pages_student_spec.rb spec: enhanced RCE for set of selenium specs 2021-02-19 13:32:10 +00:00
groups_pages_teacher_spec.rb spec: enhanced RCE for set of selenium specs 2021-02-19 13:32:10 +00:00
groups_student_as_teacher_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
groups_student_spec.rb replace student group name only edit dialog with anew 2020-11-02 21:03:29 +00:00
groups_teacher_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
help_dialog_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
high_contrast_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
i18n_js_spec.rb drop rails 5.2 2021-02-19 02:41:07 +00:00
interactions_report_student_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
international_sms_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
jquery_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
jquery_ui_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
large_enrollments_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
layout_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
links_spec.rb spec: wrap inbox specs in react_inbox off context 2020-12-23 17:04:33 +00:00
localized-timezone-lists_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
login_logout_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
manage_new_groups_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
multiple_grading_periods_spec.rb spec: remove unneeded instances of ignore_js_errors 2021-02-25 14:56:29 +00:00
navigation_spec.rb spec: remove unneeded instances of ignore_js_errors 2021-02-25 14:56:29 +00:00
new_enrollment_page_object_model.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
new_enrollment_ui_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
new_files_folders_spec.rb add granular permissions for course files 2021-01-27 17:02:38 +00:00
new_files_spec.rb add granular permissions for course files 2021-01-27 17:02:38 +00:00
new_files_student_spec.rb add granular permissions for course files 2021-01-27 17:02:38 +00:00
new_files_tools_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
new_ui_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
new_user_tutorial_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
notifications_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
oauth_spec.rb Require terms of service acceptance for the oauth flow 2020-11-06 19:03:42 +00:00
offline_contents_common.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
offline_contents_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
people_settings_spec.rb Add tests and fixes for granular course admin actions 2021-02-15 21:44:28 +00:00
people_spec.rb Add tests and fixes for granular course admin actions 2021-02-15 21:44:28 +00:00
plugins_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
profile_admin_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
profile_common.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
profile_communications_spec.rb remove Conversations prefs category if opted out 2021-01-05 22:30:08 +00:00
profile_spec.rb add h1 to user profile page 2021-01-13 19:58:17 +00:00
profile_student_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
profile_teacher_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
rubrics_teacher_spec.rb Fix inconsistent float and integer ratings display 2020-12-15 12:37:32 +00:00
section_teacher_tabs_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
sections_teacher_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
self_enrollment_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
student_view_toggle_spec.rb Polish easy student view controls 2021-01-27 16:14:40 +00:00
submission_types_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
syllabus_teacher_spec.rb spec: enhanced RCE for set of selenium specs 2021-02-19 13:32:10 +00:00
terms_of_use_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
theme_editor_spec.rb use a single background job to regenerate brand configs 2021-01-22 23:27:35 +00:00
tiny_mce_editor_plugins_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
user_content_student_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
users_spec.rb fix date filtering in page views csv report 2020-11-19 20:35:10 +00:00
wiki_and_tiny_teacher_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00
wiki_pages_spec.rb add # frozen_string_literal: true for specs 2020-10-27 20:48:35 +00:00