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
df32f109
Commit
df32f109
authored
11 years ago
by
Andy Armstrong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor test logic for switching editor tabs
parent
be8e9944
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
13 deletions
+16
-13
cms/djangoapps/contentstore/features/component_settings_editor_helpers.py
+12
-0
cms/djangoapps/contentstore/features/transcripts.py
+3
-12
cms/djangoapps/contentstore/features/video-editor.py
+1
-1
No files found.
cms/djangoapps/contentstore/features/component_settings_editor_helpers.py
View file @
df32f109
...
...
@@ -116,6 +116,18 @@ def edit_component():
world
.
css_click
(
'a.edit-button'
)
@world.absorb
def
select_editor_tab
(
tab_name
):
editor_tabs
=
world
.
browser
.
find_by_css
(
'.editor-tabs a'
)
expected_tab_text
=
tab_name
.
strip
()
.
upper
()
matching_tabs
=
[
tab
for
tab
in
editor_tabs
if
tab
.
text
.
upper
()
==
expected_tab_text
]
assert
len
(
matching_tabs
)
==
1
tab
=
matching_tabs
[
0
]
tab
.
click
()
world
.
wait_for_ajax_complete
()
def
enter_xml_in_advanced_problem
(
step
,
text
):
"""
Edits an advanced problem (assumes only on page),
...
...
This diff is collapsed.
Click to expand it.
cms/djangoapps/contentstore/features/transcripts.py
View file @
df32f109
...
...
@@ -209,14 +209,11 @@ def check_text_in_the_captions(_step, text):
@step
(
'I see value "([^"]*)" in the field "([^"]*)"$'
)
def
check_transcripts_field
(
_step
,
values
,
field_name
):
editor_tabs
=
world
.
browser
.
find_by_css
(
'.editor-tabs a'
)
basic_tab
=
editor_tabs
[
0
]
advanced_tab
=
editor_tabs
[
1
]
advanced_tab
.
click
()
world
.
select_editor_tab
(
'Advanced'
)
field_id
=
'#'
+
world
.
browser
.
find_by_xpath
(
'//label[text()="
%
s"]'
%
field_name
.
strip
())[
0
][
'for'
]
values_list
=
[
i
.
strip
()
==
world
.
css_value
(
field_id
)
for
i
in
values
.
split
(
'|'
)]
assert
any
(
values_list
)
basic_tab
.
click
(
)
world
.
select_editor_tab
(
'Basic'
)
@step
(
'I save changes$'
)
...
...
@@ -228,13 +225,7 @@ def save_changes(_step):
@step
(
'I open tab "([^"]*)"$'
)
def
open_tab
(
_step
,
tab_name
):
editor_tabs
=
world
.
browser
.
find_by_css
(
'.editor-tabs a'
)
expected_tab_text
=
tab_name
.
strip
()
.
upper
()
matching_tabs
=
[
tab
for
tab
in
editor_tabs
if
tab
.
text
.
upper
()
==
expected_tab_text
]
assert
len
(
matching_tabs
)
==
1
tab
=
matching_tabs
[
0
]
tab
.
click
()
world
.
wait_for_ajax_complete
()
world
.
select_editor_tab
(
tab_name
)
@step
(
'I set value "([^"]*)" to the field "([^"]*)"$'
)
...
...
This diff is collapsed.
Click to expand it.
cms/djangoapps/contentstore/features/video-editor.py
View file @
df32f109
...
...
@@ -114,7 +114,7 @@ def set_show_captions(step, setting):
world
.
css_click
(
'a.edit-button'
)
world
.
wait_for
(
lambda
_driver
:
world
.
css_visible
(
'a.action-save'
))
world
.
click_link_by_text
(
'ADVANCED
'
)
world
.
select_editor_tab
(
'Advanced
'
)
world
.
browser
.
select
(
'Transcript Display'
,
setting
)
world
.
css_click
(
'a.action-save'
)
...
...
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