Commit ed672f07 by Christine Lytwynec

made is_browser_on_page actually check for the right page in AutoAuthPage

parent 6396373b
...@@ -65,7 +65,9 @@ class AutoAuthPage(PageObject): ...@@ -65,7 +65,9 @@ class AutoAuthPage(PageObject):
return url return url
def is_browser_on_page(self): def is_browser_on_page(self):
return True message = self.q(css='BODY').text[0]
match = re.search(r'Logged in user ([^$]+) with password ([^$]+) and user_id ([^$]+)$', message)
return True if match else False
def get_user_id(self): def get_user_id(self):
""" """
......
...@@ -65,7 +65,9 @@ class AutoAuthPage(PageObject): ...@@ -65,7 +65,9 @@ class AutoAuthPage(PageObject):
return url return url
def is_browser_on_page(self): def is_browser_on_page(self):
return True message = self.q(css='BODY').text[0]
match = re.search(r'Logged in user ([^$]+) with password ([^$]+) and user_id ([^$]+)$', message)
return True if match else False
def get_user_id(self): def get_user_id(self):
message = self.q(css='BODY').text[0].strip() message = self.q(css='BODY').text[0].strip()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment