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
7abcfe53
Commit
7abcfe53
authored
Dec 13, 2017
by
Jeff LaJoie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds in test cases for jasmine tests in course card view spec
parent
1f958f83
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
0 deletions
+41
-0
lms/static/js/spec/learner_dashboard/course_card_view_spec.js
+41
-0
No files found.
lms/static/js/spec/learner_dashboard/course_card_view_spec.js
View file @
7abcfe53
...
...
@@ -234,6 +234,47 @@ define([
expect
(
view
.
$
(
'.course-title-link'
).
length
).
toEqual
(
0
);
});
it
(
'should show an unfulfilled expired user entitlement not allowing the changing of sessions'
,
function
()
{
course
.
user_entitlement
=
{
uuid
:
'99fc7414c36d4f56b37e8e30acf4c7ba'
,
course_uuid
:
'99fc7414c36d4f56b37e8e30acf4c7ba'
,
expired_at
:
'2017-12-06 01:06:12'
,
expiration_date
:
'2017-12-05 01:06:12'
};
setupView
(
course
,
false
);
expect
(
view
.
$
(
'.info-expires-at'
).
text
().
trim
()).
toContain
(
'You can no longer select a session as of'
);
});
it
(
'should show an unfulfilled user entitlement allows you to select a session'
,
function
()
{
course
.
user_entitlement
=
{
uuid
:
'99fc7414c36d4f56b37e8e30acf4c7ba'
,
course_uuid
:
'99fc7414c36d4f56b37e8e30acf4c7ba'
,
expiration_date
:
'2017-12-05 01:06:12'
};
setupView
(
course
,
false
);
expect
(
view
.
$
(
'.info-expires-at'
).
text
().
trim
()).
toContain
(
'You must select a session by'
);
});
it
(
'should show a fulfilled expired user entitlement does not allow the changing of sessions'
,
function
()
{
course
.
user_entitlement
=
{
uuid
:
'99fc7414c36d4f56b37e8e30acf4c7ba'
,
course_uuid
:
'99fc7414c36d4f56b37e8e30acf4c7ba'
,
expired_at
:
'2017-12-06 01:06:12'
,
expiration_date
:
'2017-12-05 01:06:12'
};
setupView
(
course
,
true
);
expect
(
view
.
$
(
'.info-expires-at'
).
text
().
trim
()).
toContain
(
'You can no longer change sessions.'
);
});
it
(
'should show a fulfilled user entitlement allows the changing of sessions'
,
function
()
{
course
.
user_entitlement
=
{
uuid
:
'99fc7414c36d4f56b37e8e30acf4c7ba'
,
course_uuid
:
'99fc7414c36d4f56b37e8e30acf4c7ba'
,
expiration_date
:
'2017-12-05 01:06:12'
};
setupView
(
course
,
true
);
expect
(
view
.
$
(
'.info-expires-at'
).
text
().
trim
()).
toContain
(
'You can change sessions until'
);
});
});
}
);
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