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
7bf9c1a7
Commit
7bf9c1a7
authored
Aug 19, 2014
by
Ben McMorran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test for non URL characters
parent
1778c157
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletions
+9
-1
cms/static/js/spec/views/pages/course_rerun_spec.js
+9
-1
No files found.
cms/static/js/spec/views/pages/course_rerun_spec.js
View file @
7bf9c1a7
define
([
"jquery"
,
"js/spec_helpers/create_sinon"
,
"js/spec_helpers/view_helpers"
,
"js/views/course_rerun"
,
"js/views/utils/create_course_utils"
],
"js/views/utils/create_course_utils"
,
"jquery.simulate"
],
function
(
$
,
create_sinon
,
view_helpers
,
CourseRerunUtils
,
CreateCourseUtilsFactory
)
{
describe
(
"Create course rerun page"
,
function
()
{
var
selectors
=
{
...
...
@@ -100,6 +100,14 @@ define(["jquery", "js/spec_helpers/create_sinon", "js/spec_helpers/view_helpers"
setErrorMessage
(
selectors
.
org
,
''
);
expect
(
$
(
selectors
.
save
)).
toHaveClass
(
classes
.
disabled
);
});
it
(
"shows an error message when non URL characters are entered"
,
function
()
{
var
input
=
$
(
selectors
.
org
);
expect
(
input
.
parent
()).
not
.
toHaveClass
(
classes
.
error
);
input
.
val
(
"%"
)
input
.
simulate
(
"keyup"
,
{
keyCode
:
$
.
simulate
.
keyCode
.
ENTER
});
expect
(
input
.
parent
()).
toHaveClass
(
classes
.
error
);
});
});
it
(
"saves course reruns"
,
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