Skip to content

Commit

Permalink
Merge pull request #211 from openstax/qa_mod
Browse files Browse the repository at this point in the history
amending qa test as per new cat ext
  • Loading branch information
omehes authored Aug 13, 2024
2 parents 5ebb19d + 0834a49 commit fffdc0d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
15 changes: 2 additions & 13 deletions tests/ui/pages/home.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,6 @@ def push_message_input_field_not_visible(self):
def push_content_dialog_box(self):
return self.page.locator("div > div.notifications-toasts.visible")

@property
def push_content_dialog_box_cancel_button(self):
return self.page.locator("div.notification-list-item-buttons-container")

def click_push_content_dialog_box_cancel_button(self):
return self.push_content_dialog_box_cancel_button.click()

@property
def generate_readme_button_is_visible(self):
return self.page.get_by_text("Generate README", exact=True)
Expand All @@ -99,12 +92,8 @@ def click_generate_readme_button(self):

@property
def generate_readme_dialog_box_is_visible(self):
return self.page.wait_for_selector("div.notifications-toasts.visible")

@property
def generate_readme_dialog_box_text(self):
return self.page.locator(
"div.notification-list-item-main-row > div.notification-list-item-message"
return self.page.locator("div.notifications-toasts.visible").get_by_text(
"README: Done!"
)

@property
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/test_readme_validate_other_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,19 @@ def test_readme_validate_other_features(
assert home.openstax_icon_is_visible

# THEN: POET UI launches and is visible
home.click_cat_icon()
home.click_openstax_icon()

home.click_push_content_button()

assert home.push_message_input_field_is_visible
assert "Push Content: Pushing..." in home.push_content_dialog_box.inner_text()

home.click_push_content_dialog_box_cancel_button()
chrome_page.keyboard.press("Escape")
assert home.push_message_input_field_not_visible

home.click_generate_readme_button()
assert home.generate_readme_dialog_box_is_visible
assert "Generate README: Done!" in home.generate_readme_dialog_box_text.inner_text()

home.click_validate_content_button()
assert home.validate_content_popup_dialog_is_visible
Expand Down

0 comments on commit fffdc0d

Please sign in to comment.