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

Fix tenure relationship test failures on BrowserStack/Chrome #79

Merged
merged 2 commits into from
Feb 15, 2018
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
2 changes: 1 addition & 1 deletion cadasta/test/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.5.0'
__version__ = '0.5.1'
2 changes: 1 addition & 1 deletion cadasta/test/record_tests/test_location_creation.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from ..base_test import SeleniumTestCase


@pytest.mark.batch3
@pytest.mark.batch2
class TestLocationCreation(SeleniumTestCase):

@pytest.fixture
Expand Down
2 changes: 1 addition & 1 deletion cadasta/test/record_tests/test_location_deletion.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from ..base_test import SeleniumTestCase


@pytest.mark.batch3
@pytest.mark.batch2
class TestLocationDeletion(SeleniumTestCase):

@pytest.fixture
Expand Down
2 changes: 1 addition & 1 deletion cadasta/test/record_tests/test_location_updating.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from ..base_test import SeleniumTestCase


@pytest.mark.batch3
@pytest.mark.batch2
class TestLocationUpdating(SeleniumTestCase):

@pytest.fixture
Expand Down
19 changes: 10 additions & 9 deletions cadasta/test/record_tests/test_tenure_relationship_creation.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
import re

from selenium.common.exceptions import (NoSuchElementException,
ElementNotInteractableException)
ElementNotInteractableException,
ElementNotVisibleException)
from selenium.webdriver.common.by import By

from ..base_test import SeleniumTestCase
Expand Down Expand Up @@ -273,7 +274,7 @@ def test_user_can_create_relationship_with_new_custom_party(
self.go_to_add_tenure_relationship_form(basic_rightofway)
try:
self.wd.BY_ID('add-party').click()
except ElementNotInteractableException:
except (ElementNotInteractableException, ElementNotVisibleException):
pass
self.update_form_field('name', temp_party['name'])
self.update_form_field('party_type', temp_party['type'])
Expand Down Expand Up @@ -321,7 +322,7 @@ def test_user_can_create_relationship_with_new_conditional_individual(
self.go_to_add_tenure_relationship_form(basic_apartment)
try:
self.wd.BY_ID('add-party').click()
except ElementNotInteractableException:
except (ElementNotInteractableException, ElementNotVisibleException):
pass
self.update_form_field('name', temp_party['name'])
self.update_form_field('party_type', temp_party['type'])
Expand Down Expand Up @@ -371,7 +372,7 @@ def test_user_can_create_relationship_with_new_conditional_corporation(
self.go_to_add_tenure_relationship_form(basic_apartment)
try:
self.wd.BY_ID('add-party').click()
except ElementNotInteractableException:
except (ElementNotInteractableException, ElementNotVisibleException):
pass
self.update_form_field('name', temp_party['name'])
self.update_form_field('party_type', temp_party['type'])
Expand Down Expand Up @@ -422,7 +423,7 @@ def test_user_can_create_relationship_with_new_conditional_group(
self.go_to_add_tenure_relationship_form(basic_apartment)
try:
self.wd.BY_ID('add-party').click()
except ElementNotInteractableException:
except (ElementNotInteractableException, ElementNotVisibleException):
pass
self.update_form_field('name', temp_party['name'])
self.update_form_field('party_type', temp_party['type'])
Expand Down Expand Up @@ -562,7 +563,7 @@ def test_user_can_create_update_custom_relationship_with_new_custom_party(
self.go_to_add_tenure_relationship_form(custom_building)
try:
self.wd.BY_ID('add-party').click()
except ElementNotInteractableException:
except (ElementNotInteractableException, ElementNotVisibleException):
pass
self.update_form_field('name', temp_party['name'])
self.update_form_field('party_type', temp_party['type'])
Expand Down Expand Up @@ -644,7 +645,7 @@ def test_user_can_create_custom_rel_with_new_conditional_individual(
self.go_to_add_tenure_relationship_form(basic_community_boundary)
try:
self.wd.BY_ID('add-party').click()
except ElementNotInteractableException:
except (ElementNotInteractableException, ElementNotVisibleException):
pass
self.update_form_field('name', temp_party['name'])
self.update_form_field('party_type', temp_party['type'])
Expand Down Expand Up @@ -704,7 +705,7 @@ def test_user_can_create_custom_rel_with_new_conditional_corporation(
self.go_to_add_tenure_relationship_form(basic_community_boundary)
try:
self.wd.BY_ID('add-party').click()
except ElementNotInteractableException:
except (ElementNotInteractableException, ElementNotVisibleException):
pass
self.update_form_field('name', temp_party['name'])
self.update_form_field('party_type', temp_party['type'])
Expand Down Expand Up @@ -765,7 +766,7 @@ def test_user_can_create_custom_rel_with_new_conditional_group(
self.go_to_add_tenure_relationship_form(basic_community_boundary)
try:
self.wd.BY_ID('add-party').click()
except ElementNotInteractableException:
except (ElementNotInteractableException, ElementNotVisibleException):
pass
self.update_form_field('name', temp_party['name'])
self.update_form_field('party_type', temp_party['type'])
Expand Down