closes CORE-2329
There were some tests that were expecting a snapshot-like value
where it expected `new Date().toLocaleDateString()` to give something
Like “2016-7-11” but that was actually wrong. If you do
`new Date().toLocaleDateString()` in a browser it will give you
something like “7/11/2016”. And this new version of node matches what
a real browser would have done, so I just updated the specs so they
are looking for the correct format. This change does not actually
reflect a change in what a real user would see. Just what
jest/jsdom/node formats it as.
Test Plan:
- check to make sure that the assignments 2 availability dates
component produces markup exactly as it did before
- Automated tests pass
- Build canvas locally, everything passes.
- Build canvas with docker, everything passes.
Change-Id: I74285cd6d9b251ca60ab79396e332cc3a419bcee
Reviewed-on: https://gerrit.instructure.com/177198
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
This gets canvas planner and canvas-rce on babel 7, which is a
prerequisite to canvas doing the same. Also, by not depending on the
Kitchen sink of ui-presets, it cleans a ton of unused stuff from our
node_modules/yarn.lock. It was originally 2 different commits but
in order to get the yarn.lock right, we have to do them all as one.
This also made it so we needed to have less “resolutions” in our
package.json since the newer versions of those things work fine with
the newer version of babel
So there are 2 test plan areas:
1. Canvas-planner
Closes: CORE-2575
Test plan:
* smoke test to make sure everything in canvas-planner still works/looks
like it used to in the canvas ui
* make sure the translation task (yarn check-transifex) still works
canvas-rce: upgrade to babel 7 & @instructure/ui-babel-preset
2. canvas-rce
Closes: CORE-2576
Test plan:
* smoke test the RCE editor
* theming should still work/look exactly as before
* make sure all the various build tasks (eg yarn test, test:coverage,
debug, lint, extract, etc) all still work as before
Change-Id: Id896687e3905f4df4627b181cad3f67ffe4417a5
Reviewed-on: https://gerrit.instructure.com/183877
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Closes: CORE-2560 CORE-2569
Refs: ADMIN-2453
Test plan:
* general spot check to make sure things look the same
(Specifically check the publish/unpublish button on the modules page)
* verify that the total size of the vendor & common production webpack
bundles is smaller
Change-Id: I734e9723917c14778cdc5fc4e22dcd1011b5e77e
Reviewed-on: https://gerrit.instructure.com/184911
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
We really should only be writing eslint-ignore in files where we KNOW
We don’t want to do what it is suggesting.
If it is suggesting something that we probably should do, but it was
written before us so we want to be lazy and not do anything about it,
we should not just eslint-ignore it. We should fix it or leave it there
for someone else to fix.
Having an eslint-ignore in a file is a signal that someone who knew what
They are doing saw that error and said “no I want to do it anyway”
We really should not be having lots of cases where you need to even
write `eslint-ignore`. A rule should either be 99.9% always followed or
we should get rid of it (and as a side note, I think we are there now)
A lot of these were leftovers from before we did that ^
Change-Id: I1e515d486550ad3118d6d74e9c824d28ebf6e714
Reviewed-on: https://gerrit.instructure.com/183786
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
test plan:
- tests pass and everything still works
Change-Id: I73540f1b5e4647c19f3446ce558bce7e4dfde684
Reviewed-on: https://gerrit.instructure.com/180736
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Daniel Sasaki <dsasaki@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
closes ADMIN-2233
test plan:
- click the delete button which will open a confirmation dialog that
roughly matches the design
- a11y for the dialog should make sense
- the close button should dismiss the dialog with no effect
- the cancel button should dismiss the dialog with no effect
- the delete button should start a delete operation
- when the delete operation completes, you should be redirected to the
assignment index screen with a message indicating the assignment has
been deleted
- if your user does not have permission to delete the assignment, or
some other error occurs, then the in-development error screen should
be shown
Change-Id: I0c3304360d3c389296bd0910d02d8215bdb0ac9e
Reviewed-on: https://gerrit.instructure.com/177754
Reviewed-by: Carl Kibler <ckibler@instructure.com>
Tested-by: Jenkins
QA-Review: Carl Kibler <ckibler@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
refs ADMIN-2339
test plan:
- opportunities button badge should appear correctly
- screenreaders should read the button and the badge properly
Change-Id: I7b7a76c4a563ce18ab18806c5d42debb8431a222
Reviewed-on: https://gerrit.instructure.com/177999
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Daniel Sasaki <dsasaki@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
refs ADMIN-2339
test plan:
- focus the link in a planner item and see that the focus ring does not
overlap the text above it
Change-Id: Iaae8b50fef8ee82f9508caac9350073d919727e1
Reviewed-on: https://gerrit.instructure.com/178141
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
refs ADMIN-2277
test plan:
- Do some spot checking all around, esp. on newer stuff written with
InstUI
- Do some specific spot checking on:
- Assignments edit page. Esp. with moderated grading
- Gradebook late policies
- Check the original bug (ADMIN-2211)
Change-Id: Iaaaeb9d86dc2d59cb2c9ccca2a8764a5adb0896b
Reviewed-on: https://gerrit.instructure.com/176912
Tested-by: Jenkins
Reviewed-by: Anju Reddy <areddy@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
fixes: ADMIN-2259
Test-Plan:
run the steps in ticket and make sure it doesnt happen anymore :)
Change-Id: I316fb4c72477afc2ed5c06a7c31fbdba558223d0
Reviewed-on: https://gerrit.instructure.com/174012
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Rex Fleischer <rfleischer@instructure.com>
closes QA-614
Test Plan:
- Run yarn test inside the canvas-planner directory
- A junit file should be created in ./coverage/canvas-planner-junit.xml
- It should also report to jenkins 'Test Results' when there is a failure
Change-Id: Ibfb1ec088ceb60f2c265b3c31e77029968268f9a
Reviewed-on: https://gerrit.instructure.com/173008
Tested-by: Jenkins
Reviewed-by: Carl Kibler <ckibler@instructure.com>
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
When something was due at midnight, the planner erroneously changed
the due time to 11:59pm the same day, not 1 minute earlier.
After discussing it with the team and @cwruck, we decided that planner
- should be displaying items at the time they were created
- should not do any fancy midnight stuff when the user creates a to do
fixes ADMIN-1522
test plan:
- have an assignment due at midnight in the student's timezone
which is easier to accomplish if the course and student are
in different timezones
- load the planner
> expect it to be due at midnight
- load the card dashboard
> expect it to be in the To Do sidebar at midnight
- in planner, create a new To Do due at midnight
> expect it show up in planner at midnight
Change-Id: I87190ccd5ed5dd22e62e9a8e92b41a573f418038
Reviewed-on: https://gerrit.instructure.com/169411
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Jon Willesen <jonw+gerrit@instructure.com>
Product-Review: Christi Wruck
implements the planner layout for narrow screens.
in the process, the window.matchMedia mock used for
responsiviser.spec.js (since the dom used by jest doesn't support
window.matchMedia) became too much and the tests were more a test
of the mock than responsiviser. Added a selenium spec in its place.
the main difference between this implmentation and Mary's design is
that the item title should truncate after 2 lines, but is only 1.
Attempting to fix that sent me down a rabbit hole. I may revisit later.
also added `constrain="window"` to the opportunities popover. It doesn't
work now, but should when instui fixes their placement code, which is
currently a WIP.
skipping the "scrolls to the next new activity" spec, since it's not
behaving well. It thinks the page scrolls only 3px on the 2nd
new activity button click.
closes ADMIN-1527
test plan:
- open planner on your phone, or use devtools to simulate a phone, or
simply shrink the browser to < 592px wide
> expect planner to look like the screenshot attached to the ticket
- if you're using a skinny browser, make it wider. It should
automatically switch to tablet layout
- make the browser even wider. Planner should switch to desktop layout
Change-Id: Id8302bef1e9dd773cfb229d12a338d403df8ab68
Reviewed-on: https://gerrit.instructure.com/167588
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Jon Willesen <jonw+gerrit@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
fixes ADMIN-1530
test plan:
- have a student with an upcoming peer review due
- as the student, load the card dashboard
> expect the item's title to be "Peer Review for <item_title>"
- go to the course
> expect the same in the course's todo sidebar
Change-Id: Id5986923dbe39cc2024d9c8406503c273b939da5
Reviewed-on: https://gerrit.instructure.com/169182
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Jon Willesen <jonw+gerrit@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
When dismissing an opportunity, the code that looked for the next thing
to give focus was being handed the planner item's plannable_id, but it
was its assignment_id that was registered with a value that matched its
assignment_id, which is different in this case.
fixes ADMIN-1496
test plan:
- create a course and add a student
- create a graded discussion due in the past
- create a quiz due in the past
- create an assignment due in the past
- load planner as the student
- click on the bell to open the opportunity center
> expect that you can dismiss all the items
> expect that focus moves to the next item if there is one,
and to the previous item if there's not, and the close
button if there are none left
Change-Id: I973f2c4ddf9ee021c33b9b8e2633fd3325731b23
Reviewed-on: https://gerrit.instructure.com/169051
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
Simple oversight left the planner item's type untranslated. For
example the "Assignment" in "Chemistry 101 Assignment".
fixes ADMIN-1553
test plan:
- build canvas using RAILS_LOAD_ALL_LOCALES=1 yarn build
- start rails using RAILS_LOAD_ALL_LOCALES=true bundle exec rails server
- from /profile/settings change your student's language
- as the student load the planner
> expect the item's type to be translated. (you don't have to check
all possible types. if one is translated, they all are. trust me)
Change-Id: I750eb979e29452f1492ddbbfbe76a20ec605c8ad
Reviewed-on: https://gerrit.instructure.com/168794
Tested-by: Jenkins
QA-Review: Carl Kibler <ckibler@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
Reviewed-by: Carl Kibler <ckibler@instructure.com>
changed the logic so dynamic ui manager is given the ids of the 2 dom
elements we're most interested in when scrolling: the planner header
and the new activity button. Now it can look for them and compute the
necessary offset from the top of the window as needed.
this will become necessary when the phone layout is finished,
since the header will wrap and it's height becomes dynamic.
fixes ADMIN-1486
test plan:
- have a planner with some new activity in the past
- click the new activity button
> expect planner to load the past data and scroll the
blue dot into view just below the new activity button
- press the button again
> expect the next dot to scroll into view.
Change-Id: I82ec54648466a7f9499296a8292c86721d2f847e
Reviewed-on: https://gerrit.instructure.com/168551
Tested-by: Jenkins
QA-Review: Jon Willesen <jonw+gerrit@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
this updates all the stuff we get from npm that we _can_ upgrade to
the newest versions available.
test plan:
* all the builds should pass
Change-Id: Icf1cc3cd02d66e6e1f999ea5f5fc3b5b28775881
Reviewed-on: https://gerrit.instructure.com/167282
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Tested-by: Jenkins
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
closes ADMIN-1111
test plan:
- create calendar events courses a student is enrolled in
- create calendar events on the student's calendar
- create calendar events in a group a student is part of
- go to planner and click on these calendar event titles
- a dialog displaying the calendar information should appear
- in the dialog, clicking the calendar event title should take you to
that event in the calendar
- the dialog should display the proper dates, calendar, location, and
details
Change-Id: Iabb3649c32bdef551dc73740dd2191e301b0de34
Reviewed-on: https://gerrit.instructure.com/166148
Reviewed-by: Carl Kibler <ckibler@instructure.com>
QA-Review: Carl Kibler <ckibler@instructure.com>
Tested-by: Jenkins
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
closes ADMIN-1456
test plan:
- Main acceptance criteria is in the jira - please double check
- in Courses and Planner sidebars, Students see a calendar button
instead of the Coming Up section.
- Teachers, observers, TAs, etc still have Coming up and not the
View Calendar button. Don't need to check all those, just fyi
- new Todo list: As Student with Planner enabled, To Do list on
Course shows 7 items. Also on Dashboard Card View
- old Todo list (Teacher view of Dashboard Card, for example)
still has 5 items.
- new Todo list looks infinitely far into future, not just 2
weeks.
Change-Id: Id2c703338b0b28c82e56d3b34619ff5de0c5d28c
Reviewed-on: https://gerrit.instructure.com/166130
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Jon Willesen <jonw+gerrit@instructure.com>
Product-Review: Carl Kibler <ckibler@instructure.com>
test plan:
- be a student and a teacher in different courses
- on the calendar, create a planner note ("My To Do" tab)
- courses you teach should not appear in the list of courses
the note can be associated with
- hit the + button on the planner dashboard
- the "Optional: Add Course" dropdown shouldn't list the
course you teach
fixes ADMIN-1372
Change-Id: I0efbc659f19da98ced17376f60618cbf018b0a66
Reviewed-on: https://gerrit.instructure.com/165360
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Jon Willesen <jonw+gerrit@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>