diff --git a/backend/selenium_tests/page_object/registration_data_import/registration_data_import.py b/backend/selenium_tests/page_object/registration_data_import/registration_data_import.py index 60d0bf7670..6fc3289ff5 100644 --- a/backend/selenium_tests/page_object/registration_data_import/registration_data_import.py +++ b/backend/selenium_tests/page_object/registration_data_import/registration_data_import.py @@ -143,7 +143,9 @@ def getErrorsContainer(self) -> WebElement: return self.wait_for(self.errorsContainer) def buttonImportFileIsEnabled(self, timeout: int = 30) -> bool: - for _ in range(timeout): + for i in range(timeout): + print(self.getButtonImportFile().is_enabled()) + self.screenshot(str(i)) if self.getButtonImportFile().is_enabled(): # type: ignore return True sleep(1) diff --git a/backend/selenium_tests/registration_data_import/test_registration_data_import.py b/backend/selenium_tests/registration_data_import/test_registration_data_import.py index 0e3b911943..f86887169e 100644 --- a/backend/selenium_tests/registration_data_import/test_registration_data_import.py +++ b/backend/selenium_tests/registration_data_import/test_registration_data_import.py @@ -228,7 +228,6 @@ def test_import_empty_kobo_form( pageRegistrationDataImport.getButtonImportFile().click() pageRegistrationDataImport.checkAlert("Cannot import empty form") - @pytest.mark.skip(reason="Kobo form is not available. This is a external service, we cannot control it.") @pytest.mark.vcr(ignore_localhost=True, ignore_hosts=["elasticsearch"]) def test_import_kobo_form( self, @@ -254,7 +253,7 @@ def test_import_kobo_form( pageRegistrationDataImport.getKoboProjectSelect().click() pageRegistrationDataImport.select_listbox_element("UNICEF NGA Education").click() - assert pageRegistrationDataImport.buttonImportFileIsEnabled(timeout=300) + assert pageRegistrationDataImport.buttonImportFileIsEnabled(timeout=60) assert "1" in pageRegistrationDataImport.getNumberOfHouseholds().text assert "2" in pageRegistrationDataImport.getNumberOfIndividuals().text diff --git a/compose.selenium.yml b/compose.selenium.yml index 17b17de6c3..b6fca7f112 100644 --- a/compose.selenium.yml +++ b/compose.selenium.yml @@ -46,7 +46,7 @@ services: command: | sh -c " waitforit -host=db_selenium -port=5432 -timeout=30 && - pytest -svvv selenium_tests --html-report=./report/report.html + pytest -svvv -k test_import_kobo_form selenium_tests --html-report=./report/report.html " ports: - "8080:8080" diff --git a/deployment/docker-compose.selenium.yml b/deployment/docker-compose.selenium.yml index 7d17e14278..fa95be6bfb 100644 --- a/deployment/docker-compose.selenium.yml +++ b/deployment/docker-compose.selenium.yml @@ -33,7 +33,7 @@ services: command: | bash -c " waitforit -host=db -port=5432 -timeout=30 - pytest -svvv selenium_tests --cov-report xml:./coverage.xml --html-report=./report/report.html --randomly-seed=42 + pytest -svvv -k test_import_kobo_form selenium_tests --cov-report xml:./coverage.xml --html-report=./report/report.html --randomly-seed=42 " depends_on: db: