Skip to content

Commit

Permalink
Updated tests according to the requirements:
Browse files Browse the repository at this point in the history
- updated test with redirection of source path
- updated tests with changed redirection of broken links
- updated tests with checking the error message tooltip
- updated tests with revamp of the Monitoring section
- updated test with checking the scheduled jobs deletion
- added test with checking the Abort action on the Monitor Jobs tab
- added test to check filtering by the status  of workflows on the Workflows Monitor tab
- updated tests with checking status tooltips in the Monitoring section
- added test with check components on Alerts counter box
  • Loading branch information
EZheln committed Dec 26, 2024
1 parent bec6534 commit 2b1e4f2
Show file tree
Hide file tree
Showing 16 changed files with 570 additions and 147 deletions.
5 changes: 4 additions & 1 deletion tests/features/MLFunction.feature
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ Feature: ML Functions
Then verify "Overview_Headers" on "ML_Function_Info_Pane" wizard should contains "ML_Function_Info_Pane"."Overview_Headers"
Then click on "Cross_Close_Button" element on "ML_Function_Info_Pane" wizard
When click on cell with row index 1 in "name" column in "Functions_Table" table on "ML_Functions" wizard
And wait load page
Then verify "Header" element visibility on "ML_Function_Info_Pane" wizard
Then verify "Updated" element visibility on "ML_Function_Info_Pane" wizard
Then verify "Cross_Close_Button" element visibility on "ML_Function_Info_Pane" wizard
Expand Down Expand Up @@ -645,6 +646,8 @@ Feature: ML Functions
And set tear-down property "function" created in "default" project with "new-aqa-function-00" value
Then click on "Save_Button" element on "New_Function" wizard
And wait load page
When click on cell with row index 1 in "name" column in "Functions_Table" table on "ML_Functions" wizard
And wait load page
Then "Header" element on "ML_Function_Info_Pane" should contains "new-aqa-function-00" value
Then check "new-aqa-function-00" value in "name" column in "Overview_Table" table on "ML_Function_Info_Pane" wizard
Then check "job" value in "kind" column in "Overview_Table" table on "ML_Function_Info_Pane" wizard
Expand Down Expand Up @@ -1079,7 +1082,7 @@ Feature: ML Functions
Then verify "Cross_Cancel_Button" element visibility on "View_YAML" wizard
Then verify "YAML_Modal_Container" element visibility on "View_YAML" wizard
Then click on "Cross_Cancel_Button" element on "View_YAML" wizard
Then click on cell with row index 8 in "expand_btn" column in "Functions_Table" table on "ML_Functions" wizard
Then click on cell with row index 9 in "expand_btn" column in "Functions_Table" table on "ML_Functions" wizard
And wait load page
Then select "View YAML" option in action menu on "ML_Functions" wizard in "Functions_Table" table at row with "Nov 23, 2021, 11:31:51 AM" value in "name" column
Then verify if "View_YAML" popup dialog appears
Expand Down
59 changes: 58 additions & 1 deletion tests/features/artifacts.feature
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,63 @@ Feature: Artifacts Page
Then verify "Overview" tab is active in "Info_Pane_Tab_Selector" on "Files_Info_Pane" wizard
Then verify "Overview_Sources_Headers" on "Files_Info_Pane" wizard should contains "Files_Info_Pane"."Overview_Sources_Headers"
Then verify "Overview_Sources_Headers" element visibility on "Files_Info_Pane" wizard
When click on cell with value "raw-data" in "name" column in "Files_Table" table on "Files" wizard
And wait load page
Then click on "Source_Path" element on "Files_Info_Pane" wizard
And wait load page
Then verify if "Modal_Transition_Popup" popup dialog appears
Then verify "Title" element visibility on "Modal_Transition_Popup" wizard
Then "Title" element on "Modal_Transition_Popup" should contains "survival-curves_km-timelines" value
Then verify "Data_Status" element visibility on "Modal_Transition_Popup" wizard
Then "Data_Status" element on "Modal_Transition_Popup" should contains "Aug 29, 2021, 10:54:15 PM" value
Then verify "Refresh_Button" element visibility on "Modal_Transition_Popup" wizard
Then click on "Refresh_Button" element on "Modal_Transition_Popup" wizard
And wait load page
Then verify "Refresh_Button" element visibility on "Modal_Transition_Popup" wizard
Then verify "Action_Menu" element visibility on "Modal_Transition_Popup" wizard
Then verify "Action_Menu" dropdown element on "Modal_Transition_Popup" wizard should contains "Common_Lists"."Action_Menu_List_Dataset_Transition_Popup"
Then verify "Cross_Close_Button" element visibility on "Modal_Transition_Popup" wizard
Then click on "Cross_Close_Button" element on "Modal_Transition_Popup" wizard
And wait load page
Then click on "Source_Path" element on "Files_Info_Pane" wizard
And wait load page
Then select "Download" option in action menu on "Modal_Transition_Popup" wizard
And wait load page
Then verify "Download_Pop_Up" element visibility on "Downloads_Popup" wizard
And wait load page
Then verify "Download_Pop_Up_Cross_Cancel_Button" element visibility on "Downloads_Popup" wizard
And wait load page
Then verify "Download_Pop_Up_Cross_Cancel_Button" element visibility on "Downloads_Popup" wizard
And wait load page
Then verify "Header_Download_Pop_Up" element visibility on "Downloads_Popup" wizard
Then "Header_Download_Pop_Up" element on "Downloads_Popup" should contains "Downloads" value
Then click on "Download_Pop_Up_Cross_Cancel_Button" element on "Downloads_Popup" wizard
Then select "Copy URI" option in action menu on "Modal_Transition_Popup" wizard
And wait load page
Then verify if "Notification_Popup" popup dialog appears
Then verify "Notification_Pop_Up" element visibility on "Notification_Popup" wizard
Then "Notification_Pop_Up" element on "Notification_Popup" should contains "Copied to clipboard successfully" value
Then verify "Notification_Pop_Up_Cross_Close_Button" element visibility on "Notification_Popup" wizard
Then click on "Notification_Pop_Up_Cross_Close_Button" element on "Notification_Popup" wizard
Then select "View YAML" option in action menu on "Modal_Transition_Popup" wizard
Then verify if "View_YAML" popup dialog appears
Then verify "Cross_Cancel_Button" element visibility on "View_YAML" wizard
Then verify "YAML_Modal_Container" element visibility on "View_YAML" wizard
Then click on "Cross_Cancel_Button" element on "View_YAML" wizard
Then verify "Tab_Selector" on "Modal_Transition_Popup" wizard should contains "Datasets_Info_Pane"."Tab_List"
Then verify "Overview" tab is active in "Tab_Selector" on "Modal_Transition_Popup" wizard
Then select "Preview" tab in "Tab_Selector" on "Modal_Transition_Popup" wizard
Then verify "Preview" tab is active in "Tab_Selector" on "Modal_Transition_Popup" wizard
Then select "Metadata" tab in "Tab_Selector" on "Modal_Transition_Popup" wizard
Then verify "Metadata" tab is active in "Tab_Selector" on "Modal_Transition_Popup" wizard
Then select "Analysis" tab in "Tab_Selector" on "Modal_Transition_Popup" wizard
Then verify "Analysis" tab is active in "Tab_Selector" on "Modal_Transition_Popup" wizard
Then select "Overview" tab in "Tab_Selector" on "Modal_Transition_Popup" wizard
Then verify "Overview" tab is active in "Tab_Selector" on "Modal_Transition_Popup" wizard
Then verify "Overview_General_Headers" on "Modal_Transition_Popup" wizard should contains "Datasets_Info_Pane"."Overview_General_Headers"
Then verify "Overview_Producer_Headers" on "Modal_Transition_Popup" wizard should contains "Datasets_Info_Pane"."Overview_Producer_Headers"
Then verify "Overview_Sources_Headers" element visibility on "Modal_Transition_Popup" wizard
Then verify "Overview_Sources_Headers" on "Modal_Transition_Popup" wizard should contains "Datasets_Info_Pane"."Overview_Sources_Headers"

