Skip to content

Commit

Permalink
Update IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
alukach authored and Anthony Lukach committed Jan 22, 2018
1 parent e1f074a commit 739ebdc
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
10 changes: 5 additions & 5 deletions cadasta/test/record_tests/test_party_browsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ def test_search_for_an_existing_party_works(
self.wd.BY_XPATH(
'//*[@id="sidebar"]//a[normalize-space()="Parties"]').click()
search_input = self.wd.BY_XPATH(
'//*[@id="DataTables_Table_0_filter"]//input[@type="search"]')
'//*[@id="paginated-table-filter"]//input[@type="search"]')
name = basic_individual['name']
search_input.send_keys(name)
self.wd.BY_XPATH(
'//*[@id="DataTables_Table_0"]//td[contains(.,"{}")]'.format(name))
'//*[@id="paginated-table"]//td[contains(.,"{}")]'.format(name))
self.wd.BY_XPATH(
'//*[@id="DataTables_Table_0"]//td[contains(.,"Individual")]')
'//*[@id="paginated-table"]//td[contains(.,"Individual")]')

def test_search_that_results_in_no_party_works(
self, records_org_prj, prj_user
Expand All @@ -44,8 +44,8 @@ def test_search_that_results_in_no_party_works(
self.wd.BY_XPATH(
'//*[@id="sidebar"]//a[normalize-space()="Parties"]').click()
search_input = self.wd.BY_XPATH(
'//*[@id="DataTables_Table_0_filter"]//input[@type="search"]')
'//*[@id="paginated-table-filter"]//input[@type="search"]')
search_input.send_keys(random_string())
self.wd.wait_for_xpath(
'//*[@id="DataTables_Table_0"]'
'//*[@id="paginated-table"]'
'//*[normalize-space()="No matching records found"]')
34 changes: 17 additions & 17 deletions cadasta/test/record_tests/test_party_creation.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ def test_user_can_create_delete_party(self, basic_org_prj, data_collector):
expected_path = self.prj_dashboard_path + 'records/parties/'
assert self.get_url_path() == expected_path
search_input = self.wd.BY_XPATH(
'//*[@id="DataTables_Table_0_filter"]//input[@type="search"]')
'//*[@class="paginated-table-filter"]//input[@type="search"]')
search_input.send_keys(name)
self.wd.BY_XPATH(
'//*[@id="DataTables_Table_0"]//td[contains(.,"{}")]'.format(name))
'//*[@id="paginated-table"]//td[contains(.,"{}")]'.format(name))
self.wd.BY_XPATH(
'//*[@id="DataTables_Table_0"]//td[contains(.,"Individual")]')
'//*[@id="paginated-table"]//td[contains(.,"Individual")]')
self.wd.BY_LINK(name).click()
self.wd.BY_XPATH('//h2[contains(.,"{}")]'.format(name))
self.wd.BY_XPATH('//td[contains(.,"{}")]'.format(name))
Expand All @@ -76,10 +76,10 @@ def test_user_can_create_delete_party(self, basic_org_prj, data_collector):
'//button[contains(., "Yes, delete this party")]').click()
assert self.get_url_path() == expected_path
search_input = self.wd.BY_XPATH(
'//*[@id="DataTables_Table_0_filter"]//input[@type="search"]')
'//*[@class="paginated-table-filter"]//input[@type="search"]')
search_input.send_keys(name)
self.wd.BY_XPATH(
'//*[@id="DataTables_Table_0"]'
'//*[@id="paginated-table"]'
'//*[normalize-space()="No matching records found" or'
' normalize-space()="No data available in table"]')

