Skip to content

Commit

Permalink
Fix kebab menu locator for add capacity UI test (red-hat-storage#10066)
Browse files Browse the repository at this point in the history
Signed-off-by: am-agrawa <[email protected]>
  • Loading branch information
am-agrawa authored and Amrita Mahapatra committed Jul 25, 2024
1 parent e635872 commit e98a1e5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
3 changes: 3 additions & 0 deletions ocs_ci/ocs/ui/add_replace_device_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,12 @@ def add_capacity_ui(self):
self.do_click(self.add_capacity_ui_loc["ocs_operator"])
self.do_click(self.add_capacity_ui_loc["storage_cluster_tab"])
time.sleep(1)
logger.info("Click on kebab menu of Storage Systems")
self.do_click(
self.add_capacity_ui_loc["kebab_storage_cluster"], avoid_stale=True
)
self.take_screenshot()
logger.info("Click on Add Capacity button under the kebab menu")
self.wait_until_expected_text_is_found(
locator=self.add_capacity_ui_loc["add_capacity_button"],
timeout=10,
Expand Down
2 changes: 1 addition & 1 deletion ocs_ci/ocs/ui/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1063,7 +1063,7 @@
'a[data-test-id="horizontal-link-Storage System"]',
By.CSS_SELECTOR,
),
"kebab_storage_cluster": ('button[data-test-id="kebab-button"', By.CSS_SELECTOR),
"kebab_storage_cluster": ("//button[@data-test-id='kebab-button']", By.XPATH),
"add_capacity_button": ('button[data-test-action="Add Capacity"]', By.CSS_SELECTOR),
"select_sc_add_capacity": (
'button[data-test="add-cap-sc-dropdown"]',
Expand Down
2 changes: 1 addition & 1 deletion ocs_ci/utility/localstorage.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def check_local_volume_local_volume_set():
return lv_or_lvs_dict


@retry(AssertionError, 12, 10, 1)
@retry(AssertionError, 15, 15, 5)
def check_pvs_created(num_pvs_required):
"""
Verify that exact number of PVs were created and are in the Available state
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
skipif_stretch_cluster,
skipif_hci_provider_and_client,
brown_squad,
black_squad,
)
from ocs_ci.framework.testlib import (
ignore_leftovers,
Expand Down Expand Up @@ -115,7 +116,6 @@ def add_capacity_test(ui_flag=False):
check_ceph_health_after_add_capacity(ceph_rebalance_timeout=5400)


@brown_squad
@ignore_leftovers
@polarion_id("OCS-1191")
@pytest.mark.second_to_last
Expand All @@ -134,21 +134,22 @@ class TestAddCapacity(ManageTest):
"""

@acceptance
@brown_squad
def test_add_capacity_cli(self, reduce_and_resume_cluster_load):
"""
Add capacity on non-lso cluster via cli on Acceptance suite
"""
add_capacity_test(ui_flag=False)

@tier1
@black_squad
def test_add_capacity_ui(self, reduce_and_resume_cluster_load):
"""
Add capacity on non-lso cluster via UI on tier1 suite
"""
add_capacity_test(ui_flag=True)


@brown_squad
@ignore_leftovers
@polarion_id("OCS-4647")
@pytest.mark.second_to_last
Expand All @@ -167,13 +168,15 @@ class TestAddCapacityLSO(ManageTest):
"""

@acceptance
@brown_squad
def test_add_capacity_lso_cli(self, reduce_and_resume_cluster_load):
"""
Add capacity on lso cluster via CLI on Acceptance suite
"""
storage_cluster.add_capacity_lso(ui_flag=False)

@tier1
@black_squad
def test_add_capacity_lso_ui(self, reduce_and_resume_cluster_load):
"""
Add capacity on lso cluster via UI on tier1 suite
Expand Down

0 comments on commit e98a1e5

Please sign in to comment.