Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
048f73be
Commit
048f73be
authored
9 years ago
by
Muddasser
Browse files
Options
Downloads
Patches
Plain Diff
Fixed close button click issue
parent
91d3b0bd
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/test/acceptance/pages/lms/learner_profile.py
+12
-0
12 additions, 0 deletions
common/test/acceptance/pages/lms/learner_profile.py
with
12 additions
and
0 deletions
common/test/acceptance/pages/lms/learner_profile.py
+
12
−
0
View file @
048f73be
...
...
@@ -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
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment