Commit Graph

29 Commits

Author SHA1 Message Date
Cody Cutrer 9b71ed2054 RuboCop: Style/BlockDelimiters, Style/Lambda
[skip-stages=Flakey]

auto-corrected

Change-Id: I642f868d75c079e698f1fe4161bbbe419dbe1827
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/279374
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
2021-11-23 21:30:47 +00:00
Cody Cutrer 177ae78e6f spec: remove TestRail test ids
[skip-stages=Flakey]

Change-Id: I1a3ecdef10d14dbc9e7fda1c33d3a10105c6629e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/279299
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-11-23 14:30:45 +00:00
Cody Cutrer c776b6ef3a RuboCop: Style/CommentAnnotation
[skip-stages=Flakey]

auto-corrected

Change-Id: Ic82dbc22b8e63cc5f2ccb9b561cb3b9ed6628966
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/279100
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
2021-11-21 00:50:46 +00:00
Cody Cutrer bb548e0b2c RuboCop: Style/NilComparison, Style/NonNilCheck
auto-corrected

Change-Id: If8c067e5b9bd4d21131c6699900a7a14a988efeb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/279000
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-11-19 22:38:10 +00:00
Cody Cutrer 4d43809cae RuboCop: Style/PercentLiteralDelimiters
[skip-stages=Flakey]

auto-corrected, with a post-review looking for multiline strings
to convert to heredocs

Change-Id: I7f7afb11edd63415cde10866822dd2ac5ba0d8be
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278669
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
2021-11-18 23:05:50 +00:00
Cody Cutrer fe75025e1d RuboCop: Style/RegexpLiteral
[skip-stages=Flakey]

auto-corrected

Change-Id: I98a7afefcbb3631ee046e45fcfc9f955ca7ddca8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278636
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-11-18 02:08:34 +00:00
Cody Cutrer a7b63d64b6 RuboCop: Rails/PluralizationGrammar
[skip-stages=Flakey]

auto-corrected

Change-Id: Ic4251151b5b57790b344cb43fd475cd3c08bc8ef
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278367
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-11-17 15:17:27 +00:00
Cody Cutrer 9b5ab437d5 RuboCop: Performance/TimesMap
[skip-stages=Flakey]

manual (it says it's auto-correct, but it didn't. which is fine cause a few
I simplified in other ways than using Array.new)

Change-Id: I8a4d5cf61deac22ad24e012f5a6f3647c84d3d3c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278312
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-11-16 16:20:35 +00:00
Cody Cutrer b70d3ab89d RuboCop: Style/SingleLineMethods, Style/Semicolon
[skip-stages=Flakey]

auto-corrected

Change-Id: Ib94ed586a0d5bf4985a5367144d398eeee706303
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/278138
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-11-12 18:39:32 +00:00
Cody Cutrer 8125858d27 RuboCop: Style/RedundantInterpolation
[skip-stages=Flakey]

auto-corrected

Change-Id: Id04fd07bb918f0f4dc376b5c3474653a8e767e95
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277870
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-11-11 02:06:11 +00:00
Cody Cutrer eefb34d6c2 RuboCop: RSpec/HookArgument
[skip-stages=Flakey]

auto-corrected

Change-Id: Ifb3f097064db0e00313a079a45da7e651b58d30b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277798
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-11-10 16:40:43 +00:00
Jackson Howe c56ca86d13 Show publish buttons in course settings
For all courses, not just k5.

closes LS-2811
flag = none

Test plan:
 - Open a course with no grades as a teacher
 - Expect to see publish buttons on home page and in settings, also
   expect the published status indicator to be gone in settings
 - Open a course with grades as a teacher and/or any course as a ta
   (a user without permission to publish)
 - Expect to see the publish indicator on the settings page but no
   publish buttons there or on the home page
 - Expect the above to work for homeroom courses and k5 subjects
   (although no publish controls appear on the home page in subjects)

Change-Id: I46f14c7d280cf8cf20ec32a4f370913765485ece
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277537
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Peyton Craighill <pcraighill@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-11-08 18:43:38 +00:00
Robin Kuss 1f94b62a77 spec: move selenium specs to directories
Closes LS-2817

Test Plan: passes Jenkins

[skip-stages=Flakey]

Change-Id: Ic5ac43e5417b685e83a117de864f8af6556ecb60
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/277354
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Tested-by: James Butters <jbutters@instructure.com>
Product-Review: Robin Kuss <rkuss@instructure.com>
2021-11-08 18:17:47 +00:00
Cody Cutrer 0a025efa2f spec: use require_relative instead of require File.expand_path
[skip-stages=Flakey]

