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
d0aaa37a
Commit
d0aaa37a
authored
Jul 24, 2014
by
Jay Zoldak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix is_browser_on_page method for Studio Container page
parent
f6b278e7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
common/test/acceptance/pages/studio/container.py
+8
-4
No files found.
common/test/acceptance/pages/studio/container.py
View file @
d0aaa37a
...
...
@@ -37,15 +37,19 @@ class ContainerPage(PageObject):
def
is_browser_on_page
(
self
):
def
_is_finished_loading
():
# Wait until all components have been loaded
is_done
=
len
(
self
.
q
(
css
=
XBlockWrapper
.
BODY_SELECTOR
)
.
results
)
==
len
(
self
.
q
(
css
=
'{} .xblock'
.
format
(
XBlockWrapper
.
BODY_SELECTOR
))
.
results
)
# Wait until all components have been loaded.
# See common/static/coffee/src/xblock/core.coffee which adds the
# class "xblock-initialized" at the end of initializeBlock
num_wrappers
=
len
(
self
.
q
(
css
=
XBlockWrapper
.
BODY_SELECTOR
)
.
results
)
num_xblocks_init
=
len
(
self
.
q
(
css
=
'{} .xblock.xblock-initialized'
.
format
(
XBlockWrapper
.
BODY_SELECTOR
))
.
results
)
is_done
=
num_wrappers
==
num_xblocks_init
return
(
is_done
,
is_done
)
# First make sure that an element with the view-container class is present on the page,
# and then wait
to make sure that the xblocks are all there
.
# and then wait
for the loading spinner to go away and all the xblocks to be initialized
.
return
(
self
.
q
(
css
=
'body.view-container'
)
.
present
and
self
.
q
(
css
=
'div.ui-loading.is-hidden'
)
.
present
and
Promise
(
_is_finished_loading
,
'Finished rendering the xblock wrappers.'
)
.
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