Skip to content

Commit

Permalink
Handle UI part of unreleased submariner info
Browse files Browse the repository at this point in the history
Signed-off-by: Shylesh Kumar Mohan <[email protected]>
  • Loading branch information
shylesh committed Oct 20, 2023
1 parent 6f1b21f commit ead53ef
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
1 change: 1 addition & 0 deletions conf/ocsci/submariner_downstream_unreleased.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ ENV_DATA:
submariner_source: "downstream"
submariner_release_type: "unreleased"
submariner_version: "0.16.0"
submariner_unreleased_channel: "stable-0.16"
17 changes: 15 additions & 2 deletions ocs_ci/ocs/acm/acm.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,8 @@ def install_submariner_ui(self, globalnet=True):
)
self.do_click(self.page_nav["gateway-count-btn"])
self.do_click(self.page_nav["gateway-count-btn"])
if config.ENV_DATA.get("submariner_release_type") == "unreleased":
self.submariner_unreleased_downstream_info()
log.info("Click on Next button")
self.do_click(self.page_nav["next-btn"])
log.info("Click on 'Enable NAT-T' to uncheck it [2]")
Expand All @@ -274,6 +276,8 @@ def install_submariner_ui(self, globalnet=True):
)
self.do_click(self.page_nav["gateway-count-btn"])
self.do_click(self.page_nav["gateway-count-btn"])
if config.ENV_DATA.get("submariner_release_type") == "unreleased":
self.submariner_unreleased_downstream_info()
log.info("Click on Next button [2]")
self.do_click(self.page_nav["next-btn"])
if ocs_version >= version.VERSION_4_13 and globalnet:
Expand All @@ -282,12 +286,21 @@ def install_submariner_ui(self, globalnet=True):
check_globalnet == constants.GLOBALNET_STATUS
), "Globalnet was not enabled"
log.info("Globalnet is enabled")
# TODO: Use custom submariner sucscription from UI in case of downstream unreleased submariner

self.take_screenshot()
log.info("Click on 'Install'")
self.do_click(self.page_nav["install-btn"])

def submariner_unreleased_downstream_info(self):
self.do_click(self.page_nav["submariner-custom-subscription"])
self.do_clear(self.page_nav["submariner-custom-source"])
self.do_send_keys(
self.page_nav["submariner-custom-source"], "submariner-catalogsource"
)
self.do_send_keys(
self.page_nav["submariner-custom-channel"],
config.ENV_DATA["submariner_unreleased_channel"],
)

def submariner_validation_ui(self):
"""
This function validates submariner status on ACM console which connects 2 managed OCP clusters.
Expand Down
8 changes: 8 additions & 0 deletions ocs_ci/ocs/ui/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -879,6 +879,13 @@
**acm_configuration_4_12,
}

acm_configuration_4_14 = {
**acm_configuration_4_13,
"submariner-custom-subscription": ("isCustomSubscription", By.ID),
"submariner-custom-source": ("source", By.ID),
"submariner-custom-channel": ("channel", By.ID),
}

add_capacity = {
"ocs_operator": (
'a[data-test-operator-row="OpenShift Container Storage"]',
Expand Down Expand Up @@ -1710,6 +1717,7 @@
**acm_configuration_4_11,
**acm_configuration_4_12,
**acm_configuration_4_13,
**acm_configuration_4_14,
},
"validation": {
**validation,
Expand Down

0 comments on commit ead53ef

Please sign in to comment.