Commit Graph

6820 Commits

Author SHA1 Message Date
James Williams 469635d623 use real user for locale and timezone settings when masquerading
test plan:
* log in as a teacher
* set the locale and time zone as the user
* enter student view for a course
* should still use the same locale and time zone
 as the real user

closes #CNVS-1488

Change-Id: I81636f3c34a7ded7fb0aec025a6fc8fba9659efd
Reviewed-on: https://gerrit.instructure.com/52516
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2015-04-20 20:12:54 +00:00
James Williams d6786dbdbc spec: more spec fixes
refs #CNVS-19842

Change-Id: I71b8ee06e6d030260f75736ad9b34b0ce3179469
Reviewed-on: https://gerrit.instructure.com/52464
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-04-20 19:06:52 +00:00
Ryan Taylor 0bfe1c1cea Adds question_types to quiz API responses
Necessary for mobile quiz selection

Closes CNVS-19613

Test Plan:
  - Confirm that quiz API endpoints return question_types array,
    containing unique quiz question types.

Change-Id: If1a51bb101fc6a346872c7d5952cb68d32e85397
Reviewed-on: https://gerrit.instructure.com/52217
Reviewed-by: Brian Finney <bfinney@instructure.com>
Tested-by: Jenkins
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Ryan Taylor <rtaylor@instructure.com>
2015-04-20 16:04:42 +00:00
Jahnavi Yetukuri 98fe7017c2 Refactor context modules spec
Change-Id: I3894d9d64eab25ca50b4ec840ab5f821da1f8440
Reviewed-on: https://gerrit.instructure.com/48204
Tested-by: Jenkins
Reviewed-by: Pedro Fajardo <pfajardo@instructure.com>
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
2015-04-20 15:57:27 +00:00
Derek Hansen 2715d5d021 Google Drive assignment submission selenium specs
Test plan:
- Pass Jenkins

Change-Id: I183dcb617675af36f49d6b4b71641804f8e5b6ba
Reviewed-on: https://gerrit.instructure.com/51359
Tested-by: Jenkins
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
2015-04-17 22:21:29 +00:00
Nathan Mills f42dbeedd8 remove query params from lti launch params
fixes PLAT-940

test-plan:
create a lti launch with query params
the query params should not be included in the lti post body
the oauth signature should also still be valid

Change-Id: I6b1e8a164be383dd1eb2c662ae7d3fc3d0a4b87b
Reviewed-on: https://gerrit.instructure.com/52250
Tested-by: Jenkins
Reviewed-by: Brad Humphrey <brad@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
QA-Review: August Thornton <august@instructure.com>
2015-04-17 21:53:47 +00:00
Cody Cutrer 0e2aa6ad94 wrap CAS logins in a timeout
fixes CNVS-19856

test plan:
 * point to a non-existent CAS server that will hang instead of
   rejecting the connection
 * go to /login/cas?ticket=ST-abcd
 * it should fail in 5s

Change-Id: I9460659c899dddfbef2494ab89c558c4a8a4543a
Reviewed-on: https://gerrit.instructure.com/52369
Reviewed-by: Zach Wily <zach@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2015-04-17 21:48:11 +00:00
Cody Cutrer b6715c3e25 add pluck option to find_in_batches_with_temp_table
basically it only works with primary keys right now, cause
Rails 3 doesn't support multi-column pluck

Change-Id: I2c401232b880246b68745f3908266a83b2c9ccd0
Reviewed-on: https://gerrit.instructure.com/52445
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
2015-04-17 21:19:28 +00:00
Jon Willesen 43a9f543b9 fix newRecord on calendar events create/edit page
the newRecord field wasn't being initialized properly on the
calendar events editing page, which made the page think it was
always editing.

fixes CNVS-19758

test plan:
 - Start creating a calendar event and click "more options"
 - The primary button on the edit screen should read
   "Create Event"
 - Create a calendar event, edit it, and click "more options"
 - The primary button on the edit screen should read
   "Update Event"

