refs SD-743
fixes CNVS-26721
This adds a qunit assertion helper that wraps the aXe library. Rules can
be ignored by passing an array of rules in the options argument to the
helper.
e.g.
`assertions.isAccessible $html, done, { ignores: 'aria-valid-attr-value'}`
Test plan:
Undo the changes that I made to the DashboardCard.jsx component.
You should get a warning about invalid aria attributes because the
aria-controls attribute is referring to an element that doesn't exist.
To fix this, I modified the component to hide/show the color picker so that
the aria attribute value is valid.
If you add the ignores option as described above, the test should pass
without my changes.
To verify the dashboard card color picker changes:
- Verify that you can click or use the ENTER key on a dashboard card
cog button to bring up the color picker
- Verify that you can select a color and apply it to the card.
- Verify that you can click outside the color picker to close it
- Verify that you can hit the ESC key to close the color picker
- When the color picker is closed, focus should return to the the cog
button trigger
- After selecting a color you should be able to open the color picker again
and select a different color
The color picker in the Calendar should be regression tested as well.
Change-Id: I5d5bfdaf39df1e0cb8776144771baeb1ed31ff2a
Reviewed-on: https://gerrit.instructure.com/70638
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Colleen Palmer <colleen@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Tested-by: Jenkins
closes CNVS-26213
Allow using a config file rather than an env var
for turning on web pack.
TEST PLAN:
1) set USE_WEBPACK env var to nothing
2) touch config/WEBPACK
3) web pack should still be enabled
4) rm config/WEBPACK
5) restart server
6) canvas should use require-js bundles again
Change-Id: Ie733b66326482341c2371fddefe17c1cfa3006b3
Reviewed-on: https://gerrit.instructure.com/69739
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@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>
the big change here is that now you have to call server.respond() again
if part of the response triggers more ajax actions. this is actually
a nice change, which gives us more flexibility over how these are
handled.
fixes CNVS-24661
test plan: js specs should still pass
Change-Id: I0eaf27159d2990b51873f190cccd14782d6d65ee
Reviewed-on: https://gerrit.instructure.com/66103
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Jenkins
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-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>
we included this to help handle a js action queuing multiple ajax calls,
but it works better to just use fake timers to manage that interaction.
fixes CNVS-24582
test plan:
- js tests should still pass
Change-Id: I01cd5ad37e003ddf06956caad3c69a9e58cabab0
Reviewed-on: https://gerrit.instructure.com/65845
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Jenkins
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
everyone was getting build errors when they
were npm install'ing. it was because karma 0.10
depended on an out-of-date version of chokiadr
that does not compile against node 0.12
I also indicated that canvas is licenced agpl 3
so that you wouldn't always see an npm warning
about not having one.
also, let karma serve our css files
so if any javascript references them in our quit
tests, we don't see 404 warnings
Change-Id: Iaa0377bc87b8f7ec8726d6cb82c0f8a103134b56
Reviewed-on: https://gerrit.instructure.com/58584
Tested-by: Jenkins
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
This patch handles a couple of things:
- `require` calls should not be used at the start of test files,
but they were. This switches them to `define`.
- There were a handful of tests that were not fulfilling initialized
promises, which led to the test suite hanging.
- There was a failure that popped up sometimes because `helpDialog`
was not cleaning up after itself. This adds a protection to
make sure that the instance is initialized before it is used.
Change-Id: Ie57f5ee6d45216f0d4071d34cc476201c3b7c9f6
Reviewed-on: https://gerrit.instructure.com/48447
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
fixes CNVS-9759
test plan:
* navigate to the user settings page, and click your
avatar;
* verify that you can click the "select a photo" view to
pick an image, or that you can drag a photo directly
onto it;
* crop the picture using the crop tool and press the
"select image" button;
* verify that the button becomes disabled and that the
dialog then closes and your new avatar is displayed.
* refresh the page and make sure the new avatar sticks.
Change-Id: Ic33cc89e66ce3bf2bed834f2aac2f37029008ec1
Reviewed-on: https://gerrit.instructure.com/26890
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
Reviewed-by: Braden Anderson <banderson@instructure.com>
Product-Review: Jon Willesen <jonw@instructure.com>
- js:generate_runner now generates common files to be used by different test runners
- js spec file order now shuffled to better expose dependencies
- fakeENV now returns two methods: setup and teardown
- stock tinymce 3 files are now wrapped for AMD
test plan:
- tinymce should work the same
- js:test rake task should run tests
- js:build task should work as normal (using new location of r.js)
- test results should successfully send to firework
Change-Id: Ic09647f55dae57130fa0fe3d6a9168d2b67b89a2
Reviewed-on: https://gerrit.instructure.com/29297
QA-Review: Shawn Meredith <shawn@instructure.com>
Tested-by: Shawn Meredith <shawn@instructure.com>
Tested-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>