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

Test Automation ODS-2173 Verify user can create a workbench using Intel AiKit image #1107

Merged
merged 5 commits into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ Delete Data Science Project From CLI
${project_k8s_name}= Run oc get projects -o json | jq '.items[] | select((.metadata.annotations."openshift.io/display-name" != null) and (.metadata.labels."opendatahub.io/dashboard"=="true") and (.metadata.annotations."openshift.io/display-name"=="${displayed_name}")) | .metadata.name' # robocop: disable
${project_k8s_name}= Replace String ${project_k8s_name} " ${EMPTY}
IF "${project_k8s_name}" == "${EMPTY}"
Log msg=There is probably no DS Projects with Diplay Name equal to ${displayed_name}
Log msg=There are probably no DS Projects with Display Name equal to ${displayed_name}
... level=WARN
ELSE
Oc Delete kind=Project name=${project_k8s_name}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,16 +198,20 @@ Select An Existent PV
Select Workbench Jupyter Image
[Documentation] Selects a Jupyter image in the workbench creation page
[Arguments] ${image_name} ${version}=default
Click Element //a[@href="#notebook-image"]
Wait Until Page Contains Element ${WORKBENCH_IMAGE_MENU_BTN_XP}
Click Button ${WORKBENCH_IMAGE_MENU_BTN_XP}
Wait Until Page Contains Element ${WORKBENCH_IMAGE_ITEM_BTN_XP}\[text()="${image_name}"] timeout=10s
Click Element ${WORKBENCH_IMAGE_ITEM_BTN_XP}\[text()="${image_name}"]
IF "${version}"=="default"
Verify Version Selection Dropdown
ELSE IF "${version}"=="previous"
Select Workbench Image Version ${version}
ELSE
Fail ${version} does not exist, use default/previous

IF "${version}" != "${NONE}"
jgarciao marked this conversation as resolved.
Show resolved Hide resolved
IF "${version}"=="default"
Verify Version Selection Dropdown
ELSE IF "${version}"=="previous"
Select Workbench Image Version ${version}
ELSE
Fail ${version} does not exist, use default/previous
END
END

Verify Version Selection Dropdown
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
*** Settings ***
Documentation Suite to test the spawn of different notebook images
Library SeleniumLibrary
Library OpenShiftLibrary
Resource ../../../Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/Projects.resource
Resource ../../../Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/Workbenches.resource
Resource ../../../Resources/RHOSi.resource
Suite Setup Project Suite Setup
Suite Teardown Project Suite Teardown

Fixed Show fixed Hide fixed

*** Variables ***
${PRJ_TITLE} ODS-CI DS Project Notebook Images
${PRJ_RESOURCE_NAME} notebook-images-ds-project
${PRJ_DESCRIPTION} ${PRJ_TITLE} is a test project for validating notebook images and shared by multiple tests


Fixed Show fixed Hide fixed
*** Test Cases ***
Verify user can create a workbench using Intel AiKit image
Fixed Show fixed Hide fixed
Fixed Show fixed Hide fixed
[Documentation] Verifies that a workbench can be created using Intel AiKit image
[Tags] ODS-2173 Tier2
Set Test Variable ${INTEL_AIKIT_APPNAME} aikit
Set Test Variable ${INTEL_AIKIT_OPERATOR_NAME} Intel® oneAPI AI Analytics Toolkit Operator
Set Test Variable ${IMG_NAME} oneAPI AI Analytics Toolkit
Set Test Variable ${WORKBENCH_TITLE} aikitwb
Set Test Variable ${PV_DESCRIPTION} PV for AiKit workbench
Check And Install Operator in Openshift ${INTEL_AIKIT_OPERATOR_NAME} ${INTEL_AIKIT_APPNAME}

Check warning

Code scanning / Robocop

Keyword name '{{ keyword_name }}' does not follow case convention Warning test

Keyword name 'Check And Install Operator in Openshift' does not follow case convention
Create Tabname Instance For Installed Operator ${INTEL_AIKIT_OPERATOR_NAME}
... AIKitContainer ${APPLICATIONS_NAMESPACE}
Go To RHODS Dashboard
Open Data Science Project Details Page project_title=${PRJ_TITLE}
Create Workbench workbench_title=${WORKBENCH_TITLE} workbench_description=workbench for testing
... prj_title=${PRJ_TITLE} image_name=${IMG_NAME} version=${NONE} deployment_size=Small
... storage=Persistent pv_name=aikitpv pv_existent=${FALSE}
... pv_description=${PV_DESCRIPTION} pv_size=1
... press_cancel=${FALSE} envs=${NONE}
Wait Until Workbench Is Started workbench_title=${WORKBENCH_TITLE}
Open Data Science Projects Home Page
Wait Until Project Is Listed project_title=${PRJ_TITLE}
Launch And Access Workbench From Projects Home Page workbench_title=${WORKBENCH_TITLE}
... project_title=${PRJ_TITLE} username=${TEST_USER_3.USERNAME}
... password=${TEST_USER_3.PASSWORD} auth_type=${TEST_USER_3.AUTH_TYPE}


*** Keywords ***
Project Suite Setup
[Documentation] Suite setup steps for testing DS Projects. It creates some test variables
... and runs RHOSi setup
Set Library Search Order SeleniumLibrary
${to_delete} Create List ${PRJ_TITLE}
Set Suite Variable ${PROJECTS_TO_DELETE} ${to_delete}
RHOSi Setup
Launch Data Science Project Main Page
Create Data Science Project title=${PRJ_TITLE} description=${PRJ_DESCRIPTION}
... resource_name=${PRJ_RESOURCE_NAME}

Project Suite Teardown
[Documentation] Suite teardown steps after testing DS Projects. It Deletes
... all the DS projects created by the tests and run RHOSi teardown
Close All Browsers
Delete Data Science Projects From CLI ocp_projects=${PROJECTS_TO_DELETE}
RHOSi Teardown
Loading