Skip to content

Commit

Permalink
Test Automation ODS-2173 Verify user can create a workbench using Int…
Browse files Browse the repository at this point in the history
…el AiKit image (red-hat-data-services#1107)

Resolves:
[RHOAIENG-1176](https://issues.redhat.com/browse/RHOAIENG-1176)

CI: rhods-ci-pr-test/2322/ :white_check_mark:
  • Loading branch information
asanzgom authored Jan 16, 2024
2 parents 4c6f667 + c98f691 commit 38250a0
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 7 deletions.
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}"
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


*** 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


*** Test Cases ***
Verify User Can Create A Workbench Using Intel AiKit Image
[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}
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

0 comments on commit 38250a0

Please sign in to comment.