Should fix asset test on CI

This commit is contained in:
2021-01-26 19:37:12 +00:00
parent 8f54897b69
commit d64d0f54d4
2 changed files with 1 additions and 2 deletions

View File

@@ -244,7 +244,6 @@ class AssetAuditList(AssetList):
def close(self):
self.page.find_element(*self._close_selector).click()
self.wait.until(expected_conditions.invisibility_of_element_located((By.ID, 'modal')))
def remove_all_required(self):
self.driver.execute_script("Array.from(document.getElementsByTagName(\"input\")).forEach(function (el, ind, arr) { el.removeAttribute(\"required\")});")

View File

@@ -326,8 +326,8 @@ class TestAssetAudit(AutoLoginTest):
self.wait.until(EC.visibility_of_element_located((By.ID, 'modal')))
self.assertEqual(self.page.modal.asset_id, asset_row.id)
# First close button is for the not found error
self.page.modal.close()
self.wait.until(EC.invisibility_of_element_located((By.ID, 'modal')))
self.assertFalse(self.driver.find_element_by_id('modal').is_displayed())
# Make sure audit log was NOT filled out
audited = models.Asset.objects.get(asset_id=asset_row.id)