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
52898734
Commit
52898734
authored
May 14, 2013
by
David Baumgold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tests for primary and secondary CSS classes
parent
fedfe862
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
cms/static/coffee/spec/views/feedback_spec.coffee
+10
-0
No files found.
cms/static/coffee/spec/views/feedback_spec.coffee
View file @
52898734
...
...
@@ -58,14 +58,17 @@ describe "SystemFeedback click events", ->
actions
:
primary
:
text
:
"Save"
,
class
:
"save-button"
,
click
:
jasmine
.
createSpy
(
'primaryClick'
)
secondary
:
[{
text
:
"Revert"
,
class
:
"cancel-button"
,
click
:
jasmine
.
createSpy
(
'secondaryClick'
)
}]
)
setFixtures
(
sandbox
({
id
:
"page-alert"
}))
@
view
=
new
CMS
.
Views
.
Alert
({
model
:
@
model
})
it
"should trigger the primary event on a primary click"
,
->
...
...
@@ -75,3 +78,10 @@ describe "SystemFeedback click events", ->
it
"should trigger the secondary event on a secondary click"
,
->
@
view
.
secondaryClick
()
expect
(
@
model
.
get
(
'actions'
).
secondary
[
0
].
click
).
toHaveBeenCalled
()
it
"should apply class to primary action"
,
->
expect
(
@
view
.
$
(
".action-primary"
)).
toHaveClass
(
"save-button"
)
it
"should apply class to secondary action"
,
->
expect
(
@
view
.
$
(
".action-secondary"
)).
toHaveClass
(
"cancel-button"
)
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