Fix database locking shenanigans

This commit is contained in:
2021-02-15 00:44:26 +00:00
parent 6c9e360927
commit 925498be02
5 changed files with 32 additions and 21 deletions

View File

@@ -283,21 +283,24 @@ class EditEventChecklist(CreateEventChecklist):
@property
def vehicles(self):
return [
self.VehicleRow(self, el) for el in self.find_elements(*self._vehicle_row_locator)
]
return [self.VehicleRow(self, el) for el in self.find_elements(*self._vehicle_row_locator)]
class VehicleRow(Region):
_name_locator = ('xpath', "//input[@id[starts-with(., 'vehicle')]")
_select_locator = ('xpath', "//div[contains(@class, 'bootstrap-select')]")
_name_locator = ('xpath', ".//input")
_select_locator = ('xpath', ".//div[contains(@class,'bootstrap-select')]/..")
@property
def name(self):
return regions.TextBox(self, *_name_locator)
return regions.TextBox(self, self.root.find_element(*self._name_locator))
@property
def vehicle(self):
return regions.BootstrapSelect(self, self.find_element(*self._select_locator))
return regions.BootstrapSelectElement(self, self.root.find_element(*self._select_locator))
@property
def success(self):
return 'edit' not in self.driver.current_url
class GenericList(BasePage):
_search_selector = (By.CSS_SELECTOR, 'div.input-group:nth-child(2) > input:nth-child(1)')