Merge "Speed up integration tests"

This commit is contained in:
Zuul 2022-06-03 21:54:10 +00:00 committed by Gerrit Code Review
commit 5d48d0c548
1 changed files with 2 additions and 6 deletions

View File

@ -298,8 +298,7 @@ class ThemableSelectFormFieldRegion(BaseFormFieldRegion):
class BaseFormRegion(baseregion.BaseRegion):
"""Base class for forms."""
_submit_locator = (by.By.CSS_SELECTOR, '*.btn.btn-primary')
_submit_danger_locator = (by.By.CSS_SELECTOR, '*.btn.btn-danger')
_submit_locator = (by.By.CSS_SELECTOR, '*.btn.btn-primary,*.btn.btn-danger')
_cancel_locator = (by.By.CSS_SELECTOR, '*.btn.cancel')
_default_form_locator = (by.By.CSS_SELECTOR, 'div.modal-dialog')
@ -315,10 +314,7 @@ class BaseFormRegion(baseregion.BaseRegion):
@property
def _submit_element(self):
try:
submit_element = self._get_element(*self._submit_locator)
except exceptions.NoSuchElementException:
submit_element = self._get_element(*self._submit_danger_locator)
submit_element = self._get_element(*self._submit_locator)
return submit_element
def submit(self):