From 0834a49ab4798c4946919bc2a085b1326b6e624a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ott=C3=B3?= Date: Wed, 7 Aug 2024 15:36:03 -0500 Subject: [PATCH] amending qa test as per new cat ext --- tests/ui/pages/home.py | 15 ++------------- tests/ui/test_readme_validate_other_features.py | 4 ++-- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/tests/ui/pages/home.py b/tests/ui/pages/home.py index e932bf0a..3e07bb94 100644 --- a/tests/ui/pages/home.py +++ b/tests/ui/pages/home.py @@ -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) @@ -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 diff --git a/tests/ui/test_readme_validate_other_features.py b/tests/ui/test_readme_validate_other_features.py index 08e6bb58..e0121275 100644 --- a/tests/ui/test_readme_validate_other_features.py +++ b/tests/ui/test_readme_validate_other_features.py @@ -42,6 +42,7 @@ 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() @@ -49,12 +50,11 @@ def test_readme_validate_other_features( 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