Skip to content

Commit

Permalink
Merge pull request #237 from HanzJas/cherrypick_conf_changes_to_fr1
Browse files Browse the repository at this point in the history
 [18.0.-fr1] Add required test variables into horizon.conf
  • Loading branch information
openshift-merge-bot[bot] authored Jan 20, 2025
2 parents 9c86597 + 3444056 commit fc8caa8
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions container-images/tcib/base/os/horizontest/run_horizontest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,17 @@ SELENIUM_EXPLICIT_WAIT=180
SELENIUM_PAGE_TIMEOUT=120
SELENIUM_IMPLICIT_WAIT=30
HORIZONTEST_DEBUG_MODE="${HORIZONTEST_DEBUG_MODE:-false}"
SUBNET_NAME=public_subnet
PROJECT_NAME_XPATH="//span[@class='rcueicon rcueicon-folder-open']/ancestor::li"
HELP_SEQUENCE=".//*[normalize-space()='Help']"
HELP_URL="https://docs.redhat.com/en/documentation/red_hat_openstack_services_on_openshift/"
TEST_MATERIAL_THEME=False
USER_NAME_XPATH="//span[@class='rcueicon rcueicon-user']/ancestor::li"
BROWSE_LEFT_PANEL_MAIN="Project,Project,Project,Project,Project,Project,Project,Project,Project,Project,Project,Project,Project,Project,Project,Project,Admin,Admin,Admin,Admin,Admin,Admin,Admin,Admin,Admin,Admin,Admin,Admin,Admin,Admin,Admin,Admin,Admin,Admin,Identity,Identity,Identity,Identity,Identity"
BROWSE_LEFT_PANEL_SEC="Project,None,None,None,None,None,Volumes,Volumes,Network,Network,Network,Network,Network,Network,Network,Object Store,None,Compute,Compute,Compute,Compute,Compute,Volume,Volume,Volume,Volume,Network,Network,Network,Network,Network,System,System,System,None,None,None,None,None"
BLP_SEC_LINE_XPATH=".//*[@class='navbar primary persistent-secondary']"
BLP_SEC_LINE_REQ_BTN=".//*[@class='navbar primary persistent-secondary']//a[normalize-space()='{sec_panel}']//ancestor::li"
BLP_SIDEBAR_XPATH=".//*[@class='navbar primary persistent-secondary']//a[normalize-space()='{sec_panel}']//ancestor::li//*[@class='dropdown-menu']"

# assert mandatory variables have been set
[[ -z ${ADMIN_USERNAME} ]] && echo "ADMIN_USERNAME not set" && exit 1
Expand Down Expand Up @@ -125,6 +136,7 @@ pushd ${HORIZONTEST_DIR}/horizon/openstack_dashboard/test/integration_tests/
# set variables in horizon.conf
crudini --set horizon.conf dashboard dashboard_url ${DASHBOARD_URL}/dashboard/
crudini --set horizon.conf dashboard auth_url ${AUTH_URL}
crudini --set horizon.conf dashboard help_url ${HELP_URL}
crudini --set horizon.conf identity username ${USER_NAME}
crudini --set horizon.conf identity password ${PASSWORD}
crudini --set horizon.conf identity home_project ${PROJECT_NAME}
Expand All @@ -136,6 +148,16 @@ crudini --set horizon.conf launch_instances image_name "${IMAGE_FILE_NAME_WITH_S
crudini --set horizon.conf selenium explicit_wait ${SELENIUM_EXPLICIT_WAIT}
crudini --set horizon.conf selenium page_timeout ${SELENIUM_PAGE_TIMEOUT}
crudini --set horizon.conf selenium implicit_wait ${SELENIUM_IMPLICIT_WAIT}
crudini --set horizon.conf network subnet_name ${SUBNET_NAME}
crudini --set horizon.conf theme project_name_xpath "${PROJECT_NAME_XPATH}"
crudini --set horizon.conf theme help_sequence "${HELP_SEQUENCE}"
crudini --set horizon.conf theme test_material_theme "${TEST_MATERIAL_THEME}"
crudini --set horizon.conf theme user_name_xpath "${USER_NAME_XPATH}"
crudini --set horizon.conf theme browse_left_panel_main "${BROWSE_LEFT_PANEL_MAIN}"
crudini --set horizon.conf theme browse_left_panel_sec "${BROWSE_LEFT_PANEL_SEC}"
crudini --set horizon.conf theme b_l_p_sec_line_xpath "${BLP_SEC_LINE_XPATH}"
crudini --set horizon.conf theme b_l_p_sec_line_req_btn "${BLP_SEC_LINE_REQ_BTN}"
crudini --set horizon.conf theme b_l_p_sidebar_xpath "${BLP_SIDEBAR_XPATH}"
popd

# run horizon selenium tests
Expand Down

0 comments on commit fc8caa8

Please sign in to comment.