@MLA
@passive
Expand Down Expand Up @@ -557,7 +614,7 @@ Feature: Artifacts Page
And wait load page
When click on cell with row index 1 in "name" column in "Files_Table" table on "Files" wizard
And wait load page
Then verify redirection from "projects/default/files/INVALID/latest/0/overview" to "projects/default/files/INVALID/latest/0/overview"
Then verify redirection from "projects/default/files/INVALID/latest/0/overview" to "projects/default/files"
And select "tab" with "Datasets" value in breadcrumbs menu
And wait load page
And select "tab" with "Artifacts" value in breadcrumbs menu
Expand Down
17 changes: 13 additions & 4 deletions tests/features/common-tools/common-consts.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ module.exports = {
Common_Lists: {
Action_Menu_List: ['Add a tag', 'Download', 'Copy URI', 'View YAML', 'Delete'],
Action_Menu_List_Expanded: ['Add a tag', 'Download', 'Copy URI', 'View YAML', 'Delete all'],
Action_Menu_List_Dataset_Transition_Popup: ['Download', 'Copy URI', 'View YAML'],
Handler_List: ['train'],
Pods_Priority_List: ['Low','Medium', 'High'],
Ranking_Criteria_List: ['Min','Max']
Expand Down Expand Up @@ -335,7 +336,15 @@ module.exports = {
},
Common_Tooltips:{
FilterBy_Button: 'Filter',
Refresh_Button: 'Refresh'
Refresh_Button: 'Refresh',
In_Process_Jobs: 'Aborting, Pending, Running',
In_Process_Workflows: 'Running',
Failed_Jobs: 'Aborted, Error',
Failed_Worflows: 'Error, Failed',
Succeeded: 'Completed',
Error_Content: 'Error. Columns must be same length as key',
Error_Content_Workflow:
'Error. 2021-08-29 20:01:36.582972: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library \'libcudart.so.11.0\'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/lib:/usr/local/lib: 2021-08-29 20:01:36.583019: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine. 2021-08-29 20:01:46.470042: I tensorflow/compiler/jit/xla_cpu_device.cc:41] Not creating XLA devices, tf_xla_enable_xla_devices not set 2021-08-29 20:01:46.470263: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library \'libcuda.so.1\'; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/lib:/usr/local/lib: 2021-08-29 20:01:46.470283: W tensorflow/stream_executor/cuda/cuda_driver.cc:326] failed call to cuInit: UNKNOWN ERROR (303) 2021-08-29 20:01:46.470306: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (train-1193bacd-worker-0): /proc/driver/nvidia/version does not exist 2021-08-29 20:01:46.518782: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 FMA To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags. 2021-08-29 20:01:46.518927: I tensorflow/compiler/jit/xla_gpu_device.cc:99] Not creating XLA devices, tf_xla_enable_xla_devices not set Some callbacks may not have access to the averaged metrics, see https://github.com/horovod/horovod/issues/2440 Traceback (most recent call last): File "/User/demos/image-classification-with-distributed-training/src-tfv2/horovod-training.py", line 116, in <module> hvd.callbacks.LearningRateWarmupCallback(warmup_epochs=5, verbose=1), TypeError: __init__() missing 1 required positional argument: \'initial_lr\''
},
Input_Hint: {
Artifact_Names_Unique: 'Artifact names in the same project must be unique',
Expand Down Expand Up @@ -468,7 +477,7 @@ module.exports = {
Messages: {
How_To_Create:
'See how to create a serving function in https://docs.mlrun.org/en/stable/serving/built-in-model-serving.html and https://docs.mlrun.org/en/stable/tutorials/03-model-serving.html',
Metrics_Empty_Select_Message: 'Choose metrics to view endpoint\’s data'
Metrics_Empty_Select_Message: 'Choose metrics to view endpoint’s data'
},
Jobs_Monitoring: {
Tab_List: ['Jobs', 'Workflows', 'Scheduled']
Expand Down Expand Up @@ -527,7 +536,7 @@ module.exports = {
Project_Already_Exists: /A project named "[^"]+[$"] already exists/,
Projects_Limit_Reached:
'The system already has the maximum number of projects. An existing project must be deleted before you can create another.',
MLRunAccessDeniedError: 'MLRunAccessDeniedError(\'Not allowed to create\/update internal secrets (key starts with mlrun\.)\')',
MLRunAccessDeniedError: 'MLRunAccessDeniedError(\'Not allowed to create/update internal secrets (key starts with mlrun.)\')',
Must_Select_One: 'Must select at least one',
Must_Select_One_Partition: 'Must select at least one partitioning option',
Already_Scheduled: 'This job is already scheduled',
Expand All @@ -539,7 +548,7 @@ module.exports = {
Jobs_Status_Filter_Options: ['All', 'Aborted', 'Aborting', 'Completed', 'Error', 'Running', 'Pending'],
Workflows_Status_Filter_Options: ['All', 'Error', 'Failed', 'Running', 'Completed'],
Jobs_Type_Filter_Options: ['All', 'Local', 'Dask', 'Databricks', 'Handler', 'Job', 'Horovod', 'Spark'],
Scheduled_Type_Filter_Options: ['All', 'Jobs', 'Workflows'],
Scheduled_Type_Filter_Options: ['All', 'Job', 'Workflow', 'Nuclio', 'Application', 'Serving', 'Spark', 'Horovod', 'Dask', 'Databricks', 'Local', 'Handler'],
Group_By_Filter_Options: ['None', 'Name'],
Start_Time_Filter_Options: [
'Any time',
Expand Down
1 change: 1 addition & 0 deletions tests/features/common/page-objects.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ module.exports = {
Model_Endpoints: models['modelEndpoints'],
Models: models['modelsTab'],
Models_Info_Pane: infoPane['modelsInfoPane'],
Modal_Transition_Popup: interactivePopup['modalTransitionPopup'],
Modal_Wizard_Form: interactivePopup['modalWizardForm'],
New_Feature_Set: sidePanel['newFeatureSet'],
New_Function: sidePanel['newFunction'],
Expand Down
4 changes: 1 addition & 3 deletions tests/features/common/page-objects/files.po.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ module.exports = {
),
Files_Table: commonTable(filesTable),
Register_File_Button: By.css('.content__action-bar-wrapper .action-bar__actions .action-button'),
Table_FilterBy_Button: By.css(
'.content .content__action-bar-wrapper .action-bar__filters .filters-button button'
)
Table_FilterBy_Button: By.css('[data-testid="filter-menu-btn"]')
}
}
7 changes: 6 additions & 1 deletion tests/features/common/page-objects/info-pane.po.js
Original file line number Diff line number Diff line change
Expand Up @@ -681,9 +681,11 @@ module.exports = {
Overview_Table: commonTable(functionsOverviewTable)
},
jobsMonitorTabInfoPane: {
Arrow_Back: By.css('a.item-header__back-btn'),
Arrow_Back: By.css('a.link-back__icon'),
Header: header,
Updated: updated,
State_Icon: By.css('.item-header .item-header__status .state'),
Error_Content: By.css('.item-header .item-header__status .error-container'),
Action_Menu: commonActionMenu,
Cross_Close_Button: crossCloseButton,
Info_Pane_Tab_Selector: commonInfoPaneTabSelector,
Expand All @@ -699,6 +701,8 @@ module.exports = {
Arrow_Back: commonArrowBack,
Header: By.css('.workflow-container .link-back__title .data-ellipsis'),
Updated: updated,
State_Icon: By.css('.item-header .item-header__status .state'),
Error_Content: By.css('.item-header .item-header__status .error-container'),
Action_Menu: commonActionMenu,
Cross_Close_Button: crossCloseButton,
Info_Pane_Tab_Selector: commonInfoPaneTabSelector,
Expand Down Expand Up @@ -739,6 +743,7 @@ module.exports = {
Overview_General_Headers: commonTable(infoPaneOverviewHeaders),
Overview_Producer_Headers: commonTable(infoPaneOverviewProducerHeaders),
Overview_Sources_Headers: commonTable(infoPaneOverviewSourcesHeaders),
Source_Path: By.css('[data-testid="sources"] .info-sources__table-value .link'),
Overview_Hash_Header: labelComponent(
generateLabelGroup(
'.item-info__details:nth-of-type(1) .details-item:nth-of-type(1) .details-item__header',
Expand Down
88 changes: 78 additions & 10 deletions tests/features/common/page-objects/interactive-popup.po.js
Original file line number Diff line number Diff line change
Expand Up @@ -639,15 +639,6 @@ const commonFormSubtext = By.css('.form-text div p')
const commonScheduleButton = By.css('.modal__content [data-testid="schedule-btn"]')
const commonRunSaveButton = By.css('.modal__content [data-testid="run-btn"]')

const commonLabelFilterInput = inputGroup(
generateInputGroup(
'[data-testid="labels-form-field-input"]',
true,
false,
'.form-field__warning svg'
)
)

const commonProjectFilterInput = inputGroup(
generateInputGroup('[data-testid="project-form-field-input"]', true, false, true)
)
Expand All @@ -660,6 +651,72 @@ const commonTableTreeFilterDropdown = dropdownComponent(
)
)

const actionMenuStructureTransitionPopup = {
root: '.table__item-popup .item-header__buttons .actions-menu__container',
menuElements: {
open_button: 'button',
options: '.actions-menu__body .actions-menu__option'
}
}

const infoPaneTabSelector = {
root: '.table__item-popup .tabs-slider__tabs',
header: {},
body: {
row: {
root: '.tabs-slider__tab',
fields: {
key: '',
hintButton: '.tip-container'
}
}
}
}

const infoPaneOverviewHeaders = {
root: '.table__item-popup .item-info__details-wrapper:nth-of-type(1)',
header: {},
body: {
row: {
root: 'li:not(li.details-item_hidden)',
fields: {
key: '.details-item__header',
link: '.details-item__data .link',
value: '.details-item__data'
}
}
}
}

const infoPaneOverviewProducerHeaders = {
root: '.table__item-popup .item-info__details-wrapper:nth-of-type(2)',
header: {},
body: {
row: {
root: '.item-info__details',
fields: {
key: '.details-item__header',
link: '.details-item__data .link',
value: '.details-item__data'
}
}
}
}

const infoPaneOverviewSourcesHeaders = {
root: '.table__item-popup .item-info__details-wrapper:nth-of-type(2)',
header: {},
body: {
row: {
root: '.info-sources',
fields: {
key: '.info-sources__table-key',
value: '.info-sources__table-value'
}
}
}
}

module.exports = {
createNewProject: {
Title: commonTitle,
Expand Down Expand Up @@ -743,6 +800,17 @@ module.exports = {
Metrics_Apply_Button: By.css('[data-testid="metrics-selector-buttons"] .btn-secondary'),
Metrics_Clear_Button: By.css('[data-testid="metrics-selector-buttons"] .btn-tertiary')
},
modalTransitionPopup: {
Title: By.css('.table__item-popup .item-header__title'),
Data_Status: By.css('.table__item-popup .item-header__status-row .updated'),
Refresh_Button: By.css('.table__item-popup .item-header__buttons [data-testid="refresh"]'),
Action_Menu: actionMenu(actionMenuStructureTransitionPopup),
Cross_Close_Button: By.css('.table__item-popup .item-header__buttons [data-testid="details-close-btn"]'),
Tab_Selector: commonTable(infoPaneTabSelector),
Overview_General_Headers: commonTable(infoPaneOverviewHeaders),
Overview_Producer_Headers: commonTable(infoPaneOverviewProducerHeaders),
Overview_Sources_Headers: commonTable(infoPaneOverviewSourcesHeaders),
},
modalWizardForm: {
Title: By.css('.modal .modal__header-title'),
Cross_Close_Button: By.css('.modal .modal__header-button'),
Expand Down Expand Up @@ -825,7 +893,7 @@ module.exports = {
)
),
Run_Details_Labels_Value: By.css(
'.job-wizard__run-details .form-row:nth-of-type(4) .chips-wrapper [id="runDetails.labels[0].value"]'
'div:nth-child(4) > div > div.chips__wrapper > div > div > div:nth-child(1) > div > div > div > input.input-label-value'
),
Close_Label_Button: By.css(
'.job-wizard__run-details .form-row:nth-of-type(4) .chips .chips-wrapper .item-icon-close'
Expand Down
4 changes: 2 additions & 2 deletions tests/features/common/page-objects/jobs-and-workflows.po.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const tabSelector = {
row: {
root: '.content-menu__item',
fields: {
key: 'a'
key: ''
}
}
}
Expand Down Expand Up @@ -246,7 +246,7 @@ const scheduleMonitorTable = {
row: {
root: '.table-row',
fields: {
name: '.table-body__cell:nth-of-type(1) a',
name: '.table-body__cell:nth-of-type(1) > div',
type: {
componentType: labelComponent,
structure: generateLabelGroup(
Expand Down
Loading

0 comments on commit 2b1e4f2

Please sign in to comment.