Skip to content

Commit

Permalink
Update ui tests with new profile page format
Browse files Browse the repository at this point in the history
  • Loading branch information
TheophileDiot committed Jan 3, 2024
1 parent bba9879 commit ed45e22
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/ui/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1467,7 +1467,7 @@ def access_page(

password_input.send_keys("S$cr3tP@ssw0rd")

assert_button_click(driver, "//button[@id='profile-button' and @class='edit-btn']")
assert_button_click(driver, "//button[@id='username-button' and @class='edit-btn']")

try:
title = driver_wait.until(EC.presence_of_element_located((By.XPATH, "/html/body/main/div[1]/div/h1")))
Expand Down Expand Up @@ -1501,7 +1501,9 @@ def access_page(

print("Successfully logged in with new username, trying to change password ...", flush=True)

password_input = safe_get_element(driver, By.ID, "curr_password")
assert_button_click(driver, "//button[@data-tab-handler='password']")

password_input = safe_get_element(driver, By.XPATH, "//form[@data-plugin-item='password']//input[@id='curr_password']")

if password_input.get_attribute("value") != "":
print("The current password is not empty, exiting ...", flush=True)
Expand All @@ -1525,7 +1527,7 @@ def access_page(

new_password_check_input.send_keys("P@ssw0rd")

assert_button_click(driver, "//button[@id='profile-button' and @class='edit-btn']")
assert_button_click(driver, "//button[@id='pw-button' and @class='edit-btn']")

try:
title = driver_wait.until(EC.presence_of_element_located((By.XPATH, "/html/body/main/div[1]/div/h1")))
Expand Down

0 comments on commit ed45e22

Please sign in to comment.