Commit Graph

16 Commits

Author SHA1 Message Date
Jacob Burroughs be5fed6c45 Fix a bunch of erb related specs on rails 7.0
[ignore-stage-results=Flakey Spec Catcher]

Change-Id: Iabf5cb78da428849f89e7e7d02c35d76afc7dafb
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/304423
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Alex Slaughter <aslaughter@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
2022-11-01 15:13:13 +00:00
Cody Cutrer c2cba46851 RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation
[skip-stages=Flakey]

auto-corrected

Change-Id: I4a0145abfd50f126669b20f3deaeae8377bac24d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/279535
Tested-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
2021-11-25 14:03:06 +00:00
Cody Cutrer e73cf9ddf4 RuboCop: Style/HashSyntax
[skip-stages=Flakey]

auto-corrected

Change-Id: I9371a61046aee6b148f89dd434114a8ba2b1188c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/279533
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
2021-11-25 14:02:35 +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
Cody Cutrer 06a2c9df42 spec: remove manual requires of spec_helper
[skip-stages=Flakey]

Change-Id: Id65c835b72e1c0a4bb825b58490ce0ff7c8d9873
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276829
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-26 20:38:27 +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 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
Landon Wilkins 05dec64bbd da licença part 50
add consistent license headers to all source files

Change-Id: Idbd54625443f6fed9057a21730b160765b8ba080
Reviewed-on: https://gerrit.instructure.com/110153
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-04-28 19:01:52 +00:00
Cody Cutrer e1d85fb9b7 rails 5: stop using assigns view specs shim
just do it the right way, since the shim doesn't seem to work in rails 5

this is just a massive find/replace (repeated, due to chained assignment)

refs CNVS-34867

Change-Id: I267a16bed05a116e463cf9301645270e79a2d80e
Reviewed-on: https://gerrit.instructure.com/104193
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2017-03-08 17:51:43 +00:00
Rob Orton 4cbc9483bd only check for user_is_instructor? on courses
fixes CNVS-22405

test plan
 - go to groups/users
 - it should work

Change-Id: I833b8bb514abf1e0cb4f1ca518e02f09ae0cd3c8
Reviewed-on: https://gerrit.instructure.com/60345
Reviewed-by: Rob Orton <rob@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Derek Hansen <dhansen@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
Tested-by: Rob Orton <rob@instructure.com>
2015-08-08 17:56:41 +00:00
Cody Cutrer 60d64cfd2c rspec 3-ify spec/views
refs CNVS-16239

Change-Id: I8bacac4c1f6dcf8f033cbdc859b61ce4a33076dd
Reviewed-on: https://gerrit.instructure.com/42672
Reviewed-by: Paul Hinze <paulh@instructure.com>
Product-Review: Paul Hinze <paulh@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-10-14 00:44:39 +00:00
Simon Williams 98f1648c3d fix url for undeleting quizzes
also fix undeleting practice quizzes

fixes CNVS-11955

test plan:
- in a course, delete a quiz
- go to /courses/:id/undelete
- click the button to undelete the quiz
- it should work

- quick regression on undeleting quizzes/discussion_topics both linked and not
  linked to assignments

Change-Id: I88d30d1baa5685e6c4f16280c9aa34c8965b31fe
Reviewed-on: https://gerrit.instructure.com/32217
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-03-21 21:53:08 +00:00
Simon Williams dd62ef5805 new dashboard design
the new dashboard design categorizes recent activity into buckets that can be
expanded/collapsed, and inidividual messages can be dismissed.  the categories
are announcements, conversations, discussions and assignments.  this redesign
applies to the homepage dashboard, the group home page, and the course homepage
when "recent activity dashboard" is selected as the course home page type.o

the motiviation is that the dashboard should capture and present in one place
important information happening in all the user's courses or groups, and allow
for jumping into this information to see more details:

- announcements/discussions should show on the dashboard when they are created,
  or when there are root replies to recent announcements
- conversations should show on the dashboard when there is new activity
- assignments should show on the dashboard when they are created, or when
  changes are made at least a couple hours after being created

the presence of a dashboard item means there is activity for that item that may
be of interest to the user.  additionally, the dashboard items will show
read/unread state (excluding assignments) for items which the user has not yet
viewed.

additionally, global messages such as course inivitations, account level
announcements, and new user messages have been restyled, but will keep their
place above the recent activity widget on the dashboard.

test plan:
- visit many exising user's dashboards and make sure they are functional in the
  new style.
- visit canvas as a brand new user (no enrollments), a new user enrolled in
  a new course and make sure the dashboard is restyled and the messaging makes
  sense.
- make an account level announcement and make sure it shows up on user's
  dashboards.
- create all different types of conversations: single, group, bulk private,
  from submission comment, add user to convo, etc. and make sure the
  appropriate dashboard items appear and make sense
- create discussions and announcements, reply to them at the root level and at
  the sub entry level (sub entries will not make new dashboard items), test
  from both a read and unread user's perspective, making sure dashboard items are
  correct. (note that read/unread state will not be correct for existing items
  before this code is applied, but should be correct for future items moving
  forward)
- dismiss dashboard items and account announcements, make sure they stay
  dismissed.
- test creating assignments, waiting > 2 hours, and updating due dates or other
  assignment details. make sure items appear. note that unread state will not
  exist for assignment notifications.

closes #10783
refs #11038
refs #11039

Change-Id: I276a8cb1fae4c8a46425d0a368455e15a0c470c5
Reviewed-on: https://gerrit.instructure.com/14540
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-11-11 21:56:16 -07:00
Cody Cutrer b92c17f11d don't infer the current user for nil DiscussionTopic#user in the stream
fixes #8403

test plan:
 * import an external content package with discussion topics
 * make sure to find a discussion topic that has no author
 * on the dashboard of a user that has a stream item about that topic
   it should not show that the current user is the author

Change-Id: I681be31462a82591d60665dce967aa1548ef3a07
Reviewed-on: https://gerrit.instructure.com/10579
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
2012-05-08 12:55:24 -06:00
JT Olds c780d10e15 dashboards for users with nil root_discussion_entries. fixes #5854
Change-Id: I5509461616725a7891977f40a56d527a15c16ef3
Reviewed-on: https://gerrit.instructure.com/6009
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-10-07 14:54:07 -06:00