mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 05:22:16 +00:00
Buggerit millennium hand and shrimp
Knew I was gonna forget to fix the tests
This commit is contained in:
@@ -31,6 +31,7 @@ class BasePage(Page):
|
||||
|
||||
class FormPage(BasePage):
|
||||
_errors_selector = (By.CLASS_NAME, "alert-danger")
|
||||
_submit_locator = (By.XPATH, "//button[@type='submit' and contains(., 'Save')]")
|
||||
|
||||
def remove_all_required(self):
|
||||
self.driver.execute_script(
|
||||
|
||||
@@ -68,7 +68,6 @@ class AssetList(BasePage):
|
||||
class AssetForm(FormPage):
|
||||
_purchased_from_select_locator = (By.CSS_SELECTOR, 'div#purchased-from-group>div.bootstrap-select')
|
||||
_parent_select_locator = (By.CSS_SELECTOR, 'div#parent-group>div.bootstrap-select')
|
||||
_submit_locator = (By.CLASS_NAME, 'btn-success')
|
||||
form_items = {
|
||||
'asset_id': (regions.TextBox, (By.ID, 'id_asset_id')),
|
||||
'description': (regions.TextBox, (By.ID, 'id_description')),
|
||||
@@ -114,6 +113,7 @@ class AssetCreate(AssetForm):
|
||||
|
||||
class AssetDuplicate(AssetForm):
|
||||
URL_TEMPLATE = '/assets/asset/id/{asset_id}/duplicate'
|
||||
_submit_locator = (By.XPATH, "//button[@type='submit' and contains(., 'Duplicate')]")
|
||||
|
||||
@property
|
||||
def success(self):
|
||||
@@ -152,7 +152,6 @@ class SupplierList(BasePage):
|
||||
|
||||
|
||||
class SupplierForm(FormPage):
|
||||
_submit_locator = (By.XPATH, "//button[@type='submit' and contains(., 'Save')]")
|
||||
form_items = {
|
||||
'name': (regions.TextBox, (By.ID, 'id_name')),
|
||||
}
|
||||
|
||||
@@ -136,8 +136,6 @@ class TestAssetForm(AutoLoginTest):
|
||||
self.page.purchased_from_selector.set_option(self.supplier.name, True)
|
||||
self.page.purchase_price = "12.99"
|
||||
self.page.salvage_value = "99.12"
|
||||
# FIXME Scroll down to make failure screenshot more useful...
|
||||
ActionChains(self.driver).move_to_element(self.driver.find_element_by_class_name('btn-success')).perform()
|
||||
self.page.date_acquired = acquired = datetime.date(2020, 5, 20)
|
||||
|
||||
self.page.parent_selector.toggle()
|
||||
|
||||
Reference in New Issue
Block a user