summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2023-04-26 03:51:49 +0000
committerGerrit Code Review <review@openstack.org>2023-04-26 03:51:49 +0000
commit87a86f5873844ce5265fd2796bdecd6b9b2224f9 (patch)
tree9dfde6b1f95c879382e81dd9d5fb939643bbd092
parentfbc67c3a067e22b6558aa0bef50bd10c841425d0 (diff)
parent3b900bf2e49d1cbe069f50066c8948a31d56fb71 (diff)
downloadhorizon-87a86f5873844ce5265fd2796bdecd6b9b2224f9.tar.gz
Merge "Fix instance error with attribute cells." into stable/wallaby
-rw-r--r--openstack_dashboard/test/integration_tests/pages/project/compute/instancespage.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/openstack_dashboard/test/integration_tests/pages/project/compute/instancespage.py b/openstack_dashboard/test/integration_tests/pages/project/compute/instancespage.py
index 2293abec1..236d9465d 100644
--- a/openstack_dashboard/test/integration_tests/pages/project/compute/instancespage.py
+++ b/openstack_dashboard/test/integration_tests/pages/project/compute/instancespage.py
@@ -10,6 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import netaddr
+from selenium.common import exceptions
from selenium.webdriver.common import by
from openstack_dashboard.test.integration_tests.pages import basepage
@@ -64,6 +65,11 @@ class InstancesPage(basepage.BaseNavigationPage):
FLAVOR_STEP_INDEX = 2
NETWORKS_STEP_INDEX = 3
+ _search_state_active = (
+ by.By.XPATH,
+ "//*[contains(@class,'normal_column')][contains(text(),'Active')]"
+ )
+
def __init__(self, driver, conf):
super().__init__(driver, conf)
self._page_title = "Instances"
@@ -155,6 +161,10 @@ class InstancesPage(basepage.BaseNavigationPage):
row = self._get_row_with_instance_name(name)
return row and row.cells[self.INSTANCES_TABLE_STATUS_COLUMN]
+ try:
+ self.wait_until_element_is_visible(self._search_state_active)
+ except exceptions.TimeoutException:
+ return False
status = self.instances_table.wait_cell_status(cell_getter,
('Active', 'Error'))
return status == 'Active'