mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 05:22:16 +00:00
argh
This commit is contained in:
@@ -667,41 +667,41 @@ def test_ra_edit(logged_in_browser, live_server, ra):
|
|||||||
|
|
||||||
|
|
||||||
def test_ec_create_medium(logged_in_browser, live_server, admin_user, medium_ra):
|
def test_ec_create_medium(logged_in_browser, live_server, admin_user, medium_ra):
|
||||||
page = pages.CreateEventChecklist(logged_in_browser.driver, live_server.url, event_id=medium_ra.event.pk).open()
|
page = pages.CreateEventChecklist(logged_in_browser.driver, live_server.url, event_id=medium_ra.event.pk).open()
|
||||||
|
|
||||||
page.safe_parking = True
|
page.safe_parking = True
|
||||||
page.safe_packing = True
|
page.safe_packing = True
|
||||||
page.exits = True
|
page.exits = True
|
||||||
page.trip_hazard = True
|
page.trip_hazard = True
|
||||||
page.warning_signs = True
|
page.warning_signs = True
|
||||||
page.ear_plugs = True
|
page.ear_plugs = True
|
||||||
page.hs_location = "Death Valley"
|
page.hs_location = "Death Valley"
|
||||||
page.extinguishers_location = "With the rest of the fire"
|
page.extinguishers_location = "With the rest of the fire"
|
||||||
# If we do this first the search fails, for ... reasons
|
# If we do this first the search fails, for ... reasons
|
||||||
page.power_mic.search(admin_user.name)
|
page.power_mic.search(admin_user.name)
|
||||||
page.power_mic.toggle()
|
page.power_mic.toggle()
|
||||||
assert not page.power_mic.is_open
|
assert not page.power_mic.is_open
|
||||||
|
|
||||||
# Gotta scroll to make the button clickable
|
# Gotta scroll to make the button clickable
|
||||||
logged_in_browser.driver.execute_script("window.scrollTo(0, document.body.scrollHeight);")
|
logged_in_browser.driver.execute_script("window.scrollTo(0, document.body.scrollHeight);")
|
||||||
|
|
||||||
page.earthing = True
|
page.earthing = True
|
||||||
page.pat = True
|
page.pat = True
|
||||||
page.source_rcd = True
|
page.source_rcd = True
|
||||||
page.labelling = True
|
page.labelling = True
|
||||||
page.fd_voltage_l1 = 240
|
page.fd_voltage_l1 = 240
|
||||||
page.fd_voltage_l2 = 235
|
page.fd_voltage_l2 = 235
|
||||||
page.fd_voltage_l3 = 0
|
page.fd_voltage_l3 = 0
|
||||||
page.fd_phase_rotation = True
|
page.fd_phase_rotation = True
|
||||||
page.fd_earth_fault = 666
|
page.fd_earth_fault = 666
|
||||||
page.fd_pssc = 1984
|
page.fd_pssc = 1984
|
||||||
page.w1_description = "In the carpark, by the bins"
|
page.w1_description = "In the carpark, by the bins"
|
||||||
page.w1_polarity = True
|
page.w1_polarity = True
|
||||||
page.w1_voltage = 240
|
page.w1_voltage = 240
|
||||||
page.w1_earth_fault = 333
|
page.w1_earth_fault = 333
|
||||||
|
|
||||||
page.submit()
|
page.submit()
|
||||||
assert page.success
|
assert page.success
|
||||||
|
|
||||||
|
|
||||||
@screenshot_failure_cls
|
@screenshot_failure_cls
|
||||||
|
|||||||
@@ -274,14 +274,14 @@ class TestSupplierCreateAndEdit(AutoLoginTest):
|
|||||||
|
|
||||||
|
|
||||||
def test_audit_search(logged_in_browser, live_server, test_asset):
|
def test_audit_search(logged_in_browser, live_server, test_asset):
|
||||||
page = pages.AssetAuditList(logged_in_browser.driver, live_server.url).open()
|
page = pages.AssetAuditList(logged_in_browser.driver, live_server.url).open()
|
||||||
# Check that a failed search works
|
# Check that a failed search works
|
||||||
page.set_query("NOTFOUND")
|
page.set_query("NOTFOUND")
|
||||||
page.search()
|
page.search()
|
||||||
assert not logged_in_browser.find_by_id('modal').visible
|
assert not logged_in_browser.find_by_id('modal').visible
|
||||||
logged_in_browser.driver.implicitly_wait(4)
|
logged_in_browser.driver.implicitly_wait(4)
|
||||||
print(page.error)
|
print(page.error)
|
||||||
assert "Asset with that ID does not exist!" in page.error.text
|
assert "Asset with that ID does not exist!" in page.error.text
|
||||||
|
|
||||||
|
|
||||||
@screenshot_failure_cls
|
@screenshot_failure_cls
|
||||||
|
|||||||
Reference in New Issue
Block a user