-
Notifications
You must be signed in to change notification settings - Fork 6
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
Resolved conflicts for previously raised PR #220
base: QA-2857-automation-formplayer-tests-automation
Are you sure you want to change the base?
Resolved conflicts for previously raised PR #220
Conversation
…s://github.com/dimagi/dimagi-qa into ns/formplayer_cherry_pick
…sts-automation' into ns/formplayer_cherry_pick
self.done_button = (By.XPATH, "//button[@class = 'btn btn-primary js-done']") | ||
|
||
# Sub Menu | ||
self.parent_menu = (By.XPATH, "//h3[contains(text(),'Parent Menu')]") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not create locator for each menu.
Use the locator self.case_list_menu for accessing any menu list item.
Simply use self.case_list_menu.format(<menu_name>).
Eg. self.case_list_menu.format(self.child_menu)
@@ -228,7 +273,7 @@ def delete_all_incomplete_forms(self): | |||
if len(list) != 0: | |||
for i in range(len(list)): | |||
time.sleep(2) | |||
self.js_click_direct((By.XPATH, self.delete_incomplete_form.format(1))) | |||
self.wait_to_click_direct((By.XPATH, self.delete_incomplete_form.format(1))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not see the function definition for wait_to_click_direct()
@@ -273,7 +318,7 @@ def delete_first_form(self): | |||
list = self.find_elements(self.incomplete_form_list) | |||
print(len(list)) | |||
if len(list) != 0: | |||
self.js_click_direct((By.XPATH, self.delete_incomplete_form.format(1))) | |||
self.wait_to_click_direct((By.XPATH, self.delete_incomplete_form.format(1))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same!
self.wait_to_click(self.parent_menu) | ||
self.is_present_and_displayed(self.parent_survey) | ||
self.is_present_and_displayed(self.child_menu) | ||
self.is_present_and_displayed(self.visible_child_survey) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of
self.switch_to_frame(self.iframe) time.sleep(5) self.wait_to_click(self.start_option) self.wait_to_click(self.parent_menu) self.is_present_and_displayed(self.parent_survey) self.is_present_and_displayed(self.child_menu) self.is_present_and_displayed(self.visible_child_survey)
you could have used:
self.open_form(self.parent_menu) self.is_present_and_displayed((By.XPATH, self.case_list_menu.format(self.visible_child_survey))) self.is_present_and_displayed((By.XPATH, self.case_list_menu.format(self.child_menu)))
self.case_tests_badge = (By.XPATH, "//h3[text()='Case Tests']/preceding::span[@class='badge'][2]") | ||
|
||
# Sub Menu | ||
self.parent_menu = (By.XPATH, "//h3[contains(text(),'Parent Menu')]") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as the ones for app_preview
Summary
We are working on automating the Formplayer Regression test plan. The link to the test plan is here.
Link to Jira Ticket (if applicable)
https://dimagi-dev.atlassian.net/browse/QAV2-90
QA Checklist