Skip to content

Commit

Permalink
Added waiting logic for container load
Browse files Browse the repository at this point in the history
  • Loading branch information
ritwik-g committed Jan 31, 2025
1 parent 643ea78 commit e88b137
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion tests/e2e/test_login.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,20 @@ def setup_method(self, method):
def teardown_method(self, method):
self.driver.quit()

def _check_page_load(self):
try:
self.driver.get("http://frontend.unstract.localhost")
except Exception as e:
print(f"Page load exception: {e}")
return False
else:
return True

def test_login(self):
self.driver.get("http://frontend.unstract.localhost")
WebDriverWait(self.driver, timeout=30, poll_frequency=2).until(
lambda _: self._check_page_load(),
"Page load failed",
)
self.driver.implicitly_wait(0.5)
self.driver.set_window_size(960, 615)
# 3 | click | css=span |
Expand Down

0 comments on commit e88b137

Please sign in to comment.