Change-Id: Iccf9aaaa6d7502bc0cd35785b3b3a7a81c0233dc
Reviewed-on: https://gerrit.instructure.com/51963
Tested-by: Jenkins
Reviewed-by: Joel Hough <joel@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jon Willesen <jonw@instructure.com>
2015-04-17 20:57:24 +00:00
Cody Cutrer 469cd7b7b0 bump i18n gem
Change-Id: Id4861909c0c1fb6a2e53c04ec5f6c1e315ed9595
Reviewed-on: https://gerrit.instructure.com/47747
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2015-04-17 19:49:17 +00:00
Jeremy Stanley 70670c7d45 add custom permission maps to new verifiers
for verifiers that grant access to files that would otherwise
not be accessible (such as a file attachment in user context),
allow them to check permission on a different object instead.

in this commit, the verifier remaps file permissions for
eportfolio attachments to permissions on the eportfolio itself.

test plan:
 - create an eportfolio, and set it to public
 - attach a file to it
 - verify that another user can view the eportfolio and the
   file attachment
 - save the URL to the file attachment
 - uncheck the public eportfolio setting and save it
 - verify that the saved URL for the file attachment no longer
   works

fixes CNVS-19719

Change-Id: Ic1839f13d571d3f5f2aa692f94bd1fd1d5e485ca
Reviewed-on: https://gerrit.instructure.com/52120
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-04-17 19:04:44 +00:00
Ethan Vizitei caba91e8df The reference spec
Not included in any production code, this is meant to provide
the beginnings of an example spec for how to write other specs.

Ideally folks will add to it as they find funny things to fix
in their areas in the codebase

Change-Id: I4017f42e0c6f177534882272317be5f19973dd8f
Reviewed-on: https://gerrit.instructure.com/52428
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Tested-by: Jenkins
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
2015-04-17 16:48:38 +00:00
Ben Bolton bcb75e1fc1 Compares create time of a reply with its edit time
Test Plan:

- Passes Jenkins

Change-Id: Ib1dc30645ca83f0fb1686a8d3ecf0cc840b330c2
Reviewed-on: https://gerrit.instructure.com/52381
Tested-by: Jenkins
Reviewed-by: Derek Hansen <dhansen@instructure.com>
Product-Review: Derek Hansen <dhansen@instructure.com>
QA-Review: Ben Bolton <bbolton@instructure.com>
2015-04-17 14:50:43 +00:00
James Williams 7f3eef53b3 remove fallback param from users controller
"/images/users/0?fallback=URL" should not work

closes #CNVS-19810

Change-Id: I0d3f5ba77cbf1b39885a8b7b8a7c9443a913cfb5
Reviewed-on: https://gerrit.instructure.com/52239
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
2015-04-17 14:12:57 +00:00
Ethan Vizitei 50063b0d3e 4 important changes for stabilizing the aux build
1) explicitly return true from global click event handlers
to stop them getting in the way of event propogation (really that
event handler should go away, but one step at a time here)
2) clean events from "document" in our fragile react component test to
prevent other changes like #1 from fragile-ing that spec again.
3) un-duck-punch some global functions in a jsx spec
4) remove a console.log from a spec

Items 1 and 3 are the real problems here.  global event handlers that
never go away are always getting silently called, and coffeescript
returns whatever the last line of the file is.  If you're not trying
to stop event propogation, return true expliclty.

3 is just bad practice. impacting global state without cleaning up
afterwards is a no-no.  That's why we have setup and teardown.  Also,
getting by without overwriting global state and instead
architecting to accept a collaborator would be a great next step.

After this commit, I've gotten 15 solid qunit full runs passing locally
in a row

Change-Id: I335f7e416d538ecc833dd30c92cc84b8c2a3d995
Reviewed-on: https://gerrit.instructure.com/52397
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Tested-by: Jenkins
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
2015-04-16 22:41:27 +00:00
Spencer Olson aba636a400 clean up gradebooks_controller_spec
remove 'should's from spec descriptions, shorten line lengths, and
remove remaining draft state references.

closes CNVS-19803

test plan:
run `rspec spec/controllers/gradebooks_controller_spec.rb` and ensure
all tests pass.

Change-Id: I917099f6ff7bbf6580ad5a0231a54db27ec2c4e5
Reviewed-on: https://gerrit.instructure.com/52121
Tested-by: Jenkins
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
Reviewed-by: Derek Bender <dbender@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
Product-Review: Spencer Olson <solson@instructure.com>
2015-04-16 22:03:55 +00:00
Steven Shepherd 1c044e1641 Add specs to test teachers removing students from groups
Test Plan:
  - Run Specs

