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
75a0d524
Commit
75a0d524
authored
Aug 21, 2014
by
Muhammad Ammar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bok-Choy Video Transcript Tests Batch 2
parent
3ac3a315
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
6 deletions
+40
-6
cms/djangoapps/contentstore/features/transcripts.feature
+0
-0
common/test/acceptance/pages/studio/container.py
+7
-0
common/test/acceptance/pages/studio/video/video.py
+26
-6
common/test/acceptance/tests/video/test_studio_video_module.py
+7
-0
common/test/acceptance/tests/video/test_studio_video_transcript.py
+0
-0
No files found.
cms/djangoapps/contentstore/features/transcripts.feature
View file @
75a0d524
This diff is collapsed.
Click to expand it.
common/test/acceptance/pages/studio/container.py
View file @
75a0d524
...
...
@@ -298,6 +298,7 @@ class XBlockWrapper(PageObject):
BODY_SELECTOR
=
'.studio-xblock-wrapper'
NAME_SELECTOR
=
'.xblock-display-name'
COMPONENT_BUTTONS
=
{
'basic_tab'
:
'.editor-tabs li.inner_tab_wrap:nth-child(1) > a'
,
'advanced_tab'
:
'.editor-tabs li.inner_tab_wrap:nth-child(2) > a'
,
'save_settings'
:
'.action-save'
,
}
...
...
@@ -373,6 +374,12 @@ class XBlockWrapper(PageObject):
"""
self
.
_click_button
(
'advanced_tab'
)
def
open_basic_tab
(
self
):
"""
Click on Basic Tab.
"""
self
.
_click_button
(
'basic_tab'
)
def
save_settings
(
self
):
"""
Click on settings Save button.
...
...
common/test/acceptance/pages/studio/video/video.py
View file @
75a0d524
...
...
@@ -167,7 +167,6 @@ class VideoComponentPage(VideoPage):
self
.
click_button
(
'upload_asset'
,
index
)
self
.
q
(
css
=
CLASS_SELECTORS
[
'attach_asset'
])
.
results
[
0
]
.
send_keys
(
asset_file_path
)
self
.
click_button
(
'asset_submit'
)
# Only srt format transcript files can be uploaded, If an error
# occurs due to incorrect transcript file we will return from here
if
asset_type
==
'transcript'
and
self
.
q
(
css
=
'#upload_error'
)
.
present
:
...
...
@@ -284,6 +283,7 @@ class VideoComponentPage(VideoPage):
is_verified
=
self
.
_verify_setting_entry
(
setting
,
DEFAULT_SETTINGS
[
counter
][
0
],
DEFAULT_SETTINGS
[
counter
][
1
])
if
not
is_verified
:
return
is_verified
...
...
@@ -560,21 +560,41 @@ class VideoComponentPage(VideoPage):
.trigger('input');
"""
.
format
(
selector
=
CLASS_SELECTORS
[
'url_inputs'
])
self
.
browser
.
execute_script
(
script
)
time
.
sleep
(
DELAY
)
self
.
wait_for_ajax
()
def
is_transcript_button_visible
(
self
,
button_name
):
def
is_transcript_button_visible
(
self
,
button_name
,
index
=
0
,
button_text
=
None
):
"""
Check if a transcript related button is visible.
Arguments:
button_name (str): name of button
field_numbers (tuple or None): field numbers to check status for, None means get status for all.
tuple items will be integers and must start from 1
index (int): query index
button_text (str or None): text to match with text on a button, if None then don't match texts
Returns:
bool: is button visible
"""
return
self
.
q
(
css
=
BUTTON_SELECTORS
[
button_name
])
.
visible
is_visible
=
self
.
q
(
css
=
BUTTON_SELECTORS
[
button_name
])
.
nth
(
index
)
.
visible
is_text_matched
=
True
if
button_text
and
button_text
!=
self
.
q
(
css
=
BUTTON_SELECTORS
[
button_name
])
.
nth
(
index
)
.
text
[
0
]:
is_text_matched
=
False
return
is_visible
and
is_text_matched
def
upload_transcript
(
self
,
transcript_filename
):
"""
Upload a Transcript
Arguments:
transcript_filename (str): name of transcript file
"""
# Show the Browse Button
self
.
browser
.
execute_script
(
"$('form.file-chooser').show()"
)
asset_file_path
=
self
.
file_path
(
transcript_filename
)
self
.
q
(
css
=
CLASS_SELECTORS
[
'attach_transcript'
])
.
results
[
0
]
.
send_keys
(
asset_file_path
)
# confirm upload completion
self
.
_wait_for
(
lambda
:
not
self
.
q
(
css
=
CLASS_SELECTORS
[
'attach_transcript'
])
.
visible
,
'Upload Completed'
)
common/test/acceptance/tests/video/test_studio_video_module.py
View file @
75a0d524
...
...
@@ -110,6 +110,13 @@ class CMSVideoBaseTest(UniqueCourseTest):
# The 0th entry is the unit page itself.
self
.
unit_page
.
xblocks
[
1
]
.
open_advanced_tab
()
def
open_basic_tab
(
self
):
"""
Open components basic tab.
"""
# The 0th entry is the unit page itself.
self
.
unit_page
.
xblocks
[
1
]
.
open_basic_tab
()
def
save_unit_settings
(
self
):
"""
Save component settings.
...
...
common/test/acceptance/tests/video/test_studio_video_transcript.py
View file @
75a0d524
This diff is collapsed.
Click to expand it.
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