Refactor asset search to use SecureAPIRequest

Closes #474 and #465
This commit is contained in:
2022-01-19 19:02:35 +00:00
parent 9e1d54dc02
commit ce83ae6dd1
7 changed files with 30 additions and 100 deletions

View File

@@ -1,3 +1,4 @@
import time
import datetime
from django.utils import timezone
@@ -138,11 +139,11 @@ class TestAssetForm(AutoLoginTest):
self.page.parent_selector.toggle()
self.assertTrue(self.page.parent_selector.is_open)
option = str(self.parent)
option = self.parent.asset_id
self.page.parent_selector.search(option)
self.driver.implicitly_wait(1)
self.page.parent_selector.set_option(option, True)
self.assertTrue(self.page.parent_selector.options[0].selected)
time.sleep(2) # Slow down for javascript
# self.page.parent_selector.set_option(option, True)
# self.assertTrue(self.page.parent_selector.options[0].selected)
self.page.parent_selector.toggle()
self.assertFalse(self.driver.find_element_by_id('cable-table').is_displayed())