Change-Id: I861a46acffa893b4ea6630039da66851c71b5a77
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276831
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-10-28 00:15:03 +00:00
Robin Kuss b57934335e spec:pace plan modules selenium
Closes LS-2767

Test Plan: passes Jenkins and tests the pace plan modules

Change-Id: Id8cdb359ca396e3ad550d2e9d46e3da420e5be02
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276584
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Nate Armstrong <narmstrong@instructure.com>
QA-Review: Nate Armstrong <narmstrong@instructure.com>
Product-Review: Robin Kuss <rkuss@instructure.com>
2021-10-25 19:02:34 +00:00
Cody Cutrer 349ff7fa49 RuboCop: Lint/UnusedMethodArgument spec
[skip-stages=Flakey]

all manual

Change-Id: I7703886011d35c28ba1b06414a39671eca12b501
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276448
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-10-21 16:20:05 +00:00
Cody Cutrer 6cb0ea010c RuboCop: Lint/UselessAssignment spec
[skip-stages=Flakey]

all manual

Change-Id: I615934f94060ed339c17d6a73599487dc577e376
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276433
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-10-21 13:38:12 +00:00
Robin Kuss 39360574df spec: initial pace plans selenium specs
Closes: LS-2749

Test Plan: passes Jenkins

Change-Id: I0177ca1d9962fc8b73fae78920bb80d8e7178b48
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/275981
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Nate Armstrong <narmstrong@instructure.com>
QA-Review: Nate Armstrong <narmstrong@instructure.com>
Product-Review: Robin Kuss <rkuss@instructure.com>
2021-10-15 19:23:39 +00:00
Jackson Howe 8b64f475c9 Use k5 CreateCourseModal everywhere
When the flag is on, show the new create course modal (instead of the
classic one). Moves the modal and its utils into a new shared package.
Switches vocab from classic to k5 based on user. Hides homeroom sync
details in classic mode.

closes LS-2648
flag = create_course_subaccount_picker

Test plan:
 - In root account settings, allow teachers to create courses
 - Visit the k5 dashboard as a teacher or admin. Expect to always see
   the new create course modal with 'subject' vocab when clicking the
   '+' new course button regardless of flag state.
 - Visit the classic dashboard as a teacher or admin. Expect to see
   the classic create course modal with the flag off, and the new
   modal with the flag on (and 'course' vocab in the modal).
 - Visit the /courses page as a teacher or admin. If k5 is on, expect
   to see the new modal with 'subject' vocab regardless of flag state.
   If k5 is off, the modal shown should depend on the flag (and use
   'course' vocab).

Change-Id: I85ed8a98896fc0470de0b751e739a41f00a0b982
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274555
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Peyton Craighill <pcraighill@instructure.com>
2021-09-29 22:36:32 +00:00
Cody Cutrer dbd8c46655 RuboCop: Lint
[skip-stages=Flakey]

auto corrections applied:
 * Lint/AmbiguousOperator
 * Lint/AmbiguousOperatorPrecedence
 * Lint/AmbiguousRegexpLiteral
 * Lint/DeprecatedClassMethods
 * Lint/DeprecatedOpenSSLConstant
 * Lint/NonDeterministicRequireOrder
 * Lint/ParenthesesAsGroupedExpression
 * Lint/RedundantRequireStatement
 * Lint/RedundantSafeNavigation
 * Lint/RedundantSplatExpansion
 * Lint/RedundantStringCoercion
 * Lint/RedundantWithIndex
 * Lint/SendWithMixinArgument
 * Lint/SymbolConversion

Change-Id: I222ec19978033544513bb99755994d109435abad
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274551
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-09-29 03:38:23 +00:00
Cody Cutrer b6e406ddcf RuboCop: RSpec/ExampleWording
[skip-stages=Flakey]

Change-Id: I291432cd1f51fdaefb3cf6160d423879fb858c11
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274253
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-09-24 02:15:35 +00:00
Cody Cutrer 1bf181eaa2 RuboCop: Layout spec/selenium
Change-Id: I1337af0129203761719b5fdcee3799dd5dea611f
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274127
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-09-22 16:34:15 +00:00
Nate Armstrong ed75ec75cd Fix 'Show Announcements on Home Page' label
fixes LS-2602
flag=none

Test plan:
- View settings for a course
- Show Announcements on Home Page checkbox should have a label

