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
ce7e7740
Commit
ce7e7740
authored
Mar 21, 2014
by
Anton Stupak
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3001 from edx/anton/fix-flaky-acceptance-test
Video: Fix flaky acceptance test.
parents
bbf4471d
f3f1aa29
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
11 deletions
+16
-11
lms/djangoapps/courseware/features/video.feature
+9
-8
lms/djangoapps/courseware/features/video.py
+7
-3
No files found.
lms/djangoapps/courseware/features/video.feature
View file @
ce7e7740
...
@@ -181,11 +181,11 @@ Feature: LMS Video component
...
@@ -181,11 +181,11 @@ Feature: LMS Video component
|
track
|
download_track
|
|
track
|
download_track
|
|
http://example.org/
|
true
|
|
http://example.org/
|
true
|
And
I open the section with videos
And
I open the section with videos
Then I can download transcript in "srt" format
and
has text "00
:
00
:
00,270"
Then I can download transcript in "srt" format
that
has text "00
:
00
:
00,270"
And
I select the transcript format
"txt"
And
I select the transcript format
"txt"
Then
I can download transcript in
"txt"
format
and
has text
"Hi, welcome to Edx."
Then
I can download transcript in
"txt"
format
that
has text
"Hi, welcome to Edx."
When
I open video
"B"
When
I open video
"B"
Then
I can download transcript in
"txt"
format
and
has text
"Hi, welcome to Edx."
Then
I can download transcript in
"txt"
format
that
has text
"Hi, welcome to Edx."
When
I open video
"C"
When
I open video
"C"
Then
menu
"download_transcript"
doesn't exist
Then
menu
"download_transcript"
doesn't exist
...
@@ -212,9 +212,10 @@ Feature: LMS Video component
...
@@ -212,9 +212,10 @@ Feature: LMS Video component
And it has a video in "Youtube" mode
:
And it has a video in "Youtube" mode
:
|
transcripts
|
sub
|
download_track
|
|
transcripts
|
sub
|
download_track
|
|
{"zh":
"chinese_transcripts.srt"}
|
OEoXaMPEzfM
|
true
|
|
{"zh":
"chinese_transcripts.srt"}
|
OEoXaMPEzfM
|
true
|
Then
I can download transcript in
"srt"
format that has text
"Hi, welcome to Edx."
And
I select language with code
"zh"
And
I select language with code
"zh"
And
I see
"好 各位同学"
text in the captions
And
I see
"好 各位同学"
text in the captions
Then
I can download transcript in
"srt"
format
and
has text
"好 各位同学"
Then
I can download transcript in
"srt"
format
that
has text
"好 各位同学"
# 22
# 22
Scenario
:
Download button works correctly for non-english transcript in HTML5 mode of Video component
Scenario
:
Download button works correctly for non-english transcript in HTML5 mode of Video component
...
@@ -224,9 +225,10 @@ Feature: LMS Video component
...
@@ -224,9 +225,10 @@ Feature: LMS Video component
And it has a video in "HTML5" mode
:
And it has a video in "HTML5" mode
:
|
transcripts
|
sub
|
download_track
|
|
transcripts
|
sub
|
download_track
|
|
{"zh":
"chinese_transcripts.srt"}
|
OEoXaMPEzfM
|
true
|
|
{"zh":
"chinese_transcripts.srt"}
|
OEoXaMPEzfM
|
true
|
Then
I can download transcript in
"srt"
format that has text
"Hi, welcome to Edx."
And
I select language with code
"zh"
And
I select language with code
"zh"
And
I see
"好 各位同学"
text in the captions
And
I see
"好 各位同学"
text in the captions
Then
I can download transcript in
"srt"
format
and
has text
"好 各位同学"
Then
I can download transcript in
"srt"
format
that
has text
"好 各位同学"
# 23
# 23
Scenario
:
Download button works correctly w/o english transcript in HTML5 mode of Video component
Scenario
:
Download button works correctly w/o english transcript in HTML5 mode of Video component
...
@@ -236,7 +238,7 @@ Feature: LMS Video component
...
@@ -236,7 +238,7 @@ Feature: LMS Video component
|
transcripts
|
download_track
|
|
transcripts
|
download_track
|
|
{"zh":
"chinese_transcripts.srt"}
|
true
|
|
{"zh":
"chinese_transcripts.srt"}
|
true
|
And
I see
"好 各位同学"
text in the captions
And
I see
"好 各位同学"
text in the captions
Then
I can download transcript in
"srt"
format
and
has text
"好 各位同学"
Then
I can download transcript in
"srt"
format
that
has text
"好 各位同学"
# 24
# 24
Scenario
:
Download button works correctly w/o english transcript in Youtube mode of Video component
Scenario
:
Download button works correctly w/o english transcript in Youtube mode of Video component
...
@@ -246,4 +248,4 @@ Feature: LMS Video component
...
@@ -246,4 +248,4 @@ Feature: LMS Video component
|
transcripts
|
download_track
|
|
transcripts
|
download_track
|
|
{"zh":
"chinese_transcripts.srt"}
|
true
|
|
{"zh":
"chinese_transcripts.srt"}
|
true
|
And
I see
"好 各位同学"
text in the captions
And
I see
"好 各位同学"
text in the captions
Then
I can download transcript in
"srt"
format and has text
"好 各位同学"
Then
I can download transcript in
"srt"
format that has text
"好 各位同学"
\ No newline at end of file
lms/djangoapps/courseware/features/video.py
View file @
ce7e7740
...
@@ -135,6 +135,8 @@ def add_video_to_course(course, player_mode, hashes, display_name='Video'):
...
@@ -135,6 +135,8 @@ def add_video_to_course(course, player_mode, hashes, display_name='Video'):
})
})
world
.
scenario_dict
[
'VIDEO'
]
=
world
.
ItemFactory
.
create
(
**
kwargs
)
world
.
scenario_dict
[
'VIDEO'
]
=
world
.
ItemFactory
.
create
(
**
kwargs
)
world
.
wait_for_present
(
'.is-initialized'
)
world
.
wait_for_invisible
(
'.video-wrapper .spinner'
)
def
_get_sjson_filename
(
videoId
,
lang
):
def
_get_sjson_filename
(
videoId
,
lang
):
...
@@ -355,11 +357,13 @@ def check_text_in_the_captions(_step, text):
...
@@ -355,11 +357,13 @@ def check_text_in_the_captions(_step, text):
@step
(
'I select language with code "([^"]*)"$'
)
@step
(
'I select language with code "([^"]*)"$'
)
def
select_language
(
_step
,
code
):
def
select_language
(
_step
,
code
):
_open_menu
(
"language"
)
selector
=
VIDEO_MENUS
[
"language"
]
+
' li[data-lang-code="{code}"]'
.
format
(
selector
=
VIDEO_MENUS
[
"language"
]
+
' li[data-lang-code={code}]'
.
format
(
code
=
code
code
=
code
)
)
world
.
wait_for_present
(
selector
)
world
.
css_find
(
VIDEO_BUTTONS
[
"CC"
])[
0
]
.
mouse_over
()
world
.
wait_for_visible
(
selector
)
world
.
css_click
(
selector
)
world
.
css_click
(
selector
)
assert
world
.
css_has_class
(
selector
,
'active'
)
assert
world
.
css_has_class
(
selector
,
'active'
)
...
@@ -435,7 +439,7 @@ def video_alignment(_step, transcript_visibility):
...
@@ -435,7 +439,7 @@ def video_alignment(_step, transcript_visibility):
assert
all
([
width
,
height
])
assert
all
([
width
,
height
])
@step
(
'I can download transcript in "([^"]*)" format
and
has text "([^"]*)"$'
)
@step
(
'I can download transcript in "([^"]*)" format
that
has text "([^"]*)"$'
)
def
i_can_download_transcript
(
_step
,
format
,
text
):
def
i_can_download_transcript
(
_step
,
format
,
text
):
assert
world
.
css_has_text
(
'.video-tracks .a11y-menu-button'
,
'.'
+
format
,
strip
=
True
)
assert
world
.
css_has_text
(
'.video-tracks .a11y-menu-button'
,
'.'
+
format
,
strip
=
True
)
...
...
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