Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
a118fd96
Commit
a118fd96
authored
Jul 08, 2015
by
Jesse Zoldak
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #8811 from edx/zoldak/fix-flaky-js-tests
Fix flaky js tests caused by ajax requests TE-970
parents
658519d0
de25880c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
8 deletions
+11
-8
cms/static/coffee/spec/views/course_info_spec.coffee
+4
-3
cms/static/js/spec/video/file_uploader_editor_spec.js
+2
-2
cms/static/js/spec/video/transcripts/videolist_spec.js
+3
-1
cms/static/js/spec/video/translations_editor_spec.js
+2
-2
No files found.
cms/static/coffee/spec/views/course_info_spec.coffee
View file @
a118fd96
...
...
@@ -167,22 +167,23 @@ define ["js/views/course_info_handout", "js/views/course_info_update", "js/model
@
courseInfoEdit
.
render
()
@
event
=
{
preventDefault
:
()
->
'no op'
}
@
courseInfoEdit
.
onNew
(
@
event
)
@
requests
=
AjaxHelpers
[
"requests"
](
this
)
it
"shows push notification checkbox as selected by default"
,
->
expect
(
@
courseInfoEdit
.
$el
.
find
(
'.toggle-checkbox'
)).
toBeChecked
()
it
"sends correct default value for push_notification_selected"
,
->
requests
=
AjaxHelpers
.
requests
(
this
);
@
courseInfoEdit
.
$el
.
find
(
'.save-button'
).
click
()
requestSent
=
JSON
.
parse
(
@
requests
[
@
requests
.
length
-
1
].
requestBody
)
requestSent
=
JSON
.
parse
(
requests
[
requests
.
length
-
1
].
requestBody
)
expect
(
requestSent
.
push_notification_selected
).
toEqual
(
true
)
it
"sends correct value for push_notification_selected when it is unselected"
,
->
requests
=
AjaxHelpers
.
requests
(
this
);
# unselect push notification
@
courseInfoEdit
.
$el
.
find
(
'.toggle-checkbox'
).
attr
(
'checked'
,
false
);
@
courseInfoEdit
.
$el
.
find
(
'.save-button'
).
click
()
requestSent
=
JSON
.
parse
(
@
requests
[
@
requests
.
length
-
1
].
requestBody
)
requestSent
=
JSON
.
parse
(
requests
[
requests
.
length
-
1
].
requestBody
)
expect
(
requestSent
.
push_notification_selected
).
toEqual
(
false
)
describe
"Course Handouts"
,
->
...
...
cms/static/js/spec/video/file_uploader_editor_spec.js
View file @
a118fd96
define
(
[
'jquery'
,
'underscore'
,
'
common/js/spec_helpers/ajax_helpers'
,
'
squire'
'jquery'
,
'underscore'
,
'squire'
],
function
(
$
,
_
,
AjaxHelpers
,
Squire
)
{
function
(
$
,
_
,
Squire
)
{
'use strict'
;
describe
(
'FileUploader'
,
function
()
{
var
FileUploaderTemplate
=
readFixtures
(
...
...
cms/static/js/spec/video/transcripts/videolist_spec.js
View file @
a118fd96
...
...
@@ -8,7 +8,9 @@ define(
],
function
(
$
,
_
,
Utils
,
VideoList
,
MetadataModel
,
AbstractEditor
,
sinon
)
{
'use strict'
;
describe
(
'CMS.Views.Metadata.VideoList'
,
function
()
{
// TODO: reenable these specs, using AjaxHelpers and the correct pattern
// to avoid flakiness. See TNL-2689.
xdescribe
(
'CMS.Views.Metadata.VideoList'
,
function
()
{
var
videoListEntryTemplate
=
readFixtures
(
'video/transcripts/metadata-videolist-entry.underscore'
),
...
...
cms/static/js/spec/video/translations_editor_spec.js
View file @
a118fd96
define
(
[
'jquery'
,
'underscore'
,
'
common/js/spec_helpers/ajax_helpers'
,
'
squire'
'jquery'
,
'underscore'
,
'squire'
],
function
(
$
,
_
,
AjaxHelpers
,
Squire
)
{
function
(
$
,
_
,
Squire
)
{
'use strict'
;
// TODO: fix BLD-1100 Disabled due to intermittent failure on master and in PR builds
xdescribe
(
'VideoTranslations'
,
function
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment