From f97b9a9eb8d65186f890b8aa0c40e1fbfb1ca409 Mon Sep 17 00:00:00 2001 From: Martin Pavlasek Date: Tue, 24 Feb 2015 20:06:35 +0100 Subject: [PATCH] Use _wait_for_spinner() This useful method is currently present in repo, but unfortunately unused. This patch use it where is necessary - after click to Submit btn in several dialogues. Change-Id: Ib9b51d864c5d3af958bc31a74266051c97456790 Partially implements blueprint: selenium-integration-testing Closes-Bug: 1425250 --- .../test/integration_tests/pages/admin/system/flavorspage.py | 2 ++ .../test/integration_tests/pages/identity/userspage.py | 2 ++ .../test/integration_tests/pages/project/compute/imagespage.py | 2 ++ 3 files changed, 6 insertions(+) diff --git a/openstack_dashboard/test/integration_tests/pages/admin/system/flavorspage.py b/openstack_dashboard/test/integration_tests/pages/admin/system/flavorspage.py index 72e08bccdf..029b226994 100644 --- a/openstack_dashboard/test/integration_tests/pages/admin/system/flavorspage.py +++ b/openstack_dashboard/test/integration_tests/pages/admin/system/flavorspage.py @@ -72,12 +72,14 @@ class FlavorsPage(basepage.BaseNavigationPage): self.create_flavor_form.ephemeral_disk.value = ephemeral_disk self.create_flavor_form.swap_disk.value = swap_disk self.create_flavor_form.submit.click() + self._wait_till_spinner_disappears() def delete_flavor(self, name): row = self._get_row_with_flavor_name(name) row.mark() self.flavors_table.delete_flavors.click() self.confirm_delete_flavors_form.submit.click() + self._wait_till_spinner_disappears() def is_flavor_present(self, name): return bool(self._get_row_with_flavor_name(name)) diff --git a/openstack_dashboard/test/integration_tests/pages/identity/userspage.py b/openstack_dashboard/test/integration_tests/pages/identity/userspage.py index 726b440581..e4ea99c65f 100644 --- a/openstack_dashboard/test/integration_tests/pages/identity/userspage.py +++ b/openstack_dashboard/test/integration_tests/pages/identity/userspage.py @@ -71,12 +71,14 @@ class UsersPage(basepage.BaseNavigationPage): self.create_user_form.project.text = project self.create_user_form.role.text = role self.create_user_form.submit.click() + self._wait_till_spinner_disappears() def delete_user(self, name): row = self._get_row_with_user_name(name) row.mark() self.users_table.delete_users.click() self.confirm_delete_users_form.submit.click() + self._wait_till_spinner_disappears() def is_user_present(self, name): return bool(self._get_row_with_user_name(name)) diff --git a/openstack_dashboard/test/integration_tests/pages/project/compute/imagespage.py b/openstack_dashboard/test/integration_tests/pages/project/compute/imagespage.py index 3fdcaa5151..da44ac9f6f 100644 --- a/openstack_dashboard/test/integration_tests/pages/project/compute/imagespage.py +++ b/openstack_dashboard/test/integration_tests/pages/project/compute/imagespage.py @@ -91,12 +91,14 @@ class ImagesPage(basepage.BaseNavigationPage): if is_protected: self.create_image_form.protected.mark() self.create_image_form.submit.click() + self._wait_till_spinner_disappears() def delete_image(self, name): row = self._get_row_with_image_name(name) row.mark() self.images_table.delete_images.click() self.confirm_delete_images_form.submit.click() + self._wait_till_spinner_disappears() def is_image_present(self, name): return bool(self._get_row_with_image_name(name))