Change-Id: I432f96376dd8a0661e572a70989de801858543ac
Reviewed-on: https://gerrit.instructure.com/52358
Tested-by: Jenkins
Reviewed-by: Derek Hansen <dhansen@instructure.com>
Product-Review: Derek Hansen <dhansen@instructure.com>
QA-Review: Derek Hansen <dhansen@instructure.com>
2015-04-16 20:42:09 +00:00
James Williams 0011b60afc spec: don't send real requests in conferences_controller_spec
fixes spurious test failures occuring when other specs
require webmock and cause conferences_controller_spec to
fail with a WebMock::NetConnectNotAllowedError

refs #CNVS-19842

Change-Id: Iad091471d4b339d036e182fe849946ea104e62f9
Reviewed-on: https://gerrit.instructure.com/52337
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-04-16 19:58:41 +00:00
James Williams 37f4a6a1c5 spec: more fragile plugins spec fixes
refs #CNVS-19842

Change-Id: Ia7748aa1ce10add55486dcd629bd6a3d4cef97c9
Reviewed-on: https://gerrit.instructure.com/52343
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-04-16 19:58:24 +00:00
Ethan Vizitei 96655903e3 stop using the body for DOM manipulation
this causes all our tests to do their dom manipulatio
inside the fixtures element, and makes sure to wipe the fixtures
element clean whenever it gets used.  This prevents DOM changes from
leaking between tests, much like database cleaner in ruby

Change-Id: I84f360609214557af6911ed6722928286d81a1ca
Reviewed-on: https://gerrit.instructure.com/52361
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Tested-by: Jenkins
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2015-04-16 19:30:43 +00:00
Cody Cutrer 0cc18ec825 don't include throttling info on non-authenticated requests
Change-Id: Id81af684c28b417aed92162866e382736dd7a22f
Reviewed-on: https://gerrit.instructure.com/51917
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2015-04-16 18:50:11 +00:00
Brad Horrocks 974c92bfa9 send login_hint as a users google doc email if available
When ititializing we attempt to pull a users email adress from an
existing google doc user service

Fixes PLAT-989

Test plan
Make sure that you see your google docs email when authing google drive.

Change-Id: Ia52af22bff17eda723cd5a29e014ea09d08c95af
Reviewed-on: https://gerrit.instructure.com/52210
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
2015-04-16 18:24:44 +00:00
Ethan Vizitei 2afebff07e patch several specs to cleanup DOM state
Not cleaning up the DOM after tests that put markup into "fixtures"
can cause inconsistent starting state for other specs.

This takes several specs that do that and cleans them up in my push
to have less fragile aux builds

Change-Id: Id83a5724b9ea23d5d6879eae08f7ae29c8a3f7f2
Reviewed-on: https://gerrit.instructure.com/52335
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Ethan Vizitei <evizitei@instructure.com>
2015-04-16 17:55:44 +00:00
James Williams c0a22137a5 only show one enrollment per course/type on courses index
test plan:
* enroll a user into multiple sections of a course
* should not show a row for every single section
 enrollment (when they all go to the same page anyway)

closes #CNVS-19740

Change-Id: Iad147b97f1d9058b6e7561b302176771d1cc08de
Reviewed-on: https://gerrit.instructure.com/52138
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2015-04-16 17:41:34 +00:00
Spencer Olson d7162d0e12 make grading periods feature flag a course level flag
make the grading periods feature flag a course level flag, and also
'unlock' the account level grading periods. now, a teacher can edit
account level periods, but when they click 'save' it will create
a new course-level grading period instead of altering the original
account-level period. also added a link to the feature flag settings
page if there is only one grading period on the page. in addition,
if only template periods are being shown on the page and you're
logged in as a teacher, added a message that notifies the user
that the periods were created by an administrator for them.

closes CNVS-18741
closes CNVS-19692

test plan:

this commit makes substantial changes to the way grading periods are
being displayed, deleted, and saved on the
'accounts/:account_id/grading_standards' page and the
'courses/:course_id/grading_standards' page. users should still be able
to create/update/delete grading periods without problems on those pages.

in addition, this commit makes changes to the feature flag settings pages
for admins and teachers. make sure the feature flags are working correctly
(try setting the MGP flag to 'on', 'off', and 'allow' as an admin and see
how it affects the feature flag options for sub-accounts and teachers).

Change-Id: I0b442e708a8049180b55a86098e30a2c64673eda
Reviewed-on: https://gerrit.instructure.com/51594
Tested-by: Jenkins
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
Product-Review: Spencer Olson <solson@instructure.com>
2015-04-16 15:19:49 +00:00
Ethan Vizitei 0475e95587 delay loading the fixtures part of the DOM until setup
Also be sure about cleaning up inside the fixtures, because
one theory I have about some fragile specs is the sanitation of
what's in the fixtures element.

Very occasionally, the fixtures element would be null by the time this
spec ran.  By binding at setup, it seems to always be present.  Need
to investigate further why fixtures is sometimes not there at definition
time, but this has made this spec pass reliably locally (whereas I could
generate about a 4-5% failure rate by just running the full suite over
and over before)

Change-Id: Id3935cbaed829d2399ecc6a74ed28730754d6cc6
Reviewed-on: https://gerrit.instructure.com/52329
Tested-by: Jenkins
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
2015-04-16 14:37:07 +00:00
Ethan Vizitei 4e66ed5a21 fix fragile js specs
this spec doesn't cleanup after itself, so
other specs are inheriting a polluted DOM.  Fix it.

Change-Id: I16ef30756f6fb15b6b1719b3dac0cc612c33669e
Reviewed-on: https://gerrit.instructure.com/52334
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Tested-by: Jenkins
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
2015-04-16 14:36:51 +00:00
Simon Williams dde9ee86ca announcements rss feed shows correct list of visible announcements
fixes CNVS-19529

test plan:
- in a course, create the following types of announcements:
  * a normal announcement that is visible
  * an announcement that is post_delayed for the future
  * an announcement that is closed for comments (create announcement, go
    to show page and close for comments in the cog menu)
  * an announcement that is deleted (create and the delete)
- view the announcement rss feed as a teacher and a student
- the teacher should see everything but the deleted discussion
- the student should just see the normal one and the closed for comments
  one

Change-Id: I46dd583c01cbd7817f3d599cb3816bf386cf3266
Reviewed-on: https://gerrit.instructure.com/51095
Tested-by: Jenkins
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2015-04-16 14:31:32 +00:00
Ethan Vizitei 41a4a84431 Use fixtures instead of polluting the body
body seems to be volatile, fixtures should get cleaned up
after each test.  After this, I was able to get 10
full test runs to pass in a row, seems to have knocked down
the fragility.

TEST PLAN:
  qunit specs should pass

Change-Id: Id6ae5a8e43f2eccd1d7e00b656cf93703793ac27
Reviewed-on: https://gerrit.instructure.com/52330
Tested-by: Jenkins
Reviewed-by: Zach Wily <zach@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
2015-04-16 04:28:04 +00:00
Ethan Vizitei 725a4c9b2f remove an unused spec helper
No test uses this "toString" function and when other processes
call toString implicitly (like in a regex comparison or similar) this
can override the expected behavior, producing errors for
elements that don't have the expected configuration.  These errors
fail js tests intermittantly, contributing to the fragility of the
aux build

removing it cuts down on spurious javascript failures.

Change-Id: I5b1eb12ecc7d1b849282f5011dbad89142208bf4
Reviewed-on: https://gerrit.instructure.com/52320
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Jenkins
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
2015-04-16 03:17:36 +00:00
Ethan Vizitei a7ab391687 dont nest qunit tests inside their module declaration
This causes each test to pickup the context of whatever module
was declared before.  H8u qunit.

TEST PLAN:
  JS specs should pass

Change-Id: Iad666ed45e3fb2d147d331b04290f491f42acb8c
Reviewed-on: https://gerrit.instructure.com/52318
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
2015-04-16 00:52:27 +00:00
Ethan Vizitei 029265e40f dont let tinymce strip span tags
closes CNVS-19814

adds "span" to the config string of valid elements, that's the fix.  To
make testing these easier in the future I created some integration-ish
tests for the config that actually stand up an instance and feed
an html string through it to see what it does with them.  That should
make testing these easier in the future.

also cleaned up a few missing semicolons
and inconsistent key/val styles.

TEST PLAN:
 - Go to any tinymce editor
 - switch to the HTML editor
 - add some code with a span tag
 - toggle back and forth between RCE and html editor
 - the span should not get stripped out
 - then follow the acceptance plan on the ticket to make sure their
    specific code example works (all the way through saving the context)

Change-Id: I51ff6a6bf9d1f823fa581fbb92ac83e7ad5f3e3e
Reviewed-on: https://gerrit.instructure.com/52251
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2015-04-15 22:23:58 +00:00
Adam Stone d2fbb38808 Outcomes automation enhancements.
Fixed the should_validate_mastery_points test.
It was getting a false positive from the title not being present.
Added tests for decaying average and n mastery calculation int validation.
Added a test for validating the calculation method drop down.
Added priorities for the different outcome specs.
Teacher level is now priority 1.
The two admin levels are at priority 2.
Removed some redundant tests from the outcome_spec.
They were already being run at that same account level
in the account_admin_course_outcomes spec.

Changed submit button to .click instead of js.
Changed to match_array in case the order of options changes.
Moved the expected options to their own array to cut down on
expects.
Concatenated range into expected error string.
Fixed white space.
Changed hashes to new standard.

Change-Id: Iecb4dc1b8d7fb3e7bf9d8455579defe75f62b9a7
Reviewed-on: https://gerrit.instructure.com/52013
Tested-by: Jenkins
Reviewed-by: Jahnavi Yetukuri <jyetukuri@instructure.com>
Reviewed-by: Sean Lewis <slewis@instructure.com>
Product-Review: Pedro Fajardo <pfajardo@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
2015-04-15 21:05:20 +00:00
Adam Stone a66706978c Eportfolio time stamp validation.
Added a test for eportfolio time stamp validation in the UI.
Added a priority to the test, as well as some spacing for readability.

Altered the "should add a new page" test to use the enter key
instead of clicking on the main body to save the page name.
Also added a wait before the replace content for page title.

Change-Id: I507d81b605ac06686e1991fa0360458cd6694b61
Reviewed-on: https://gerrit.instructure.com/49892
Reviewed-by: Robert Lamb <rlamb@instructure.com>
Tested-by: Jenkins
Product-Review: Pedro Fajardo <pfajardo@instructure.com>
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
2015-04-15 21:04:48 +00:00
James Williams e4666edf09 default has_no_front_page to true for new wikis
also fixup old ones

test plan:
* export a course with a wiki page set as the front page
* create a new course
* import the exported package
* should be set as the front page

closes #CNVS-14601

Change-Id: Icb660f2c84ab9a9c208d0fc092cf348d69edcab7
Reviewed-on: https://gerrit.instructure.com/52245
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
2015-04-15 20:00:19 +00:00
cguanzon 67e9eb1853 selenium: uses fln method from common.rb
- we have an fln method, let's use it

Change-Id: If160f53e4e2de7113b9c895606d7ede396ac547b
Reviewed-on: https://gerrit.instructure.com/52128
Tested-by: Jenkins
Reviewed-by: Derek Hansen <dhansen@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Jahnavi Yetukuri <jyetukuri@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
2015-04-15 19:18:06 +00:00
Jahnavi Yetukuri 81fe67943b Search for a file, Move a file specs
Change-Id: Ia66d9d78830ed4343c4a5435ec2e61e76b1b0cbc
Reviewed-on: https://gerrit.instructure.com/51669
Tested-by: Jenkins
Reviewed-by: Robert Lamb <rlamb@instructure.com>
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
2015-04-15 19:06:42 +00:00
cguanzon 25cf67d6de selenium: removes .click from fba in common.rb
- fba stands for find by attribute
- removing .click makes the method a pure find

Change-Id: I5849593df602b0b29de6f5ce80ea2d1497be623e
Reviewed-on: https://gerrit.instructure.com/52113
Reviewed-by: Pedro Fajardo <pfajardo@instructure.com>
Tested-by: Jenkins
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
2015-04-15 15:54:27 +00:00
Jacob Fugal 43f8be381e prefer tDateToString/tTimeToString over strftime
refs CNVS-19516

the {{strftime}} handlebars helper requires use of a hard-coded format
string that's locale-unaware. tDateToString and tTimeToString take
localization keys so that you get a format string appropriate to the
locale.

the remaining calls to {{strftime}} are for fixed-format
machine-oriented strings, where they shouldn't be localized. this is an
appropriate use, but really the only time {{strftime}} should be used.

additionally, for all but the calendar agenda view, these should have
been using fudged values ({{strftime}}, {{tTimeToString}} and
{{tDateToString}} all expect fudged dates as input). fix that, too,
while we're in here.

finally, while adding specs, found that Date.parse doesn't like
milliseconds, which meant dates weren't actually happening in the
assignment-related specs; fixed that by switching to tz.parse. Since the
values being parsed were explicitly UTC, this doesn't change the parsing
semantics (e.g. fudged vs. not)

test-plan:
 - set Norwegian as your locale

 [edit assignment dialog]
  - create an assignment with multiple due dates
  - go back to the assignment list, and choose the edit dialog from the
    cog menu
  - the tool-tip on the "Due" field should include the multiple dates
    formatted as "<day> <month>" rather than "<month> <day>"
  - also check same field for timezone consistency when profile timezone
    does not match browser timezone

 [assignment page]
  - for the same assignment, click through to the assignment's page
  - the due dates should display as "<day> <month>" rather than "<month>
    <day>"
  - also check same field for timezone consistency when profile timezone
    does not match browser timezone

 [availability column in assignment list]
  - for the same assignment
    - make one due date have an unlock at in the past and lock at in the
      future
    - make another due date have an unlock at in the future
  - view the assignment list
  - the tool-tip on "Multiple Dates" next to "Available" should have
    "<day> <month>" instead of "<month> <day>" for both the "Available
    until" (first section) value and the "Not available until" (second
    section) value
  - also check same field for timezone consistency when profile timezone
    does not match browser timezone

 [calendar agenda view]
  - go to the calendar agenda view
  - the due date times for future assignments should have 24-hour
    formatting, not 12-hour
  - the event dates for future non-assignment events should also have
    24-hour formatting
  - also check same fields for timezone consistency when profile
    timezone does not match browser timezone

 [feature flags]
  - go to the feature flags pane in course settings
  - the "Estimated Release" for "New Quiz Statistics Page" should format
    "<day> <month> <year>", not "<month> <day>, <year>"

Change-Id: I0226cc14adcd39eceaa0e5f4bf66e0eefdc0bbf3
Reviewed-on: https://gerrit.instructure.com/51448
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
2015-04-15 15:41:45 +00:00
Ethan Vizitei b1235a0631 Plugins UI needs 'dynamic_form'
closes CNVS-19816

make sure we have a spec to check rendering of the plugins
setting view from now on, and explicitly require 'dynamic_form'
in the plugins controller

also removes a linter that shouldn't be on for
describing classes (or views in this case)

TEST PLAN:
 1) go configure any plugin
 2) it should not explode

Change-Id: I32e58a524ddb18b922ba79e20e9e7b9c1f2a8f07
Reviewed-on: https://gerrit.instructure.com/52216
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2015-04-15 14:44:49 +00:00
James Williams dd941fc6a6 fix lock_all_announcements being reset on course publish
test plan:
* create a course
* save "Disable comments on announcements" on the settings
* publish the course
* the box in the settings should still be checked

closes #CNVS-14882

Change-Id: I009ee2f4dd521428219b88e579d7f1cb6269af54
Reviewed-on: https://gerrit.instructure.com/52107
Tested-by: Jenkins
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-04-15 13:16:54 +00:00
Simon Williams 531080ffa8 disable fragile external feed qunit specs temporarily
Change-Id: I124dfbe44fb5f0fec4a9c8b87786535a5f74fc87
Reviewed-on: https://gerrit.instructure.com/52209
Tested-by: Jenkins
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2015-04-15 02:14:14 +00:00
James Williams 945440dc40 reset page user on re-import
test plan:
* import a package with a page into a course
* edit the page
* re-import the package
* the revision history should not show the user
 who last edited it as the author of the latest
 revision (caused by the re-import)

closes #CNVS-19724

Change-Id: I525fe59295b8d9d266387045ef0f98a3d0154651
Reviewed-on: https://gerrit.instructure.com/52108
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
2015-04-14 21:12:54 +00:00
James Williams 5e5cd7b79c add tinymce editor for quiz question comments
test plan:
* should be able to create and edit question and
 answer comments using the html rce editor
