Skip to content

Commit dd9ed67

Browse files
ilan7empestEZhelnOlena Zhelnytska
authored
Impl [Tests] Sprint 148 (#2041)
* Added test to Jobs And Workflows feature - Check click on default interval on simple scheduler in Advanced section - Jira: ML-4426 * Updated tests on Batch Run feature - Check next to the side step should be enabled in Batch Run - Jira: ML-4633 * Updated test for Jobs And Workflows feature 1. Check redirection to function list from job Overview after deleting ML function - Jira:ML-4335, 4501 2. Check Batch-Run running after edit GPU limit in Resources section - Jira: ML-4429 3. Check "Max Iterations", "Max errors" inputs field availability according to the strategy type in Hyperparameter strategy - Jira: ML-4452 * Updated test for Batch Run wizard 1. Check "Custom" strategy is removed as a Hyperparameter strategy in Batch Run - Jira: ML-4507 2. Check back navigation from Job overview to Jobs Monitor tab and forward to Job overview - Jira: ML-4416 3. Check components in Parameters section on Batch Run wizard with checked Hyper - Jira: ML-4508 4. Check the "handler"/"method" option is not missing in Batch Run - Jira: ML-4446 5. Updated autocomplete without tags MLRun Store path for feature vectors - Batch Run - Data input - Jira: ML-4288, ML-4520 6. Check that version tag has "Click to add" status when it's empty after edited - Jira: ML-4159 7. Check labels validations upon Batch Re-Run - Jira: ML-4251, 4644 * - Updated function delete tags on mock - Added test for changing "Method" after "Hyperparameter" check in Run Details (Jira: ML-4456) * - Updated function delete tags on mock - Added test for changing "Image name" field in Run Details section of Batch Run (Jira: ML-4511, ML-4606) --------- Co-authored-by: EZheln <36635708+EZheln@users.noreply.github.com> Co-authored-by: Olena Zhelnytska <olena.zhelnytska@medtronic.com>
1 parent efb44f4 commit dd9ed67

File tree

13 files changed

+646
-89
lines changed

13 files changed

+646
-89
lines changed

tests/features/common-tools/common-consts.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,9 @@ module.exports = {
199199
Batch_Run: {
200200
Tab_List: ['Functions', 'Hub'],
201201
Data_Inputs_Table_Header: ['Input name', 'Path'],
202-
Parameters_Table_Header: ['Name', 'Type', 'Value']
202+
Parameters_Table_Header: ['Name', 'Type', 'Value'],
203+
Parameters_Table_Header_Hyper: ['Hyper','Name', 'Type', 'Value'],
204+
Image_Name_Text: 'The image must include all the software packages that are required to run the function. For example, for an XGBoost model, ensure that the image includes the correct XGboost package and version'
203205
},
204206
Register_Artifact: {
205207
Type_Options: ['General', 'Chart', 'Plot', 'Table'],
@@ -245,6 +247,9 @@ module.exports = {
245247
Function_Name_Batch_Run_Hint:
246248
'Valid characters: a–z, A–Z, 0–9, –, _, .\nMust begin and end with: a–z, A–Z, 0–9\nLength – max: 63\n' +
247249
'This field is required',
250+
Labels_Warning_Key: 'Valid characters: a–z, A–Z, 0–9, –, _, .\nMust begin and end with: a–z, A–Z, 0–9\nLength – max: 56\n' +
251+
'Key should be unique',
252+
Labels_Warning_Value: 'Valid characters: a–z, A–Z, 0–9, –, _, .\nMust begin and end with: a–z, A–Z, 0–9\nLength – max: 56',
248253
Feature_Set_Name_Hint:
249254
'Valid characters: a–z, A–Z, 0–9, –, _, .\nMust begin and end with: a–z, A–Z, 0–9\nLength – max: 56\n' +
250255
'This field is required',
@@ -410,6 +415,7 @@ module.exports = {
410415
Turning_Strategy_Options: ['List', 'Grid', 'Random'],
411416
Criteria_Dropdown_Options: ['Max', 'Min'],
412417
Volume_Mount_Options: ['Auto', 'Manual', 'None'],
418+
Hyperparameter_Strategy_Options: ['List', 'Grid', 'Random'],
413419
Memory_Unit_Options: [
414420
'Bytes',
415421
'KB',
@@ -423,6 +429,8 @@ module.exports = {
423429
],
424430
CPU_Unit_Options: ['cpu', 'millicpu'],
425431
Time_Unit_Options: ['Minute', 'Hourly', 'Daily', 'Weekly', 'Monthly'],
432+
Minute_Intervals_Dropdown_Options: ['Every 10', 'Every 15', 'Every 20', 'Every 30'],
433+
Hour_Intervals_Dropdown_Options: ['Every 1', 'Every 2', 'Every 3', 'Every 4', 'Every 6', 'Every 12'],
426434
Partition_Granularity_Options: ['Second', 'Minute', 'Hour', 'Day', 'Month', 'Year'],
427435
Pods_Priority: ['Low', 'Medium', 'High'],
428436
//Pods_Toleration: ['Allow', 'Constrain', 'Prevent'], - Pods_Toleration is deleted from implementation

tests/features/common/actions/input-group.action.js

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,29 @@ async function getInputValue(driver, inputGroup) {
5858
return inputField.getAttribute('value')
5959
}
6060

61+
async function getInputValueWithoutInputgroup(driver, input) {
62+
const inputField = await driver.findElement(input)
63+
return inputField.getAttribute('value')
64+
}
65+
6166
async function typeValue(driver, inputGroup, value) {
6267
const inputField = await driver.findElement(inputGroup.inputField)
6368
await clearManually(inputField)
6469
return inputField.sendKeys(value)
6570
}
6671

72+
async function typeValueWithoutInputgroup(driver, input, value) {
73+
const inputField = await driver.findElement(input)
74+
await clearManually(inputField)
75+
return inputField.sendKeys(value)
76+
}
77+
6778
const action = {
6879
clearManually,
6980
getInputValue,
81+
getInputValueWithoutInputgroup,
7082
typeValue,
83+
typeValueWithoutInputgroup,
7184
verifyInputValid,
7285
verifyInputInvalid,
7386
checkHintText: async function (driver, inputGroup, hintComponent, text) {
@@ -123,7 +136,12 @@ const action = {
123136
checkWarningHintText: async function (driver, inputGroup, hintComponent, text) {
124137
const hintButton = await driver.findElement(inputGroup.warningHint)
125138
await hintButton.click()
126-
// await hoverComponent(driver, inputGroup.warningHint)
139+
const hint = await driver.findElement(hintComponent)
140+
await driver.sleep(250)
141+
const hintText = await hint.getText()
142+
expect(hintText).equal(text)
143+
},
144+
checkWarningText: async function (driver, hintComponent, text) {
127145
const hint = await driver.findElement(hintComponent)
128146
await driver.sleep(250)
129147
const hintText = await hint.getText()
@@ -133,11 +151,27 @@ const action = {
133151
const txt = await getInputValue(driver, inputGroup)
134152
expect(txt).equal(value)
135153
},
154+
verifyTypedValueWithoutInputgroup: async function (driver, input, value) {
155+
const txt = await getInputValueWithoutInputgroup(driver, input)
156+
expect(txt).equal(value)
157+
},
136158
verifyInputDisabled: async function (driver, inputGroup) {
137159
const inputField = await driver.findElement(inputGroup.inputField)
138160
const flag = await inputField.getAttribute('disabled')
139161
expect(flag).equal('true')
140162
},
163+
verifyInputClassDisabled: async function (driver, inputGroup) {
164+
const inputField = await driver.findElement(inputGroup.root)
165+
const attributes = await inputField.getAttribute('class')
166+
const flag = attributes.includes('form-field__wrapper-disabled')
167+
expect(flag).equal(true)
168+
},
169+
verifyInputClassEnabled: async function (driver, inputGroup) {
170+
const inputField = await driver.findElement(inputGroup.inputField)
171+
const attributes = await inputField.getAttribute('class')
172+
const flag = attributes.includes('form-field__wrapper-disabled')
173+
expect(flag).equal(false)
174+
},
141175
verifyInputEnabled: async function (driver, inputGroup) {
142176
const inputField = await driver.findElement(inputGroup.inputField)
143177
const flag = await inputField.getAttribute('disabled')

tests/features/common/actions/table.action.js

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,19 @@ const action = {
8080
`Value "${value}" does not includes in all values: [${arr}]`
8181
)
8282
},
83+
isContainsSubstringInColumnAttributrCells: async function(
84+
driver,
85+
table,
86+
columnName,
87+
value
88+
) {
89+
const arr = await getColumnValuesAttribute(driver, table, columnName)
90+
expect(arr.length > 0).equal(true)
91+
expect(arr.every(item => item.includes(value))).equal(
92+
true,
93+
`Value "${value}" does not includes in all values: [${arr}]`
94+
)
95+
},
8396
isContainsSubstringInColumnDropdownCells: async function(
8497
driver,
8598
table,
@@ -132,7 +145,7 @@ const action = {
132145
driver,
133146
overlay
134147
)
135-
const options = optionsRow.concat(optionsOverlay);
148+
const options = optionsRow.concat(optionsOverlay)
136149

137150
flag = flag && options.some(item => item.includes(subString))
138151
}
@@ -297,7 +310,7 @@ const action = {
297310
if (arr.length === 0) {
298311
expect(arr.length > 0).equal(
299312
true,
300-
`Array is empty, nothing to compare`
313+
'Array is empty, nothing to compare'
301314
)
302315
}
303316
const diff = differenceWith(arr, values, isEqual)

tests/features/common/page-objects/info-pane.po.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,7 @@ const commonInfoPaneTabSelector = commonTable(infoPaneTabSelector)
464464
const commonEditBtnTableView = By.css('[data-testid="detailsPanel"] .details-item__data-btn-edit')
465465
const commonEditBtnFullView = By.css('.table__item_big .details-item__data-btn-edit')
466466
const commonVersionTagInputTableView = By.css('.details-item:nth-of-type(3) .details-item__input-wrapper input')
467+
const commonVersionTagInputPlaceholder = By.css('.details-item:nth-of-type(3) .details-item__data-add-placeholder')
467468
const commonVersionTagInput = inputGroup(
468469
generateInputGroup(
469470
'.details-item:nth-of-type(3) .details-item__input-wrapper',
@@ -547,6 +548,7 @@ module.exports = {
547548
Edit_btn_full_view: commonEditBtnFullView,
548549
Version_tag_Input_table_view: commonVersionTagInputTableView,
549550
Version_tag_Input_full_view: commonVersionTagInputFullView,
551+
Version_Tag_Input_Placeholder: commonVersionTagInputPlaceholder,
550552
Version_tag_Input: commonVersionTagInput
551553
},
552554
transformationsInfoPane: {
@@ -671,6 +673,7 @@ module.exports = {
671673
Edit_btn_full_view: commonEditBtnFullView,
672674
Version_tag_Input_table_view: commonVersionTagInputTableView,
673675
Version_tag_Input_full_view: commonVersionTagInputFullView,
676+
Version_Tag_Input_Placeholder: commonVersionTagInputPlaceholder,
674677
Version_tag_Input: commonVersionTagInput
675678
},
676679
modelsInfoPane: {
@@ -712,6 +715,7 @@ module.exports = {
712715
Edit_btn_full_view: commonEditBtnFullView,
713716
Version_tag_Input_table_view: commonVersionTagInputTableView,
714717
Version_tag_Input_full_view: commonVersionTagInputFullView,
718+
Version_Tag_Input_Placeholder: commonVersionTagInputPlaceholder,
715719
Version_tag_Input: commonVersionTagInput
716720
},
717721
modelsRealTimePipelineInfoPane: {

tests/features/common/page-objects/jobs-and-workflows.po.js

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ const functionsTableSelector = {
9595
labels: {
9696
componentType: dropdownComponent,
9797
structure: generateDropdownGroup(
98-
'.job-card-template__chips',
98+
'.job-card-template__chips input',
9999
'.chip-block span.chips_button',
100100
'.chip-block .data-ellipsis.tooltip-wrapper .edit-chip-container',
101101
false,
@@ -235,7 +235,7 @@ const BatchRunParametersTable = {
235235
delete_btn: '.form-table__actions-cell .round-icon-cp:nth-of-type(2)',
236236
discard_btn: '.form-table__actions-cell .round-icon-cp:nth-of-type(2)',
237237
checkbox: '.form-field-checkbox input',
238-
name_input: '.form-field-input input',
238+
name_input: '.form-table__cell_2 .form-field-input input',
239239
name_verify: '.form-table__cell_2',
240240
type_dropdown: {
241241
componentType: dropdownComponent,
@@ -730,10 +730,10 @@ module.exports = {
730730
'.modal .modal__header-button .round-icon-cp'
731731
),
732732
Search_Input: inputWithAutocomplete({
733-
root: '.form .search-container',
733+
root: '.form-row .search-container',
734734
elements: {
735735
input: 'input',
736-
options: '.search-matches .search-matches__item',
736+
options: '.functions-list > div > div.job-card-template__header > div.data-ellipsis.tooltip-wrapper',
737737
option_name: ''
738738
}
739739
}),
@@ -789,13 +789,34 @@ module.exports = {
789789
'.form-field__icons svg'
790790
)
791791
),
792+
Add_Label_Button: By.css('.job-wizard__run-details .form-row:nth-of-type(4) .chips .chips-wrapper .button-add'),
793+
Close_Label_Button: By.css('.job-wizard__run-details .form-row:nth-of-type(4) .chips .chips-wrapper .edit-chip__icon-close'),
794+
Run_Details_Labels_Key: inputGroup(
795+
generateInputGroup(
796+
'.job-wizard__run-details .form-row:nth-of-type(4) .chips-wrapper',
797+
false,
798+
true,
799+
'.pop-up-dialog'
800+
)
801+
),
802+
Run_Details_Labels_Value: By.css ('.job-wizard__run-details .form-row:nth-of-type(4) .chips-wrapper [id="runDetails.labels[0].value"]'),
792803
Name_Input_Batch_Run: By.css('.form-row .form-field-input .form-field__wrapper input'),
793804
Version_Dropdown: dropdownComponent(
794805
generateDropdownGroup('.form-col-1:nth-of-type(2)', '.form-field-select', '.form-field__select-value', false, false)
795806
),
796807
Method_Dropdown: dropdownComponent(
797808
generateDropdownGroup('.form-col-1:nth-of-type(3)', '.form-field-select', '.select__item-main-label', false, false)
798809
),
810+
Method_Dropdown_Option: By.css('.form-col-1:nth-of-type(3) .form-field-select .form-field__select span'),
811+
Image_Name_Input_Run_Details: inputGroup(
812+
generateInputGroup(
813+
'.job-wizard__run-details > div.form-field-input .form-field__wrapper',
814+
true,
815+
false,
816+
'.form-field__warning svg'
817+
)
818+
),
819+
Image_Name_Text_Run_Details: By.css('.job-wizard__run-details .warning-text'),
799820
Batch_Run_Labels_Table: commonTable(BatchRunLabelsTable),
800821
Batch_Run_Data_Inputs_Table: commonTable(BatchRunDataInputsTable),
801822
Data_Inputs_Headers: commonTable(DataInputsHeaders),
@@ -817,7 +838,7 @@ module.exports = {
817838
'.create-container .create-container__header .header-link h3.header-link__title'
818839
),
819840
Search_Input: inputWithAutocomplete({
820-
root: '.create-container .create-container__data .search-container',
841+
root: '.create-container .create-container__data .search-container',
821842
elements: {
822843
input: 'input',
823844
options: '.search-matches .search-matches__item',

tests/features/common/page-objects/side-panel.po.js

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1174,6 +1174,67 @@ module.exports = {
11741174
)
11751175
},
11761176
batchRunEdit: {
1177+
Hyperparameter_Strategy_Accordion:{
1178+
Strategy_Dropdown: dropdownComponent(
1179+
generateDropdownGroup(
1180+
'.modal__content .modal__body .job-wizard__hyperparameter-strategy .strategy-grid-item',
1181+
'.form-field-select .form-field__wrapper-normal',
1182+
'.options-list__body .select__item-label',
1183+
'.data-ellipsis'
1184+
)
1185+
),
1186+
Max_Iterations: inputGroup(
1187+
generateInputGroup(
1188+
'.modal__content .modal__body .wizard-form__content .max-iterations-grid-item .form-field__wrapper-normal',
1189+
true,
1190+
true,
1191+
false
1192+
)
1193+
),
1194+
Max_Errors: inputGroup(
1195+
generateInputGroup(
1196+
'.modal__content .modal__body .wizard-form__content .max-errors-grid-item .form-field__wrapper-normal',
1197+
true,
1198+
true,
1199+
false
1200+
)
1201+
)
1202+
},
1203+
Parameters_Accordion:{
1204+
Parameters_From_UI_Radiobutton: radiobuttonComponent(
1205+
{
1206+
root:
1207+
'.modal__content .wizard-form__content-container .form-row .form-field-radio:nth-of-type(1)',
1208+
elements: {
1209+
radiobutton: 'input',
1210+
mark: 'label',
1211+
name: '',
1212+
description: ''
1213+
}
1214+
}
1215+
),
1216+
Parameters_From_File_Radiobutton: radiobuttonComponent(
1217+
{
1218+
root:
1219+
'.modal__content .wizard-form__content-container .form-row .form-field-radio:nth-of-type(2)',
1220+
elements: {
1221+
radiobutton: 'input',
1222+
mark: '',
1223+
name: 'label',
1224+
description: ''
1225+
}
1226+
}
1227+
),
1228+
Parameters_From_File_Input: inputGroup(
1229+
generateInputGroup(
1230+
'.modal__content .wizard-form__content-container .form-row .form-field-input .form-field__wrapper',
1231+
true,
1232+
true,
1233+
false
1234+
)
1235+
),
1236+
Hyper_Toggle_Switch: By.css('.modal__content .form-table__row:nth-of-type(2) .form-table__cell_hyper .form-field-toggle__switch')
1237+
},
11771238
Resources_Accordion: {
11781239
Pods_Priority_Dropdown: commonPodsPriorityDropdown,
11791240
Node_Selection_Subheader: By.css('.modal__content .wizard-form__content-container .form-row:nth-child(3)'),
@@ -1355,6 +1416,22 @@ module.exports = {
13551416
'.data-ellipsis .data-ellipsis'
13561417
)
13571418
),
1419+
Intervals_Dropdown: dropdownComponent(
1420+
generateDropdownGroup(
1421+
'.simple-schedule-item:nth-of-type(2) .form-field-select .form-field__wrapper',
1422+
'.form-field__control .form-field__select',
1423+
'.options-list__body .select__item',
1424+
'.data-ellipsis .data-ellipsis'
1425+
)
1426+
),
1427+
At_time_Input: numberInputGroup(
1428+
generateNumberInputGroup(
1429+
'.form-col-1 .time-picker-container .time-picker__control',
1430+
false,
1431+
true,
1432+
false
1433+
)
1434+
),
13581435
Schedule_item_Sunday: By.css('.simple-schedule-item .schedule-repeat-week .schedule-repeat-week_day:nth-of-type(1)'),
13591436
Schedule_item_Monday: By.css('.simple-schedule-item .schedule-repeat-week .schedule-repeat-week_day:nth-of-type(2)'),
13601437
Schedule_item_Tuesday: By.css('.simple-schedule-item .schedule-repeat-week .schedule-repeat-week_day:nth-of-type(3)'),

tests/features/datasets.feature

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,4 +398,30 @@ Scenario: MLD010 - Check that version tag dropdown shows all tags on filters wiz
398398
Then click on "Apply_Button" element on "Artifacts_FilterBy_Popup" wizard
399399
And wait load page
400400
Then check "newTag" value in "tag" column in "Datasets_Table" table on "Datasets" wizard
401+
402+
Scenario: MLD011 - Check that version tag has "Click to add" status when it's empty after edited
403+
Given open url
404+
And wait load page
405+
And click on row root with value "churn-project-admin" in "name" column in "Projects_Table" table on "Projects" wizard
406+
And wait load page
407+
And hover "Project_Navigation_Toggler" component on "commonPagesHeader" wizard
408+
And click on cell with value "Datasets" in "link" column in "General_Info_Quick_Links" table on "commonPagesHeader" wizard
409+
And wait load page
410+
When click on cell with row index 1 in "name" column in "Datasets_Table" table on "Datasets" wizard
411+
Then verify "Info_Pane_Tab_Selector" on "Datasets_Info_Pane" wizard should contains "Datasets_Info_Pane"."Tab_List"
412+
Then verify "Overview" tab is active in "Info_Pane_Tab_Selector" on "Datasets_Info_Pane" wizard
413+
Then verify "Overview_General_Headers" on "Datasets_Info_Pane" wizard should contains "Datasets_Info_Pane"."Overview_General_Headers"
414+
Then check "latest" value in "tag" column in "Overview_Table" table on "Datasets_Info_Pane" wizard
415+
Then click on "Edit_btn_table_view" element on "Datasets_Info_Pane" wizard
416+
Then type value "" to "Version_tag_Input" field on "Datasets_Info_Pane" wizard
417+
Then click on "Apply_Button" element on "Datasets_Info_Pane" wizard
418+
Then click on "Apply_Changes_Button" element on "Datasets_Info_Pane" wizard
419+
And wait load page
420+
Then click on "Table_FilterBy_Button" element on "Datasets" wizard
421+
Then select "All" option in "Table_Tree_Filter_Dropdown" dropdown on "Artifacts_FilterBy_Popup" wizard
422+
Then click on "Apply_Button" element on "Artifacts_FilterBy_Popup" wizard
423+
And wait load page
424+
When click on cell with row index 1 in "name" column in "Datasets_Table" table on "Datasets" wizard
425+
And wait load page
426+
Then "Version_Tag_Input_Placeholder" element on "Datasets_Info_Pane" should contains "Click to add" value
401427

0 commit comments

Comments
 (0)