From 7f0546848377e82e5ab1ceec28f2b0c0b18ac82e Mon Sep 17 00:00:00 2001 From: Arona Jones Date: Sun, 14 Feb 2021 02:36:07 +0000 Subject: [PATCH] argh --- RIGS/tests/test_interaction.py | 62 ++++++++++++++++---------------- assets/tests/test_interaction.py | 16 ++++----- 2 files changed, 39 insertions(+), 39 deletions(-) diff --git a/RIGS/tests/test_interaction.py b/RIGS/tests/test_interaction.py index 201713b0..74f9bf5f 100644 --- a/RIGS/tests/test_interaction.py +++ b/RIGS/tests/test_interaction.py @@ -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): - 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_packing = True - page.exits = True - page.trip_hazard = True - page.warning_signs = True - page.ear_plugs = True - page.hs_location = "Death Valley" - page.extinguishers_location = "With the rest of the fire" - # If we do this first the search fails, for ... reasons - page.power_mic.search(admin_user.name) - page.power_mic.toggle() - assert not page.power_mic.is_open + page.safe_parking = True + page.safe_packing = True + page.exits = True + page.trip_hazard = True + page.warning_signs = True + page.ear_plugs = True + page.hs_location = "Death Valley" + page.extinguishers_location = "With the rest of the fire" + # If we do this first the search fails, for ... reasons + page.power_mic.search(admin_user.name) + page.power_mic.toggle() + assert not page.power_mic.is_open - # Gotta scroll to make the button clickable - logged_in_browser.driver.execute_script("window.scrollTo(0, document.body.scrollHeight);") + # Gotta scroll to make the button clickable + logged_in_browser.driver.execute_script("window.scrollTo(0, document.body.scrollHeight);") - page.earthing = True - page.pat = True - page.source_rcd = True - page.labelling = True - page.fd_voltage_l1 = 240 - page.fd_voltage_l2 = 235 - page.fd_voltage_l3 = 0 - page.fd_phase_rotation = True - page.fd_earth_fault = 666 - page.fd_pssc = 1984 - page.w1_description = "In the carpark, by the bins" - page.w1_polarity = True - page.w1_voltage = 240 - page.w1_earth_fault = 333 + page.earthing = True + page.pat = True + page.source_rcd = True + page.labelling = True + page.fd_voltage_l1 = 240 + page.fd_voltage_l2 = 235 + page.fd_voltage_l3 = 0 + page.fd_phase_rotation = True + page.fd_earth_fault = 666 + page.fd_pssc = 1984 + page.w1_description = "In the carpark, by the bins" + page.w1_polarity = True + page.w1_voltage = 240 + page.w1_earth_fault = 333 - page.submit() - assert page.success + page.submit() + assert page.success @screenshot_failure_cls diff --git a/assets/tests/test_interaction.py b/assets/tests/test_interaction.py index f0dd7d96..0d60961a 100644 --- a/assets/tests/test_interaction.py +++ b/assets/tests/test_interaction.py @@ -274,14 +274,14 @@ class TestSupplierCreateAndEdit(AutoLoginTest): def test_audit_search(logged_in_browser, live_server, test_asset): - page = pages.AssetAuditList(logged_in_browser.driver, live_server.url).open() - # Check that a failed search works - page.set_query("NOTFOUND") - page.search() - assert not logged_in_browser.find_by_id('modal').visible - logged_in_browser.driver.implicitly_wait(4) - print(page.error) - assert "Asset with that ID does not exist!" in page.error.text + page = pages.AssetAuditList(logged_in_browser.driver, live_server.url).open() + # Check that a failed search works + page.set_query("NOTFOUND") + page.search() + assert not logged_in_browser.find_by_id('modal').visible + logged_in_browser.driver.implicitly_wait(4) + print(page.error) + assert "Asset with that ID does not exist!" in page.error.text @screenshot_failure_cls