* should be able to edit previously uneditable
 comments imported by certain packages

closes #CNVS-15633 #CNVS-10161

Change-Id: I3879fa3a2bb71e3e0f4ceefd66da3dbba41b0549
Reviewed-on: https://gerrit.instructure.com/52075
Reviewed-by: Brian Finney <bfinney@instructure.com>
Tested-by: Jenkins
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
2015-04-14 20:29:42 +00:00
Benjamin Porter 20c0daa263 Learning Outcome Model add rubric_criterion method
This is very handy (and is used in a forth-coming patchset), and
provides symmetry with the rubric_criterion= method.

Refs CNVS-18658

Test Plan:

    - From a rails console, create a learning outcome object
    - Set some rubric_criterion data (you can use rubric_criterion=)
    - Check that rubric_criterion() returns that data to you
    - Check that it is the same data as returned by
      data[:rubric_criterion]

Change-Id: I5677f33604cb7965c7b7113f58dd97472f7dd9fb
Reviewed-on: https://gerrit.instructure.com/50282
Tested-by: Jenkins
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2015-04-14 18:41:18 +00:00
Ethan Vizitei 4e39bcfb76 add a parameter to user creation for forcing self-registraion flow
closes CNVS-19046

Marketing is moving to take over the FFT form, which means
the user creation will occur via API, but they'll still need
to get the self-registration style emails to get passwords right
and such.

This provides a parameter to do so.  It also pulls out a handful
of lines from the users_controller all related to how and which
notifications get sent, and moves them into a policy object, which
has some predicate methods for the controller to make decisions off
of, and also does the notification dispatching.

Change-Id: I0513062aedf4258b7d9f51a46b1d8e42b2a2582a
Reviewed-on: https://gerrit.instructure.com/51608
Tested-by: Jenkins
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2015-04-14 17:26:05 +00:00
Steven Shepherd 1c7605e8a0 Add specs to test teachers moving students to other groups
Test Plan:
  - Run specs

Change-Id: I5f88ffcdf7ae6b893695724a0eecd43e4f6a1aea
Reviewed-on: https://gerrit.instructure.com/52071
Tested-by: Jenkins
Reviewed-by: Derek Hansen <dhansen@instructure.com>
Product-Review: Derek Hansen <dhansen@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
2015-04-14 16:05:39 +00:00
Ethan Vizitei 1004e66540 get sentry into canvas
closes CNVS-6016

No more error reports!  (soon)

this commit builds up sentry integration through the new
Canvas::Errors module, along with other things that need
to happen on every exception.  ErrorReports
should now get pushed towards just being used for representing
a complaint a user filed via the get help form.

I fixed about half the things that got linted as well
while I was in here, but because this touches to much
I fear divergence from tackling too many (I think we
can safely say it's "better than we found it")

I left a lot of the infrastructure for error reports in place
until other commits for plugins can be merged

TEST PLAN:
 1) setup your raven.yml config file with the dsn for our
  sentry install
 2) force an error to happen in a request response cycle.
 3) see the error in sentry
 4) force an error to happen in a job
 5) see the error in sentry
 6) statsd increments shoudl still fire
 7) for the moment, an error report should still get created.

Change-Id: I5a9dc7214598f8d5083451fd15f0423f8f939034
Reviewed-on: https://gerrit.instructure.com/51621
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2015-04-13 22:26:15 +00:00
Ethan Vizitei 72cd48462c this test fails all the time in jenkins, probably because it's crazy async
Let's find out.

TEST PLAN:
  1) Less Fragile Failures

Change-Id: I4e0f7137850f107ae3e758c6d0dee5206979123c
Reviewed-on: https://gerrit.instructure.com/52021
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
2015-04-11 13:41:44 +00:00
James Williams 2b8cd4c6ad restore re-copied items to published state if not unpublishable
test plan:
* create a regular assignment, and a quiz
* keep them unpublished
* copy them to another course
* publish the quiz and assignment
* enroll a student and submit to the
 assignment and the quiz
* delete the assignment and quiz
* re-copy the assignment and quiz over
 from the original course
* should restore them to a published state

closes #CNVS-14510

Change-Id: I4a97602882fdc2f88427892d92526bc21c57e0b2
Reviewed-on: https://gerrit.instructure.com/51862
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-04-10 19:43:46 +00:00