Skip to content

Commit

Permalink
QA Sprint 152 done (#2114)
Browse files Browse the repository at this point in the history
* Updated tests according to Revamp Datasets
- Quick links action menu list
- Download notification pop-up
- Jira: ML-3983

* Updated tests according to Revamp Artifacts, Datasets
- Quick links action menu list
- Preview in Quick links
- Download notification pop-up
- updated getArtifacts func on mock
- Preview modal
- Jira: ML-3983

* Updated tests according to new requirements
- Datasets, Artifacts, Models - delete options, Register, Train model
- Feature store - change capitalization name in breadcrumbs6
- Feature store - update tests after project monitoring become the default project view
- Jira: ML-4506, ML-4990, ML-4667, ML-3984

---------

Co-authored-by: Olena Zhelnytska <olena.zhelnytska@medtronic.com>
  • Loading branch information
EZheln and Olena Zhelnytska authored Dec 14, 2023
1 parent 1f605e9 commit 9234542
Show file tree
Hide file tree
Showing 14 changed files with 2,480 additions and 299 deletions.
60 changes: 46 additions & 14 deletions tests/features/common-tools/common-consts.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,11 @@ module.exports = {
'Usage example:'
]
},
Common_Lists: {
Action_Menu_List: ['Download', 'Copy URI', 'View YAML', 'Add a tag', 'Delete']
},
Datasets_Info_Pane: {
Tab_List: ['Overview', 'Preview', 'Metadata', 'Analysis'],
Action_Menu_List: ['Download', 'Copy URI', 'View YAML', 'Add a tag'],
Overview_General_Headers: [
'Hash:',
'Key:',
Expand All @@ -100,6 +102,17 @@ module.exports = {
'UID:',
'Updated:',
'Labels:'
],
Overview_Producer_Headers: [
'Name:',
'Kind:',
'URI:',
'Owner:',
'Workflow:'
],
Overview_Sources_Headers: [
'Name:',
'Path:'
]
},
ML_Functions_Tab: {
Expand All @@ -123,16 +136,26 @@ module.exports = {
Files_Info_Pane: {
Tab_List: ['Overview', 'Preview'],
Overview_General_Headers: [
'Hash',
'Key',
'Version tag',
'Iter',
'Size',
'Path',
'URI',
'UID',
'Updated',
'Labels'
'Hash:',
'Key:',
'Version tag:',
'Iter:',
'Size:',
'Path:',
'URI:',
'UID:',
'Updated:',
'Labels:'
],
Overview_Producer_Headers: [
'Name:',
'Kind:',
'URI:',
'Owner:'
],
Overview_Sources_Headers: [
'Name:',
'Path:'
]
},
Models_Info_Pane: {
Expand Down Expand Up @@ -215,7 +238,16 @@ module.exports = {
Form_Text:
/This dialog enable users to register an artifact( as a dataset)? in Iguazio database\. Once (a artifact|the dataset) is registered it can be consumed by jobs and workflows\./,
Form_Subtext:
'All you need to do is enter the name of the artifact and the URL (e.g. s3://my-bucket/path).'
'All you need to do is enter the name of the artifact and the URL (e.g. s3://my-bucket/path).',
Combobox_Options: [
'V3IO',
'S3',
'HTTP',
'HTTPS',
'Azure storage',
'Google storage',
'Databricks filesystem'
]
},
Register_Dataset: {
Type_Options: ['General', 'Chart', 'Plot', 'Table'],
Expand Down Expand Up @@ -308,7 +340,8 @@ module.exports = {
MLRun_Store_Path_Hint: 'Field must be in "models/my-project/my-model:my-tag" or "models/my-project/my-model@my-uid" format',
Jobs_MLRun_Store_Path_Hint:
'Field must be in "artifacts/my-project/my-artifact:my-tag" or "artifacts/my-project/my-artifact@my-uid" format',
V3IO_Path_Hint: 'Field must be in "container-name/file" format',
V3IO_Path_Hint: 'Invalid URL. Field must be in "container-name/file" format',
V3IO_Path_Hint_Feature_Store: 'Field must be in "container-name/file" format',
S3_Path_Hint: 'Field must be in "bucket/path" format',
Azure_Storage_Path_Hint: 'Field must be in "container/path" format',
Timestamp_Column: 'The field name for filtering the source data.',
Expand Down Expand Up @@ -440,7 +473,6 @@ module.exports = {
Hour_Intervals_Dropdown_Options: ['Every 1', 'Every 2', 'Every 3', 'Every 4', 'Every 6', 'Every 12'],
Partition_Granularity_Options: ['Second', 'Minute', 'Hour', 'Day', 'Month', 'Year'],
Pods_Priority: ['Low', 'Medium', 'High'],
//Pods_Toleration: ['Allow', 'Constrain', 'Prevent'], - Pods_Toleration is deleted from implementation
Schedule_Variants: ['Minute', 'Hourly', 'Daily', 'Weekly', 'Monthly'],
Schedule_Minutes_Variants: ['10', '15', '20', '30'],
Schedule_Hours_Variants: ['1', '2', '3', '4', '6', '12']
Expand Down
7 changes: 5 additions & 2 deletions tests/features/common/page-objects.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ module.exports = {
Analysis_Info_Pane: infoPane['analysisInfoPane'],
Artifact_Preview_Popup: interactivePopup['artifactPreviewPopup'],
Artifacts_Info_Pane: infoPane['artifactsInfoPane'],
Artifacts_FilterBy_Popup: interactivePopup['artifactsFilterByPopup'],
Batch_Run: jobsAndWorkflows['BatchRun'],
Batch_Run_Edit: sidePanel['batchRunEdit'],
Batch_Re_Run: sidePanel['batchReRun'],
Expand All @@ -53,6 +54,7 @@ module.exports = {
Demo_Project: project['demoProject'],
Deploy_Model_Popup: interactivePopup['deployModelPopup'],
Discard_Changes_Popup: interactivePopup['discardChangesPopup'],
Downloads_Popup: interactivePopup['downloadsPopUp'],
Feature_Set_Schedule_Popup: interactivePopup['featureSetSchedulePopup'],
Feature_Sets_Info_Pane: infoPane['featureSetsInfoPane'],
Feature_Store_Feature_Sets_Tab: featureStore['featureSetsTab'],
Expand All @@ -74,6 +76,7 @@ module.exports = {
New_Function: sidePanel['newFunction'],
New_JobTemplate_Edit: sidePanel['newJobTemplateEdit'],
Preview_Info_Pane: infoPane['previewInfoPane'],
Preview_Popup: interactivePopup['previewPopup'],
Project: project['project'],
Project_Members_Popup: interactivePopup['projectMembersPopup'],
Project_Settings_General_Tab: projectsSettings['generalTab'],
Expand All @@ -89,10 +92,10 @@ module.exports = {
Results_Info_Pane: infoPane['resultsInfoPane'],
Schedule_Monitor_Tab: jobsAndWorkflows['ScheduleMonitorTab'],
Statistics_Info_Pane: infoPane['statisticsInfoPane'],
Train_Model: interactivePopup['trainModel'],
Transformations_Info_Pane: infoPane['transformationsInfoPane'],
View_YAML: interactivePopup['viewYamlPopup'],
Workflows_Monitor_Tab: jobsAndWorkflows['WorkflowsMonitorTab'],
Workflows_Monitor_Tab_Info_Pane: infoPane['workflowsMonitorTabInfoPane'],
commonPagesHeader: commonPagesHeader,
Artifacts_FilterBy_Popup: interactivePopup['artifactsFilterByPopup']
commonPagesHeader: commonPagesHeader
}
7 changes: 4 additions & 3 deletions tests/features/common/page-objects/feature-store.po.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const featureSetsTable = {
root: '.table-row',
fields: {
name: '.table-body__cell:nth-of-type(1) a div.link',
expand_name: '[data-testid="table_row_child_1_3"] .table-body__cell:nth-of-type(1) a div.link',
name_expand_btn: '.table-body__cell:nth-of-type(1) a .name-wrapper .item-name',
expand_btn: '.table-body__cell:nth-of-type(1) svg.expand-arrow',
tag: '.table-body__cell:nth-of-type(1) .item-tag',
description: '.table-body__cell:nth-of-type(2) > .data-ellipsis',
Expand Down Expand Up @@ -181,6 +181,7 @@ const featureVectorTable = {
root: '.table-row',
fields: {
name: '.table-body__cell:nth-of-type(1) a div.link',
name_expand_btn: '.table-body__cell:nth-of-type(1) a .name-wrapper .item-name',
expand_btn: '.table-body__cell:nth-of-type(1) svg.expand-arrow',
tag: '.table-body__cell:nth-of-type(1) .item-tag',
description: '.table-body__cell:nth-of-type(2) .data-ellipsis',
Expand Down Expand Up @@ -298,7 +299,7 @@ const datasetsTable = {
owner: '.table-body__cell:nth-of-type(4) .data-ellipsis',
uploaded: '.table-body__cell:nth-of-type(5) .data-ellipsis',
size: '.table-body__cell:nth-of-type(6) .data-ellipsis',
artifact_preview_btn: '.table-body__cell:nth-of-type(7) #quick-link-dataset-preview',
artifact_preview_btn: '.table-body__cell:nth-of-type(7) [data-testid="quick-link-dataset-preview-tooltip-wrapper"]',
download_btn: '.table-body__cell:nth-of-type(8) .download-container',
copy_uri: '.table-body__cell:nth-of-type(9) > button',
action_menu: {
Expand All @@ -318,7 +319,7 @@ const datasetsTable = {

// Common components
const featureStoreTabSelector = commonTable(tabSelector)
const tableRefreshButton = By.css('.content__action-bar-wrapper #refresh')
const tableRefreshButton = By.css('.content__action-bar-wrapper [data-testid="refresh"]')
const tableFilterByButton = By.css('.content .content__action-bar-wrapper .action-bar__filters .filters-button button')
const pageHeaderButton = By.css('.content__header .page-actions-container button')
const commonNameFilterInput = inputGroup(
Expand Down
9 changes: 4 additions & 5 deletions tests/features/common/page-objects/files.po.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,13 @@ import { By } from 'selenium-webdriver'
import inputGroup from '../components/input-group.component'
import { generateInputGroup, generateDropdownGroup } from '../../common-tools/common-tools'
import dropdownComponent from '../components/dropdown.component'
//import checkboxComponent from '../components/checkbox.component'
import commonTable from '../components/table.component'
import actionMenu from '../components/action-menu.component'

const actionMenuStructure = {
root: '.actions-menu__container',
menuElements: {
open_button: 'button',
open_button: '[data-testid="actions-menu"] button',
options: '.actions-menu__body .actions-menu__option'
}
}
Expand Down Expand Up @@ -71,7 +70,7 @@ const filesTable = {
owner: '.table-body__cell:nth-of-type(5) .data-ellipsis',
updated: '.table-body__cell:nth-of-type(6) .data-ellipsis',
size: '.table-body__cell:nth-of-type(7) .data-ellipsis',
preview: '.table-body__cell:nth-of-type(8) button .data-ellipsis svg',
preview: '.table-body__cell:nth-of-type(8) [data-testid="quick-link-artifact-preview"]',
download: '.table-body__cell:nth-of-type(9) button .data-ellipsis svg',
uri: '.table-body__cell:nth-of-type(10) button .data-ellipsis svg',
action_menu: {
Expand All @@ -92,10 +91,10 @@ module.exports = {
)
),
Table_Refresh_Button: By.css(
'.content .content__action-bar-wrapper .action-bar__actions #refresh'
'.content .content__action-bar-wrapper [data-testid="refresh"]'
),
Files_Table: commonTable(filesTable),
Register_File_Button: By.css('.page-actions-container .btn_register'),
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'
)
Expand Down
37 changes: 35 additions & 2 deletions tests/features/common/page-objects/info-pane.po.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,34 @@ const infoPaneOverviewHeaders = {
}
}

const infoPaneOverviewProducerHeaders = {
root: '.table__item .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 .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'
}
}
}
}
const artifactOverviewTable = {
root: '.table__item .item-info__details:nth-of-type(1)',
header: {},
Expand Down Expand Up @@ -532,6 +560,9 @@ module.exports = {
Cross_Close_Button: crossCloseButton,
Info_Pane_Tab_Selector: commonInfoPaneTabSelector,
Overview_General_Headers: commonTable(infoPaneOverviewHeaders),
Overview_Producer_Headers: commonTable(infoPaneOverviewProducerHeaders),
Overview_Sources_Headers: commonTable(infoPaneOverviewSourcesHeaders),
Train_Button: By.css('[data-testid="detailsPanel"] .item-header__buttons button'),
Overview_Hash_Header: labelComponent(
generateLabelGroup(
'.item-info__details:nth-of-type(1) .details-item:nth-of-type(1) .details-item__header',
Expand Down Expand Up @@ -657,6 +688,8 @@ module.exports = {
Tabel_View_Button: tabelViewButton,
Info_Pane_Tab_Selector: commonInfoPaneTabSelector,
Overview_General_Headers: commonTable(infoPaneOverviewHeaders),
Overview_Producer_Headers: commonTable(infoPaneOverviewProducerHeaders),
Overview_Sources_Headers: commonTable(infoPaneOverviewSourcesHeaders),
Overview_Hash_Header: labelComponent(
generateLabelGroup(
'.item-info__details:nth-of-type(1) .details-item:nth-of-type(1) .details-item__header',
Expand All @@ -671,8 +704,8 @@ module.exports = {
true
)
),
Expand_Sources: By.css('.details-item .info-sources'),
Info_Sources_Table: commonTable(filesInfoSourcesTable),
// Expand_Sources: By.css('.details-item .info-sources'),
// Info_Sources_Table: commonTable(filesInfoSourcesTable),
Overview_Table: commonTable(artifactOverviewTable),
Edit_btn_table_view: commonEditBtnTableView,
Edit_btn_full_view: commonEditBtnFullView,
Expand Down
25 changes: 23 additions & 2 deletions tests/features/common/page-objects/interactive-popup.po.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,10 @@ module.exports = {
Confirm_Button: By.css('.confirm-dialog__btn-container button:not(.pop-up-dialog__btn_cancel)'),
Delete_Button: commonDeleteButton
},
trainModel:{
Title: By.css('.modal .modal__header-title'),
Cross_Cancel_Button: By.css('.modal .modal__header-button')
},
registerDataset: {
Title: commonPopupTitle,
Form_Text: commonFormText,
Expand Down Expand Up @@ -298,7 +302,12 @@ module.exports = {
Cross_Cancel_Button: commonCloseButton,
New_File_Info: By.css('.form-text'),
New_File_Name_Input: inputGroup(commonNameInput),
New_File_Target_Path_Input: inputGroup(commonTargetPathInput),
Target_Path: {
Path_Scheme_Combobox: comboBox(
'.form .form-row:nth-of-type(4) .form-field__wrapper',
true
)
},
New_File_Description_Input: textAreaGroup(commonDescriptionTextArea),
New_File_Type_Dropdown: dropdownComponent(
generateDropdownGroup(
Expand Down Expand Up @@ -405,6 +414,12 @@ module.exports = {
Cross_Cancel_Button: commonCrossCancelButton,
YAML_Modal_Container: By.css('.pop-up-dialog .yaml-modal-container pre')
},
previewPopup:{
Title: By.css('.pop-up-dialog .pop-up-dialog__header'),
Cross_Cancel_Button: commonCrossCancelButton,
Preview_Modal_Container: By.css('.pop-up-dialog .item-artifacts__modal-preview'),
Download_Button: By.css('.pop-up-dialog .preview-item .preview-body__download')
},
changeProjectOwnerPopup: {
Cross_Cancel_Button: commonCrossCancelButton,
Title: commonTitle,
Expand Down Expand Up @@ -548,7 +563,8 @@ module.exports = {
},
artifactPreviewPopup: {
Cross_Cancel_Button: commonCrossCancelButton,
Preview_Header: commonTable(artifactsPreviewHeader)
Preview_Header: commonTable(artifactsPreviewHeader),
Download_Button: By.css('.pop-up-dialog .preview-body .preview-item .preview-body__download')
},
removeMemberPopup: {
Title: By.css('.delete-member__pop-up .pop-up-dialog__header-text'),
Expand All @@ -574,5 +590,10 @@ module.exports = {
Checkbox_Label: By.css('#overlay_container .form-field-checkbox label'),
Clear_Button: By.css('#overlay_container .btn-tertiary'),
Apply_Button: By.css('#overlay_container .btn-secondary')
},
downloadsPopUp: {
Download_Pop_Up: By.css('[data-testid="download-container"]'),
Download_Pop_Up_Cross_Cancel_Button: By.css('[data-testid="download-container"] .notification_body_close_icon'),
Header_Download_Pop_Up: By.css('[data-testid="download-container"] .download-container__header')
}
}
10 changes: 5 additions & 5 deletions tests/features/common/page-objects/models.po.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import {
generateLabelGroup
} from '../../common-tools/common-tools'
import dropdownComponent from '../components/dropdown.component'
// import checkboxComponent from '../components/checkbox.component'
import commonTable from '../components/table.component'
import actionMenu from '../components/action-menu.component'
import labelComponent from '../components/label.component'
Expand Down Expand Up @@ -166,7 +165,7 @@ const realTimePipelinesTable = {
body: {
root: '.table-body',
row: {
root: '.table-body__row',
root: '.table-row',
fields: {
expand_btn: '.table-body__cell:nth-of-type(1) .expand-arrow',
status: {
Expand Down Expand Up @@ -233,7 +232,7 @@ const realTimePipelinesGraph = {
}

// Common components
const tableRefreshButton = By.css('.content .action-bar .tooltip-wrapper #refresh')
const tableRefreshButton = By.css('.content__action-bar-wrapper .action-bar [data-testid="refresh"]')

module.exports = {
modelsTab: {
Expand All @@ -244,10 +243,11 @@ module.exports = {
true
)
),
Table_Refresh_Button: tableRefreshButton,
Table_Refresh_Button: By.css('.content__action-bar-wrapper .action-bar__actions [data-testid="refresh"]'),
Models_Table: commonTable(modelsTable),
Overlay: By.css('#overlay_container .chip-block-hidden_visible'),
Register_Model_Button: By.css('.page-actions-container .btn_register'),
Register_Model_Button: By.css('.content__action-bar-wrapper .action-bar__actions .btn-secondary'),
Train_Model_Button: By.css('.content__action-bar-wrapper .action-bar__actions .btn-primary'),
Table_FilterBy_Button: By.css(
'.content .content__action-bar-wrapper .action-bar__filters .filters-button button'
)
Expand Down
Loading

0 comments on commit 9234542

Please sign in to comment.