Commit Graph

6930 Commits

Author SHA1 Message Date
David Ormsbee
2051c90924 Test Speedup: Isolate Modulestore Signals
There are a number of Django Signals that are on the modulestore's
SignalHandler class, such as SignalHandler.course_published. These
signals can trigger very expensive processes to occur, such as course
overview or block structures generation. Most of the time, the test
author doesn't care about these side-effects.

This commit does a few things:

* Converts the signals on SignalHandler to be instances of a new
  SwitchedSignal class, that allows signal sending to be disabled.

* Creates a SignalIsolationMixin helper similar in spirit to the
  CacheIsolationMixin, and adds it to the ModuleStoreIsolationMixin
  (and thus to ModuleStoreTestCase and SharedModuleStoreTestCase).

* Converts our various tests to use this new mechanism. In some cases,
  this means adjusting query counts downwards because they no longer
  have to account for publishing listener actions.

Modulestore generated signals are now muted by default during test runs.
Calls to send() them will result in no-ops. You can choose to enable
specific signals for a given subclass of ModuleStoreTestCase or
SharedModuleStoreTestCase by specifying an ENABLED_SIGNALS class
attribute, like the following example:

    from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase

    class MyPublishTestCase(ModuleStoreTestCase):
        ENABLED_SIGNALS = ['course_published', 'pre_publish']

You should take great care when disabling signals outside of a
ModuleStoreTestCase or SharedModuleStoreTestCase, since they can leak
out into other tests. Be sure to always clean up, and never disable
signals outside of testing. Because signals are essentially process
globals, it can have a lot of unpleasant side-effects if we start
mucking around with them during live requests.

Overall, this change has cut the total test execution time for
edx-platform by a bit over a third, though we still spend a lot in
pre-test setup during our test builds.

[PERF-413]
2017-02-23 10:31:16 -05:00
muzaffaryousaf
f16550519e Defining charset to "utf8".
TNL-6553
2017-02-22 17:39:13 +05:00
muzaffaryousaf
e50a3c57b6 Adding text param to webob response for 1.7.1. https://github.com/Pylons/webob/issues/304
TNL-6553
2017-02-21 20:31:40 +05:00
Albert St. Aubin
8e1fc5f5d3 Updated the focus order for the action bar 2017-02-17 22:46:17 -05:00
muzaffaryousaf
d73d2f5889 Increase the yttimeout to un-skip the video tests. 2017-02-08 20:30:54 +05:00
Calen Pennington
cea871ec54 Merge pull request #14336 from CredoReference/split_mongo_copy_subdag_fix_asides
Fix asides to copy them during publish operation
2017-02-02 14:10:17 -05:00
attiyaishaque
0869df22c4 TNL-6419 Fix in file-checking code in Xmodule. 2017-02-02 17:02:59 +05:00
Dmitry Viskov
5d887adc09 Fix asides to copy them during publish operation (bug in modulestore/split_mongo/split.py:SplitMongoModuleStore._copy_subdag method) 2017-02-01 18:36:27 +03:00
cahrens
0f3eb6e94c Fix safe template warning. 2017-01-31 13:43:36 -05:00
cahrens
55712d1148 Show checkmarks when "Show Answer" is clicked.
TNL-6357
2017-01-31 09:55:08 -05:00
John Eskew
ab190a8507 Merge pull request #14284 from open-craft/haikuginger/filter-by-block-name
Restrict block ID comparison slightly to avoid false positives
2017-01-24 19:32:14 -05:00
noraiz-anwar
4679766655 Emit play_video event after seek_video event 2017-01-23 17:36:43 +05:00
Eric Fischer
f84f3c09d3 Merge pull request #14343 from edx/efischer/hide_after_end
Revert "Merge pull request #14324 from edx/efischer/revertins"
2017-01-18 13:51:04 -05:00
Jeff LaJoie
43c5cb2af8 Merge pull request #14307 from edx/jlajoie/TNL-5619
Fixes submit button enablement on save/reset
2017-01-18 11:40:28 -05:00
Eric Fischer
507e621ccc Revert "Merge pull request #14324 from edx/efischer/revertins"
This reverts commit c7d2d601b8, reversing
changes made to fb2173f43e.
2017-01-18 10:56:13 -05:00
Jeff LaJoie
139f91ebed TNL-5619: removes enable/disable all button methods to save button state and disable active, modifies tests for new functions 2017-01-18 10:48:32 -05:00
Ari Rizzitano
54a48a3227 [courseware] generate sequence-specific titles server-side (AC-695)
[courseware] generate sequence-specific titles server-side (AC-695)

[courseware] generate sequence-specific titles server-side (AC-695)

case for empty subsections [AC-695]

move title logic into courseware context method [AC-695]

pep8

coffeescript -> js

js mistake

jslint

refactor sequence title generation slightly

missed a line

line too long

python is not javascript

ugh js

