mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-27 18:32:16 +00:00
etc
This commit is contained in:
@@ -273,13 +273,14 @@ class TestSupplierCreateAndEdit(AutoLoginTest):
|
|||||||
self.assertTrue(self.page.success)
|
self.assertTrue(self.page.success)
|
||||||
|
|
||||||
|
|
||||||
def test_audit_search(logged_in_browser, live_server):
|
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)
|
||||||
assert "Asset with that ID does not exist!" in page.error.text
|
assert "Asset with that ID does not exist!" in page.error.text
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ def pytest_configure():
|
|||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def logged_in_browser(live_server, browser):
|
def logged_in_browser(live_server, browser, db):
|
||||||
profile, created = Profile.objects.get_or_create(
|
profile, created = Profile.objects.get_or_create(
|
||||||
username="EventTest", first_name="Event", last_name="Test", initials="ETU", is_superuser=True)
|
username="EventTest", first_name="Event", last_name="Test", initials="ETU", is_superuser=True)
|
||||||
profile.set_password("EventTestPassword")
|
profile.set_password("EventTestPassword")
|
||||||
|
|||||||
Reference in New Issue
Block a user