diff --git a/RIGS/tests/regions.py b/RIGS/tests/regions.py index 4a305298..74fead70 100644 --- a/RIGS/tests/regions.py +++ b/RIGS/tests/regions.py @@ -5,7 +5,7 @@ from selenium.webdriver.remote.webelement import WebElement from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support.select import Select import datetime -from PyRIGS.tests.regions import Modal +from PyRIGS.tests.regions import TextBox, Modal class Header(Region): diff --git a/RIGS/tests/test_functional.py b/RIGS/tests/test_functional.py index 925a3957..4a241e00 100644 --- a/RIGS/tests/test_functional.py +++ b/RIGS/tests/test_functional.py @@ -127,6 +127,7 @@ class TestEventCreate(BaseRigboardTest): # TODO Test validation with some wrong data self.page.submit() + self.driver.implicitly_wait(10) self.assertTrue(self.page.success) # TODO diff --git a/assets/tests/test_assets.py b/assets/tests/test_assets.py index e6c3533f..4519926e 100644 --- a/assets/tests/test_assets.py +++ b/assets/tests/test_assets.py @@ -104,6 +104,7 @@ class TestAssetForm(AutoLoginTest): self.parent = models.Asset.objects.create(asset_id="9000", description="Shelf", status=self.status, category=self.category, date_acquired=datetime.date(2000, 1, 1)) self.connector = models.Connector.objects.create(description="IEC", current_rating=10, voltage_rating=240, num_pins=3) self.cable_type = models.CableType.objects.create(plug=self.connector, socket=self.connector, circuits=1, cores=3) + self.wait = WebDriverWait(self.driver, 5) self.page = pages.AssetCreate(self.driver, self.live_server_url).open() def test_asset_create(self): @@ -145,6 +146,7 @@ class TestAssetForm(AutoLoginTest): self.assertFalse(self.driver.find_element_by_id('cable-table').is_displayed()) self.page.submit() + self.wait.until(animation_is_finished()) self.assertTrue(self.page.success) # Check that data is right asset = models.Asset.objects.get(asset_id="9001")