Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release-4.15] Fix kebab menu locator for add capacity UI test #10118

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -987,7 +987,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 @@ -112,7 +113,6 @@ def add_capacity_test(ui_flag=False):
check_ceph_health_after_add_capacity(ceph_rebalance_timeout=3600)


@brown_squad
@ignore_leftovers
@polarion_id("OCS-1191")
@pytest.mark.second_to_last
Expand All @@ -131,21 +131,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 @@ -164,13 +165,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
Loading