ugh js part 2
2017-01-14 17:55:09 -05:00
alisan617
88e10e0ee8 sequence navs keyboard support and test update 2017-01-13 14:07:10 -05:00
Eric Fischer
0b620ebbc1 Revert "Merge pull request #14225 from edx/efischer/tnl-6108"
This reverts commit 8b8cf5f9e0, reversing
changes made to 2716ffbf8e.
2017-01-12 13:50:05 -05:00
Gregory Martin
eea2518452 Merge pull request #14299 from edx/yro_change-display-helptext
change help strings
2017-01-12 12:15:20 -05:00
Eric Fischer
6845c64977 Hide after course end
Hijacks the existing hide_after_due field to be repected as "hide after course
end" for self-paced courses. Includes tests.

TNL-6108
2017-01-12 09:12:54 -05:00
Gregory Martin
e1e47793df change help strings 2017-01-12 09:02:28 -05:00
Clinton Blackburn
b14a8d6403 Updated factory-boy to 2.8.1
ECOM-4422
2017-01-10 09:20:05 -05:00
noraiz-anwar
b967538fee Merge pull request #14275 from edx/revert-14216-noraiz/TNL-6197
Revert "Error while exporting course with too long filename"
2017-01-10 16:01:55 +05:00
Jesse Shapiro
4bf05c02df Update comment; update tests 2017-01-06 21:02:07 -05:00
Jesse Shapiro
8f5d949d87 Restrict block ID comparison slightly to avoid false positives 2017-01-06 16:47:35 -05:00
Christina Roberts
adc3c8f89c Merge pull request #14134 from edx/christina/jsinput-newtemplate
New jsinput example problem
2017-01-06 10:29:59 -05:00
Christina Roberts
7c7b4da79a Merge pull request #14269 from edx/christina/tnl-6041
Remove flaky decorator from test_capa_module
2017-01-06 09:47:31 -05:00
cahrens
ed614448e4 Cleanup of status.
Also remove unused empty jsinput_css.css.
2017-01-05 16:09:23 -05:00
cahrens
aa8d222678 New example jsinput problem.
TNL-5893
2017-01-05 16:09:22 -05:00
noraiz-anwar
7494e5e6c8 Revert "Error while exporting course with too long filename" 2017-01-05 23:07:56 +05:00
Brian Jacobel
d9a65a9674 Merge pull request #14167 from edx/bjacobel/sequence-coffee-to-js
Move Sequence coffee files to JS
2017-01-05 12:45:33 -05:00
cahrens
bf8b345586 Remove flaky decorator.
Increased number of retries, as it is expected that sometimes
a seed will be reused. TNL-6041
2017-01-05 12:34:00 -05:00
Brian Jacobel
749909b8ff Remove unused a11y functionality for prev/next buttons 2017-01-05 11:55:15 -05:00
noraiz-anwar
9c139a87a6 Error while exporting course with too long filename 2017-01-05 14:43:48 +05:00
Brian Jacobel
36e0086769 Clean up generated javascript for display.js 2017-01-04 15:23:00 -05:00
Brian Jacobel
20290d2b77 Convert display.js to javascript, preserving comments 2017-01-04 15:22:59 -05:00
Brian Jacobel
be18f9e93b Do a little cleanup of this coffee file before conversion 2017-01-04 15:22:59 -05:00
Brian Jacobel
e98aeda29e Move sequence nav display.coffee to new js location, and remove dead code 2017-01-04 15:22:59 -05:00
Gregory Martin
1b2fbbd61d delete datetext functions, implement dateutils 2017-01-03 10:18:26 -05:00
Calen Pennington
30bf20687b Merge pull request #14242 from edx/release
Release 2016-12-22
2017-01-03 10:11:04 -05:00
Nimisha Asthagiri
99e6d53939 Preload definitions when collecting block structures 2016-12-29 08:51:26 -05:00
Dmitry Viskov
fc0577d081 Hide bookmarks link in the LTI mode 2016-12-22 09:56:33 -05:00
Calen Pennington
47e21ca5b0 Revert "Merge pull request #14078 from edx/yro_remove-datetimetext-functions"
This reverts commit 8c0098812d, reversing
changes made to 5b6e2dd5ee.
2016-12-22 09:29:33 -05:00
Gregory Martin
b0bf19a741 delete datetext functions, implement dateutils 2016-12-20 11:10:06 -05:00
Cliff Dyer
aa3d6e8791 Merge pull request #14092 from edx/cdyer/validate-capa-xml
Use new XMLString field type for CAPA data field.
2016-12-19 12:03:19 -05:00
Ari Rizzitano
b5b8175932 [video] add hidden borders to controls to support windows high contrast mode (AC-458)
[video] add hidden borders to video controls for high contrast mode (AC-458)

[video] minor border color adjustment (AC-458)

use variable names for colors

color variable names
2016-12-16 09:54:07 -05:00
J. Cliff Dyer
22ce30039b Use new XMLString type for CAPA data field.
TNL-5245
2016-12-15 15:35:44 -05:00
Brian Jacobel
71693c3a12 Merge pull request #14026 from edx/bjacobel/inline-discussion-redesign
Inline Discussion "two-level" redesign
2016-12-14 16:33:00 -05:00
Ari Rizzitano
1e686f4763 [video] fix AC-343
[captions] move role attr from li element to nested span (AC-343)

[video] fix failing tests for video captions (AC-343)

[video] couple more failing tests (AC-343)

[video] properly outline the focused caption (AC-343)
2016-12-14 11:39:53 -05:00