import just the particular instructure-ui / instructure-icon modules we
need, so that we don't get everything in the webpack bundle. also tweak
webpack config so people can't make this mistake again.
67d7ec7197 caused several bundles to balloon in size by a couple MB. this
gets us back down to sane levels (and many bundles are now smaller)
test plan:
specs? ¯\_(ツ)_/¯
Change-Id: I92b859063f56c672b85ec63f5c61ffd17735ced4
Reviewed-on: https://gerrit.instructure.com/107504
Tested-by: Jenkins
Reviewed-by: Jennifer Stern <jstern@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
Inst-ui components need to honor a school's brandable theme
settings.
fixes CNVS-33500
fixes CNVS-34223
fixes CNVS-33809
Test Plan:
CNVS-33500
- enable high contrast mode
- navigate to the Grading page of an account (/accounts/#/grading_standards
> expected reault:
- the "+ Set of Grading Periods" button is the high contrast color
- Click on the "+ Set of Grading Periods" button
> expected result:
- the Create button is the high contrast color
CNVS-33809
- with high contrast mode still enabled
- go to course's people page (/courses/#/users)
- click on the +People button
- see that the modal uses high contrast colors (the cancel and next
buttons are the easiest to see)
CNVS-34223
setup
- turn of high contrast
- go to Admin > Site Admin > Themes
(/accounts/site_admin/brand_configs)
- select the State U. theme
- click Save and give it a name
- click Apply theme (the UI should get a lot of red)
test
- go to a course's people page (/courses/#/users)
- click on the "+ People" button
expected result
- it looks like the rest of the UI
(e.g. the Cancel and Next buttons are red)
Change-Id: Idf9b9efbad4c1d88f72052d08f161b5d148464db
Reviewed-on: https://gerrit.instructure.com/102908
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
QA-Review: Dan Sasaki
Product-Review: Ed Schiebel <eschiebel@instructure.com>
fixes CNVS-34969
test plan:
- go /profile/settings and turn on high contrast
- go to the course people page (/courses/#/users)
- click on the +People button
> expected result: the modal honors high contrast
- enter some text in he text area
> expected result: nothing bad happens, as the event
handler for TextArea has changed.
- there's a TextArea in MessageStudents also, but I don't
know where to find it in the UI. You should probalby
test it doesn't blow up either.
Change-Id: Ia8102dacfa2b01ee043002ee0f5c27943abe5743
Reviewed-on: https://gerrit.instructure.com/102133
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Dan Sasaki
Product-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ed Schiebel <eschiebel@instructure.com>
TL;DR: running JS tests in canvas will be a lot faster & simpler
What you need to know as a developer writing JS in canvas:
Lets say you are working on the “dashboard_cards” feature, just run:
`npm run jspec-watch spec/javascripts/jsx/dashboard_card`
While you write code and it will have a watcher that catches
any changes and re-runs just the dashboar_card specs if you save any
file that went into it. It should run & reload in less than a few
seconds. You can give it the path to a specific spec file or have it
run an entire directory.
Or, if you are working on something that might touch a lot of stuff, run:
`npm run test-watch`
and while you are changing stuff, it will run *all* the QUnit specs on
any change. It should only take a couple seconds for webpack to process
the file change and to reload the specs in the browser.
Jenkins can now just run “npm test” for the webpack build. No need to
bundle install then run rake tasks just to run js tests.
This change also starts warning you when you have specs that take a
long time to run (e.g.: https://cl.ly/2i1O3O0J1504). It turns out we
have some *really* slow js specs (like selenium-level slow) so if you
notice a slow spec that you our your team wrote, please fix it.
Longer details:
To test our JS in webpack, we used to
1. run webpack with an env var set so it only does our ember stuff
2. run karma against ember
3. run webpack again against all the rest of the specs canvas
4 run karma again against all the specs in canvas
that took a long time. this change makes it so both the ember
specs and the specs in the rest of canvas run all in the same karma.
it also makes it so karma runs webpack itself. so you don’t need
to run `npm run webpack-test && karma start` to run tests, just
`npm run test` (which is just an alias to `karma start`). it also means
there is now just one watcher (karma) instead of one for both webpack
and karma.
Closes: CNVS-34977
Test plan:
* Jenkins builds should pass
* Try running different variations of the commands up there in the
description. They should work and be fast-ish.
Change-Id: Ia97f9bfa3677763f218f5f02c9463344f180bc6c
Reviewed-on: https://gerrit.instructure.com/102169
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
- removed arrow functions and const/let
- loaded ie11 polyfill for Object.assign
closes CNVS-35004
test plan:
- in docker
- ensuere docker-compose has phantomjs-tests in
docker-compose.local.[username].yml (see doc/testing_javascript.md)
- run docker-compose run --rm web npm run jspec-watch \
spec/javascripts/jsx/grade_summarySpec.jsx
- in another terminal run docker-compose run --rm phantomjs-tests
- all tests should pass
spec/javascripts/jsx/shared
Change-Id: I326833f3799b895ddcfcd7e07b4d69f443641e11
Reviewed-on: https://gerrit.instructure.com/102426
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
QA-Review: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
closes: CNVS-34770
because the previous commit renamed
‘module’ to ‘qunit.module’ in all our specs,
we don’t need this loader anymore
in an effort to get rid of vendor code that is just
copy/pasted into our repo, this also has us use
npm to get qunit, sinon, and AXE.
test plan:
* because this only touches stuff for specs,
if js specs pass in both webpack and requireJS,
this should be good.
Change-Id: I1d1cbf187211ad1d04d775fe4469913b3942d74a
Reviewed-on: https://gerrit.instructure.com/101101
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
example usage: `npm run jspec spec/javascripts/jsx/files`
refs CNVS-33223
test plan:
- current webpack test build should work exactly the same
- `npm run jspec` should build + run all specs
- `npm run jspec path/to/stuff` should build + run only specified
specs
- should work with both directories and individual files
- `jspec-watch` should watch + build a path, but not run specs
Change-Id: I788dd38a6c69a4c36a1300fcecf43678bc7f5327
Reviewed-on: https://gerrit.instructure.com/94625
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Product-Review: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
QA-Review: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
maintaining a list of specs manually is crummy. This loads them
dynamically.
also solves some run-order fragileness between screenreader
gradebook and shared ember component tests.
TEST PLAN:
1) webpack aux build should pass
Change-Id: I120b0bafc3b48523e758f576babea7f4af244673
Reviewed-on: https://gerrit.instructure.com/71082
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
refs CNVS-25916
this file moved, and so was no longer buildable
TEST PLAN:
1) webpack aux build should pass
Change-Id: Ib89abbcd4e21d0dd2abf957e695d20b914cffd2d
Reviewed-on: https://gerrit.instructure.com/70324
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
refs CNVS-25916
Proximity loader makes little sense
in a bundled environment anyway. This was
the last thing that used it.
TEST PLAN:
1) regression test profile editing, avatar in
particular
2) web pack selenium builds should have another passing file
Change-Id: Id6e0a93f1dbcf308b49500ead5f72551adad73d8
Reviewed-on: https://gerrit.instructure.com/69407
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
refs CNVS-25916
TEST PLAN:
1) discussion_show_page_specific_user_spec should pass
under webpack selenium
WARNING: This has possible regression impact on all places where we use
the little "Add Rubric" button (quizzes in the 'view rubric' link from
the gear dropdown, assignments when given the option to add a rubric
while editing an assignment, and discussions where you can mess with the
rubric on a "graded" discussion), so each rubric adding workflow should
be checked.
Change-Id: I84af8b58e4143e79bff96bd638bd2149d8e73c2e
Reviewed-on: https://gerrit.instructure.com/68988
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
fixes CNVS-25489
also extracted some code from eportfolios
for easier use in other files
test plan:
- load RCE normally
- it works fine
- also run the c/29651 test plan
(minus the unsupported IE versions)
- load RCE via service on eportfolios
- it works fine
Change-Id: I4eaf0ac1e11ae249c92a2cd2f9e249bc117986cd
Reviewed-on: https://gerrit.instructure.com/68349
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
refs CNVS-25536
test plan:
- with MCE loaded on non eportfolio page
- you can record a media comment like usual
- eportfolios with tinyMCE loaded via service
- it loads properly (though you wont be
able to add a media comment)
Change-Id: I892eb6033a18d67d712bda2f1bf7528533cf3ff6
Reviewed-on: https://gerrit.instructure.com/68224
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
refs CNVS-25535
test plan:
- with MCE loaded normally
- external tools are added to the tinymce
toolbar
- they work like normal (test multiple
external tools)
- eportfolios with tinyMCE loaded via service
- loads normally and works
(external tools arent used on this page
so cant test this remotely until we
add remote RCS to a different page)
Change-Id: I1ce0f9dc644d567d56615a61d7788ce42044bb2f
Reviewed-on: https://gerrit.instructure.com/68195
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
refs CNVS-25291
test plan:
- when the RCS service has the image plugin code
and the RCS feature flag on
- the RCS can add images from a url or canvas
- when the RCS flag is turned off
- the image plugin works like normal
Change-Id: Idaac68887f9ae2dd36410a5922a0b161cca13316
Reviewed-on: https://gerrit.instructure.com/67450
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
closes CNVS-24828
test plan:
- have rcs running
- with remote tinyMCE feature flag off
- regression test of eportfolios page
- check DnD & multiple tinyMCEs
- with feature flag on
- check that a tinymce instance
on eportfolios page can load & save
- note: many features will be missing
Change-Id: Ib6471729fa83c15107898134fc1f1306c8e7be8f
Reviewed-on: https://gerrit.instructure.com/66378
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
closes CNVS-24966
change js specs to work with web pack.
update some dependency references, make some aliases
for external dependencies to get the right version,
and clean up a bunch of leaky state.
TEST PLAN:
js tests should pass in web pack _and_ requires
Change-Id: If37fbce93e7e67021d90bacb470ffc4f1b17402d
Reviewed-on: https://gerrit.instructure.com/66309
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
closes CNVS-24124
makes working with web pack possible in canvas
instead of require-js. See doc/working_with_webpack.md
for instructions.
TEST PLAN:
Nothing should change in non-webpack'd behavior
Things should mostly work when you use the
USE_WEBPACK environment variable, but make sure to document
and ticket things that don't
Change-Id: I493a259a609e9e183950bc57aa5876df70108547
Reviewed-on: https://gerrit.instructure.com/64386
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>