mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Possible example of errors not showing
This commit is contained in:
@@ -89,6 +89,11 @@ change_user_address:
|
||||
type: xpath
|
||||
selector: '//span[contains(text(), "Insert Address")]'
|
||||
|
||||
sign_out:
|
||||
selectors:
|
||||
cancel_button: '.modal-footer .buttons #button-0'
|
||||
sign_out_button: '.modal-footer .buttons #button-0'
|
||||
|
||||
history_panel:
|
||||
menu:
|
||||
labels:
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import time
|
||||
from .framework import (
|
||||
selenium_test,
|
||||
SeleniumTestCase
|
||||
@@ -12,11 +13,17 @@ class SignOutTestCase(SeleniumTestCase):
|
||||
self.click_masthead_user()
|
||||
self.components.masthead.preferences.wait_for_and_click()
|
||||
self.components.preferences.sign_out.wait_for_and_click()
|
||||
cancel_button = self.driver.find_element_by_xpath("//button[@id='button-0']")
|
||||
cancel_button.click()
|
||||
#Testing of the cancel button
|
||||
time.sleep(5)
|
||||
self.components.sign_out.cancel_button.wait_for_and_click()
|
||||
time.sleep(10) #Giving time to click cancel and go back to user preferences (not happening, and no error)
|
||||
assert self.is_logged_in()
|
||||
new_email = self.driver.find_element_by_id("user-preferences-current-email").text
|
||||
self.assertTrue(email == new_email)
|
||||
signout_button = self.driver.find_element_by_xpath("//button[@id='button-1']")
|
||||
signout_button.click()
|
||||
assert not self.is_logged_in()
|
||||
#Testing of the sign out button
|
||||
self.components.preferences.sign_out.wait_for_and_click()
|
||||
time.sleep(5)
|
||||
self.components.sign_out.sign_out_button.wait_for_and_click()
|
||||
time.sleep(10) # Enough time to see a log out screen and redirection
|
||||
# assert not self.is_logged_in() # Error only shows here, but should had been trigger in line 17
|
||||
time.sleep(5)
|
||||
Reference in New Issue
Block a user