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
c283afcc
Commit
c283afcc
authored
Apr 30, 2016
by
Muddasser
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #12268 from edx/muddasser/bokchoy/chrome/test_badge_share_modal
Fixed close button click issue
parents
b69fea72
048f73be
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
common/test/acceptance/pages/lms/learner_profile.py
+12
-0
No files found.
common/test/acceptance/pages/lms/learner_profile.py
View file @
c283afcc
...
...
@@ -53,10 +53,22 @@ class Badge(PageObject):
"""
return
BrowserQuery
(
self
.
full_view
,
css
=
".badges-modal"
)
.
is_focused
()
def
bring_model_inside_window
(
self
):
"""
Execute javascript to bring the popup(.badges-model) inside the window.
"""
script_to_execute
=
(
"var popup = document.querySelectorAll('.badges-modal')[0];;"
"popup.style.left = '20
%
';"
)
self
.
full_view
.
execute_script
(
script_to_execute
)
def
close_modal
(
self
):
"""
Close the badges modal and check that it is no longer displayed.
"""
# In chrome, close button is not inside window
# which causes click failures. To avoid this, just change
# the position of the popup
self
.
bring_model_inside_window
()
BrowserQuery
(
self
.
full_view
,
css
=
".badges-modal .close"
)
.
click
()
EmptyPromise
(
lambda
:
not
self
.
modal_displayed
(),
"Share modal dismissed"
)
.
fulfill
()
...
...
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