Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

amending qa test as per new cat ext #211

Merged
merged 1 commit into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading