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

Resolved conflicts for previously raised PR #220

Open
wants to merge 5 commits into
base: QA-2857-automation-formplayer-tests-automation
Choose a base branch
from

Conversation

nsaxena03
Copy link
Collaborator

Summary

We are working on automating the Formplayer Regression test plan. The link to the test plan is here.

  • Web_Apps_Access/Basics
  • App_preview_Access/Basics
  • General&LoginAs
  • Appearance_Attributes&Formatting
  • Other Functional Areas

Link to Jira Ticket (if applicable)

https://dimagi-dev.atlassian.net/browse/QAV2-90

QA Checklist

  • Label(s) and Assignee added
  • PR sent for review
  • Documentation (if applicable) added/updated

@nsaxena03 nsaxena03 added web apps Web apps tests changes or additions formplayer Formplayer changes or additions app preview App Preview changes or addition labels Apr 25, 2023
@nsaxena03 nsaxena03 requested a review from kbo001 April 25, 2023 12:24
@nsaxena03 nsaxena03 self-assigned this Apr 25, 2023
@nsaxena03 nsaxena03 changed the base branch from QA-2857-automation-formplayer-tests-automation to master April 25, 2023 13:45
@nsaxena03 nsaxena03 changed the base branch from master to QA-2857-automation-formplayer-tests-automation April 25, 2023 13:46
self.done_button = (By.XPATH, "//button[@class = 'btn btn-primary js-done']")

# Sub Menu
self.parent_menu = (By.XPATH, "//h3[contains(text(),'Parent Menu')]")
Copy link
Collaborator

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)))
Copy link
Collaborator

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)))
Copy link
Collaborator

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)
Copy link
Collaborator

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')]")
Copy link
Collaborator

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

@nsaxena03 nsaxena03 changed the title Resolved conflicts for the previously raise PR Resolved conflicts for previously raised PR May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app preview App Preview changes or addition formplayer Formplayer changes or additions web apps Web apps tests changes or additions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants