What about if I did this

This commit is contained in:
2020-05-26 15:10:27 +01:00
parent e45e58321c
commit 920ea0d058
2 changed files with 7 additions and 7 deletions

View File

@@ -30,7 +30,7 @@ class BaseRigboardTest(AutoLoginTest):
self.vatrate = models.VatRate.objects.create(start_at='2014-03-05', rate=0.20, comment='test1')
super().setUp()
self.client = models.Person.objects.create(name='Rigboard Test Person', email='rigboard@functional.test')
self.wait = WebDriverWait(self.driver, 5)
self.wait = WebDriverWait(self.driver, 10)
def select_event_type(self, event_type):
self.wait.until(animation_is_finished())
@@ -168,7 +168,7 @@ class TestEventCreate(BaseRigboardTest):
self.page.person_selector.toggle()
# TODO
# TODO Convert the below three tests into non-live tests and use only one wrong data in the above test to check error display
def test_date_validation(self):
self.select_event_type("Rig")
@@ -187,14 +187,14 @@ class TestEventCreate(BaseRigboardTest):
self.assertFalse(self.page.success)
self.assertIn("can't finish before it has started", self.page.errors["General form errors"][0])
self.wait.until(animation_is_finished())
# Fix it
self.page.end_date = datetime.date(2020, 1, 11)
# Should work
self.page.submit()
self.assertTrue(self.page.success)
# TODO Seperated because of the way submit checks erroring
def test_date_validation_2(self):
self.select_event_type("Rig")