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
1897fb65
Commit
1897fb65
authored
Jan 13, 2015
by
cahrens
Committed by
Andy Armstrong
Jan 15, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update for paged container not having a visibility editor.
parent
4b00566e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
13 deletions
+21
-13
cms/static/js/spec/views/pages/container_spec.js
+21
-13
No files found.
cms/static/js/spec/views/pages/container_spec.js
View file @
1897fb65
...
...
@@ -15,7 +15,8 @@ define(["jquery", "underscore", "underscore.string", "js/common_helpers/ajax_hel
mockUpdatedContainerXBlockHtml
=
readFixtures
(
'mock/mock-updated-container-xblock.underscore'
),
mockXBlockEditorHtml
=
readFixtures
(
'mock/mock-xblock-editor.underscore'
),
mockXBlockVisibilityEditorHtml
=
readFixtures
(
'mock/mock-xblock-visibility-editor.underscore'
),
PageClass
=
fixtures
.
page
;
PageClass
=
fixtures
.
page
,
hasVisibilityEditor
=
fixtures
.
has_visibility_editor
;
beforeEach
(
function
()
{
var
newDisplayName
=
'New Display Name'
;
...
...
@@ -221,19 +222,24 @@ define(["jquery", "underscore", "underscore.string", "js/common_helpers/ajax_hel
expect
(
EditHelpers
.
isShowingModal
()).
toBeTruthy
();
});
it
(
'can show a visibility modal for a child xblock'
,
function
()
{
it
(
'can show a visibility modal for a child xblock
if supported for the page
'
,
function
()
{
var
visibilityButtons
;
renderContainerPage
(
this
,
mockContainerXBlockHtml
);
visibilityButtons
=
containerPage
.
$
(
'.wrapper-xblock .visibility-button'
);
expect
(
visibilityButtons
.
length
).
toBe
(
6
);
visibilityButtons
[
0
].
click
();
expect
(
str
.
startsWith
(
lastRequest
().
url
,
'/xblock/locator-component-A1/visibility_view'
))
.
toBeTruthy
();
AjaxHelpers
.
respondWithJson
(
requests
,
{
html
:
mockXBlockVisibilityEditorHtml
,
resources
:
[]
});
expect
(
EditHelpers
.
isShowingModal
()).
toBeTruthy
();
if
(
hasVisibilityEditor
)
{
expect
(
visibilityButtons
.
length
).
toBe
(
6
);
visibilityButtons
[
0
].
click
();
expect
(
str
.
startsWith
(
lastRequest
().
url
,
'/xblock/locator-component-A1/visibility_view'
))
.
toBeTruthy
();
AjaxHelpers
.
respondWithJson
(
requests
,
{
html
:
mockXBlockVisibilityEditorHtml
,
resources
:
[]
});
expect
(
EditHelpers
.
isShowingModal
()).
toBeTruthy
();
}
else
{
expect
(
visibilityButtons
.
length
).
toBe
(
0
);
}
});
});
...
...
@@ -593,7 +599,8 @@ define(["jquery", "underscore", "underscore.string", "js/common_helpers/ajax_hel
{
page
:
ContainerPage
,
initial
:
'mock/mock-container-xblock.underscore'
,
add_response
:
'mock/mock-xblock.underscore'
add_response
:
'mock/mock-xblock.underscore'
,
has_visibility_editor
:
true
}
);
parameterized_suite
(
"Paged"
,
...
...
@@ -601,6 +608,7 @@ define(["jquery", "underscore", "underscore.string", "js/common_helpers/ajax_hel
{
page
:
PagedContainerPage
,
initial
:
'mock/mock-container-paged-xblock.underscore'
,
add_response
:
'mock/mock-xblock-paged.underscore'
add_response
:
'mock/mock-xblock-paged.underscore'
,
has_visibility_editor
:
false
});
});
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