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
13508c76
Commit
13508c76
authored
Nov 06, 2015
by
asadiqbal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SOL-1379
parent
222bdd98
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
37 deletions
+2
-37
cms/static/js/certificates/models/signatory.js
+0
-17
cms/static/js/certificates/spec/views/certificate_details_spec.js
+0
-18
cms/static/js/certificates/spec/views/certificate_editor_spec.js
+2
-2
No files found.
cms/static/js/certificates/models/signatory.js
View file @
13508c76
...
...
@@ -31,23 +31,6 @@ function(_, str, Backbone, BackboneRelational, gettext) {
return
response
;
},
validate
:
function
(
attrs
)
{
var
errors
=
null
;
if
(
_
.
has
(
attrs
,
'title'
)){
var
title
=
attrs
.
title
;
var
lines
=
title
.
split
(
/
\r\n
|
\r
|
\n
/
);
if
(
lines
.
length
>
2
)
{
errors
=
_
.
extend
({
'title'
:
gettext
(
'Signatory title should span over maximum of 2 lines.'
)
},
errors
);
}
}
if
(
errors
!==
null
){
return
errors
;
}
},
setOriginalAttributes
:
function
()
{
// Remember the current state of this model (enables edit->cancel use cases)
this
.
_originalAttributes
=
this
.
parse
(
this
.
toJSON
());
...
...
cms/static/js/certificates/spec/views/certificate_details_spec.js
View file @
13508c76
...
...
@@ -244,24 +244,6 @@ function(_, Course, CertificatesCollection, CertificateModel, CertificateDetails
this
.
view
.
$
(
SELECTORS
.
signatory_organization_value
)
).
toContainText
(
'New Signatory Test Organization'
);
});
it
(
'should not allow invalid data when saving changes made during in-line signatory editing'
,
function
()
{
this
.
view
.
$
(
SELECTORS
.
edit_signatory
).
click
();
setValuesToInputs
(
this
.
view
,
{
inputSignatoryName
:
'New Signatory Test Name'
});
setValuesToInputs
(
this
.
view
,
{
inputSignatoryTitle
:
'Signatory Title
\
non three
\
nlines'
});
setValuesToInputs
(
this
.
view
,
{
inputSignatoryOrganization
:
'New Signatory Test Organization'
});
this
.
view
.
$
(
SELECTORS
.
signatory_panel_save
).
click
();
expect
(
this
.
view
.
$
(
SELECTORS
.
inputSignatoryTitle
).
parent
()).
toHaveClass
(
'error'
);
});
});
});
});
cms/static/js/certificates/spec/views/certificate_editor_spec.js
View file @
13508c76
...
...
@@ -246,7 +246,7 @@ function(_, Course, CertificateModel, SignatoryModel, CertificatesCollection, Ce
expect
(
this
.
view
.
$
(
'.certificate-edit-error'
)).
not
.
toHaveClass
(
'is-shown'
);
});
it
(
'signatories should
not
save when title span on more than 2 lines'
,
function
()
{
it
(
'signatories should save when title span on more than 2 lines'
,
function
()
{
this
.
view
.
$
(
SELECTORS
.
addSignatoryButton
).
click
();
setValuesToInputs
(
this
.
view
,
{
inputCertificateName
:
'New Certificate Name'
...
...
@@ -265,7 +265,7 @@ function(_, Course, CertificateModel, SignatoryModel, CertificatesCollection, Ce
});
this
.
view
.
$
(
SELECTORS
.
saveCertificateButton
).
click
();
expect
(
this
.
view
.
$
(
'.certificate-edit-error'
)).
toHaveClass
(
'is-shown'
);
expect
(
this
.
view
.
$
(
'.certificate-edit-error'
)).
not
.
toHaveClass
(
'is-shown'
);
});
it
(
'user can delete those signatories already saved'
,
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