diff --git a/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDashboard.robot b/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDashboard.robot index ed122f7c6..9bed0b525 100644 --- a/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDashboard.robot +++ b/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDashboard.robot @@ -103,7 +103,6 @@ Wait For RHODS Dashboard To Load IF "${expected_page}" == "${NONE}" Wait Until Page Contains Element //div[@data-testid="home-page"] timeout=${timeout} ELSE - Menu.Navigate To Page ${expected_page} Wait Until Keyword Succeeds 3x 5s ... Wait For Dashboard Page Title ${expected_page} timeout=${timeout} END diff --git a/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/Projects.resource b/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/Projects.resource index 53f7cb3bb..f6e1e001a 100644 --- a/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/Projects.resource +++ b/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/Projects.resource @@ -17,7 +17,7 @@ ${PROJECT_CREATE_BTN_XP}= xpath=//button[text()="Create data science project ${ACTIONS_BTN_XP}= xpath=//div/button[@aria-label="Actions"] ${DELETE_ACTION_BTN_XP}= xpath=//div/ul/li/button[text()="Delete project"] ${EDIT_ACTION_BTN_XP}= xpath=//div/ul/li/button[text()="Edit project"] -${SPAWNER_LINK}= //*[@data-testid="launch-standalone-notebook-server"] +${SPAWNER_LINK}= xpath=//a[@data-testid="launch-standalone-notebook-server"] ${PROJECT_SEARCH_BAR}= [data-testid="projects-table-toolbar"] ${PROJECT_FILTER_TYPE}= ${PROJECT_SEARCH_BAR} [data-testid="filter-toolbar-dropdown"] ${PROJECT_SEARCH_INPUT}= ${PROJECT_SEARCH_BAR} [data-testid="filter-toolbar-text-field"] input @@ -25,6 +25,8 @@ ${PROJECT_SEARCH_INPUT}= ${PROJECT_SEARCH_BAR} [data-testid="filter-toolbar-t *** Keywords *** Open Data Science Projects Home Page [Documentation] Open "Data Science Projects" page from the sidebar + Wait Until Page Contains Data Science Projects + Click Link Data Science Projects Wait For RHODS Dashboard To Load wait_for_cards=${FALSE} expected_page=Data Science Projects Maybe Wait For Dashboard Loading Spinner Page diff --git a/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHModelServing.resource b/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHModelServing.resource index 88e3e8565..dd8a8894c 100644 --- a/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHModelServing.resource +++ b/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHModelServing.resource @@ -25,7 +25,7 @@ ${MS_TABLE_STATUS_FAILURE}= /ancestor::tr//td[@data-label="Status"]//span[co ${KSERVE_MODAL_HEADER}= //header[@class="pf-v5-c-modal-box__header"]/h1[.="Deploy model"] ${KSERVE_RUNTIME_DROPDOWN}= //button[@data-testid="serving-runtime-template-selection"] ${LLM_RESOURCES_DIRPATH}= tests/Resources/Files/llm -${DEPLOY_SINGLE_SV_MODEL_BTN}= //button[contains(@data-testid,"single-serving-select-button")] +${DEPLOY_SINGLE_SV_MODEL_BTN}= //button[@data-testid="single-serving-select-button"] ${DEPLOY_SINGLE_MODEL_BTN}= //button[contains(@data-testid,"deploy-button")] ${DEPLOY_MODEL_BTN}= //button[contains(@data-testid,"deploy-button")] ${TOKEN_AUTH_CHECKBOX_XP}= xpath://input[@id="alt-form-checkbox-auth"] @@ -143,14 +143,22 @@ Select Framework Select Existing Data Connection [Documentation] Selects an existing data connection in the "deploy model" modal. [Arguments] ${data_connection_name} ${retries}=1 - FOR ${retry_idx} IN RANGE 0 1+${retries} - Open Name Options Menu - Click Element xpath://li/button[.="${data_connection_name}"] - ${selected}= Run Keyword And Return Status - ... Page Should Contain Element //span[.="Name"]/../../..//button[@aria-label="Options menu"][.="${data_connection_name}"] #robocop: disable - IF ${selected}==${TRUE} - BREAK + + ${is_enabled}= Run Keyword And Return Status + ... Element Should Be Enabled xpath://button[@id="inference-service-data-connection"] + + IF ${is_enabled} + FOR ${retry_idx} IN RANGE 0 1+${retries} + Open Name Options Menu + Click Element xpath://li/button[.="${data_connection_name}"] + ${selected}= Run Keyword And Return Status + ... Page Should Contain Element //span[.="Name"]/../../..//button[@aria-label="Options menu"][.="${data_connection_name}"] #robocop: disable + IF ${selected}==${TRUE} BREAK END + ELSE + Element Should Be Disabled id:inference-service-data-connection + ${text}= Get Text xpath://button[@id="inference-service-data-connection"]/span/div/div + Should Be Equal ${text} ${data_connection_name} END Set Folder Path @@ -210,22 +218,26 @@ Get Model Route Via UI [Documentation] Grabs the serving route (URL) of an already deployed model from the Model Serving page. [Arguments] ${model_name} # TODO: Open model serving home page if needed? - ${route_xpath}= Set Variable //a[.="${model_name}"]${MS_TABLE_ENDPOINT_INPUT} - ${loaded}= Run Keyword And Return Status SeleniumLibrary.Wait Until Page Contains Element ${route_xpath} timeout=15s - IF ${loaded} == ${FALSE} - Log message=Model Route was not loaded in UI (RHOAIENG-1919). Trying refreshing! level=WARN - SeleniumLibrary.Reload Page - SeleniumLibrary.Wait Until Page Contains Element ${route_xpath} timeout=15s - END - ${url}= SeleniumLibrary.Get Element Attribute ${route_xpath} value + # Click on Inference Endpoints link + ${endpoint_link}= Set Variable //a[@data-testid="metrics-link-test-model" and text()="${model_name}"]/ancestor::tr//td//button[@data-testid="internal-external-service-button"] + SeleniumLibrary.Wait Until Page Contains Element ${endpoint_link} + SeleniumLibrary.Click Button ${endpoint_link} + # Get the external URL + ${route_xpath}= Set Variable //span[text()="External (can be accessed from inside or outside the cluster)"]/ancestor::dl//dd/div/div/span[1] + SeleniumLibrary.Wait Until Page Contains Element //div[@data-testid="external-service-popover"] + SeleniumLibrary.Wait Until Page Contains Element ${route_xpath} + # Get the URL + Sleep 2 reason=The element takes a little bit longer than expected rendering the url + ${url}= Get Text ${route_xpath} ${kserve}= Run Keyword And Return Status SeleniumLibrary.Page Should Contain Single-model serving enabled IF ${kserve} ${url}= Catenate SEPARATOR= ${url} /v2/models/${model_name}/infer END RETURN ${url} + Get Model Route for gRPC Via UI - [Arguments] ${model_name} + [Arguments] ${model_name} ${host_url}= Get Model Route Via UI model_name=${model_name} ${host}= Evaluate re.search(r"${GRPC_URL_REGEX}", r"${host_url}").group(1) re RETURN ${host}