Expand All @@ -100,12 +100,12 @@ def test_user_can_create_update_party_with_custom_attributes(
expected_path = self.prj_dashboard_path + 'records/parties/'
assert self.get_url_path() == expected_path
search_input = self.wd.BY_XPATH(
'//*[@id="DataTables_Table_0_filter"]//input[@type="search"]')
'//*[@class="paginated-table-filter"]//input[@type="search"]')
search_input.send_keys(name)
self.wd.BY_XPATH(
'//*[@id="DataTables_Table_0"]//td[contains(.,"{}")]'.format(name))
'//*[@id="paginated-table"]//td[contains(.,"{}")]'.format(name))
self.wd.BY_XPATH(
'//*[@id="DataTables_Table_0"]//td[contains(.,"Individual")]')
'//*[@id="paginated-table"]//td[contains(.,"Individual")]')
self.wd.BY_LINK(name).click()
self.wd.BY_XPATH('//h2[contains(.,"{}")]'.format(name))
self.wd.BY_XPATH('//td[contains(.,"{}")]'.format(name))
Expand Down Expand Up @@ -148,12 +148,12 @@ def test_user_can_create_update_individual_with_conditional_attributes(
expected_path = self.prj_dashboard_path + 'records/parties/'
assert self.get_url_path() == expected_path
search_input = self.wd.BY_XPATH(
'//*[@id="DataTables_Table_0_filter"]//input[@type="search"]')
'//*[@class="paginated-table-filter"]//input[@type="search"]')
search_input.send_keys(name)
self.wd.BY_XPATH(
'//*[@id="DataTables_Table_0"]//td[contains(.,"{}")]'.format(name))
'//*[@id="paginated-table"]//td[contains(.,"{}")]'.format(name))
self.wd.BY_XPATH(
'//*[@id="DataTables_Table_0"]//td[contains(.,"Individual")]')
'//*[@id="paginated-table"]//td[contains(.,"Individual")]')
self.wd.BY_LINK(name).click()
self.wd.BY_XPATH('//h2[contains(.,"{}")]'.format(name))
self.wd.BY_XPATH('//td[contains(.,"{}")]'.format(name))
Expand Down Expand Up @@ -199,12 +199,12 @@ def test_user_can_create_corporation_with_conditional_attributes(
expected_path = self.prj_dashboard_path + 'records/parties/'
assert self.get_url_path() == expected_path
search_input = self.wd.BY_XPATH(
'//*[@id="DataTables_Table_0_filter"]//input[@type="search"]')
'//*[@class="paginated-table-filter"]//input[@type="search"]')
search_input.send_keys(name)
self.wd.BY_XPATH(
'//*[@id="DataTables_Table_0"]//td[contains(.,"{}")]'.format(name))
'//*[@id="paginated-table"]//td[contains(.,"{}")]'.format(name))
self.wd.BY_XPATH(
'//*[@id="DataTables_Table_0"]//td[contains(.,"Corporation")]')
'//*[@id="paginated-table"]//td[contains(.,"Corporation")]')
self.wd.BY_LINK(name).click()
self.wd.BY_XPATH('//h2[contains(.,"{}")]'.format(name))
self.wd.BY_XPATH('//td[contains(.,"{}")]'.format(name))
Expand Down Expand Up @@ -235,12 +235,12 @@ def test_user_can_create_group_with_conditional_attributes(
expected_path = self.prj_dashboard_path + 'records/parties/'
assert self.get_url_path() == expected_path
search_input = self.wd.BY_XPATH(
'//*[@id="DataTables_Table_0_filter"]//input[@type="search"]')
'//*[@class="paginated-table-filter"]//input[@type="search"]')
search_input.send_keys(name)
self.wd.BY_XPATH(
'//*[@id="DataTables_Table_0"]//td[contains(.,"{}")]'.format(name))
'//*[@id="paginated-table"]//td[contains(.,"{}")]'.format(name))
self.wd.BY_XPATH(
'//*[@id="DataTables_Table_0"]//td[contains(.,"Group")]')
'//*[@id="paginated-table"]//td[contains(.,"Group")]')
self.wd.BY_LINK(name).click()
self.wd.BY_XPATH('//h2[contains(.,"{}")]'.format(name))
self.wd.BY_XPATH('//td[contains(.,"{}")]'.format(name))
Expand Down

0 comments on commit 739ebdc

Please sign in to comment.