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
5aaa0459
Commit
5aaa0459
authored
Apr 20, 2016
by
Muddasser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use type_in_codemirror instead of actionchain to set contents in editor
parent
b6d5c614
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
7 deletions
+3
-7
common/test/acceptance/pages/studio/html_component_editor.py
+3
-7
No files found.
common/test/acceptance/pages/studio/html_component_editor.py
View file @
5aaa0459
from
selenium.webdriver.common.keys
import
Keys
from
selenium.webdriver.common.action_chains
import
ActionChains
from
component_editor
import
ComponentEditorView
from
common.test.acceptance.pages.studio.utils
import
type_in_codemirror
class
HtmlComponentEditorView
(
ComponentEditorView
):
...
...
@@ -49,16 +48,13 @@ class HtmlComponentEditorView(ComponentEditorView):
def
set_raw_content
(
self
,
content
):
"""Types content in raw html mode, leaving the component open.
Arguments:
content (str): The content to be used.
"""
self
.
q
(
css
=
self
.
editor_mode_css
)
.
click
()
self
.
q
(
css
=
'[aria-label="Edit HTML"]'
)
.
click
()
self
.
wait_for_element_visibility
(
'.mce-title'
,
'Wait for CodeMirror editor'
)
#Focus goes to the editor by default
ActionChains
(
self
.
browser
)
.
send_keys
([
Keys
.
CONTROL
,
'a'
])
.
\
key_up
(
Keys
.
CONTROL
)
.
send_keys
(
content
)
.
perform
()
# Set content in the CodeMirror editor.
type_in_codemirror
(
self
,
0
,
content
)
self
.
q
(
css
=
'.mce-foot .mce-primary'
)
.
click
()
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