Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
aarranz committed Sep 13, 2018
1 parent 5efa34e commit f0f884a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/wirecloud/commons/utils/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -1327,7 +1327,7 @@ def wait_wirecloud_unload(self, timeout=15):
loading_window = self.wait_element_visible('#loading-window')
WebDriverWait(self.driver, timeout).until(EC.staleness_of(loading_window))

def wait_wirecloud_ready(self, start_timeout=10, timeout=10):
def wait_wirecloud_ready(self, start_timeout=10, timeout=10, embedded=False):

loading_window = None

Expand All @@ -1343,7 +1343,10 @@ def wait_loading_window_fadding(driver):
except:
pass

self.wait_element_visible('.wc-body:not(.se-on-transition)')
if embedded:
self.wait_element_visible('.wc-body:not(.se-on-transition)')
else:
WebDriverWait(self.driver, 10).until(lambda driver: self.get_current_view() != '')

time.sleep(0.2) # work around some problems

Expand Down
2 changes: 1 addition & 1 deletion src/wirecloud/platform/tests/selenium.py
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ def test_embedded_view(self):
# Swicth to Wirecloud's iframe
iframe = self.driver.find_element_by_id('iframe')
self.driver.switch_to.frame(iframe)
self.wait_wirecloud_ready()
self.wait_wirecloud_ready(embedded=True)
self.check_public_workspace(frame_id='iframe')

def check_public_workspace(self, frame_id=None):
Expand Down

0 comments on commit f0f884a

Please sign in to comment.