Change-Id: I34ea69de218d17b532ea472ec296830101468e85
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/272947
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Jonathan Guardado <jonathan.guardado@instructure.com>
QA-Review: Jonathan Guardado <jonathan.guardado@instructure.com>
Product-Review: Nate Armstrong <narmstrong@instructure.com>
2021-09-07 19:52:01 +00:00
Ed Schiebel d7f18058fc Use new subject modal on course index page
closes LS-2546
flag=none

test plan:
  - in k5 mode, with at least 1 homeroom
  - logged in as a teacher
  - go to "All Subjects" page (/courses)
  - click the  +Subjects button
  > expect the "Creat Subject" modal to open
  - click the 'x'
  > expect it to close
  - click +Subject then Cancel
  > expect it to close
  > click +Subject
  > expect the dialog to work as it always has
    - checking sync enrollments shows current homeroom courses
    - entering subject name enabled Create button
    - clicking Create button creates the course in the teacher's account

  - repeat, logged in as an admin
  > expect the dialog to include "Which account will this subject
    be associated with" dropdown.
  > expect it to work as expected

  - turn of canvas for elementary
  - go to /courses
  > expect the button to be +Courses
  - click it
  > expect the "Start a New Course" modal

Change-Id: I1b557249be9917d492dd9b57da2e335fd6d18209
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/272336
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Peyton Craighill <pcraighill@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2021-08-30 16:12:18 +00:00
Jackson Howe 5752a7e6c1 Disable favoriting of k5 courses for students
Don't show stars next to k5 courses (subjects & homerooms) on the
course index for students/observers. Hide the starring column
completely if none of the courses in the table are favoritable. The
dashboard_cards endpoint will always return all k5 courses where the
user has a student/observer enrollment, plus classic courses and k5
courses with an admin enrollment that are favorited (up to 20 if no
valid favorites, or all of the user's favorited courses).

closes LS-2504
flag = none

[ignore-stage-results=Flakey Spec Catcher]

Test plan:
   Favoritable == a classic course or a k5 course in which the user
   has a teacher/ta/designer enrollment type
 - Visit /courses as a user with both favoritable and non-favoritable
   enrollments (preferably with current, past and future enrollments)
 - In each of the tables (current, past, and future enrollments),
   expect to see stars next to favoritable courses and nothing next
   to non-favoritable courses
 - Remove some favoritable enrollments - if the table only contains
   non-favoritable enrollments, expect the entire favoriting column to
   be gone
 - Unstar everything
 - Visit the dashboard, expect to see all enrollments (up to 20)
 - Star a few things, expect to see all favorites plus any
   non-favoritable courses

Change-Id: I122ccaba7e98ab256a976b11c9fb8115149f5dcd
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/271122
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Robin Kuss <rkuss@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Peyton Craighill <pcraighill@instructure.com>
2021-08-23 15:42:53 +00:00
Cody Cutrer 81d0bbc465 add # frozen_string_literal: true for specs
Change-Id: Id508bec1817937b1c24c29f1db7221e09cb9c2ab
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251157
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2020-10-27 20:48:35 +00:00
Anju Reddy 7c61869c5e spec: unskip courses specs
Change-Id: Ideb2924ea5f6d67cd9f6a3e09720c1fb25461d5b
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/227996
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Williams <jamesw@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Anju Reddy <areddy@instructure.com>
2020-02-28 18:02:27 +00:00
sshepherd 320eddfaad spec: Convert final course wizard specs to POM
closes: USERS-72

There were two remaining specs that weren't fully converted to POM
in the course_wizard_spec.rb file. Converted them fully to POM
by adding new objects for calendar and course pages.

Also changed skips to rely on a bug fix, since they seem to
meet time thresholds now.

Change-Id: Icb3f7205a0644026fc520ce8e3298cc8a8339850
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/219806
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Tested-by: Jenkins
Reviewed-by: Anju Reddy <areddy@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Steve Shepherd <sshepherd@instructure.com>
2019-12-06 21:52:06 +00:00
sshepherd 12a3e02fad spec: course wizard page components
closes: USERS-60

All tests are skipped. Moved course wizard tests
out of selenium/courses_spec.rb.

Created page objects for Courses, and tried a new
approach with page components, sections of a page

Change-Id: Ia0b98aa9c901482fa479aab29bb53e04253d3488
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/215890
Tested-by: Jenkins
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: Steve Shepherd <sshepherd@instructure.com>
Product-Review: Steve Shepherd <sshepherd@instructure.com>
2019-11-12 16:15:09 +00:00