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

Impl [Tests] QA Sprint 155 done #2188

Merged
merged 1 commit into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
15 changes: 10 additions & 5 deletions tests/features/common-tools/common-consts.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ module.exports = {
]
},
Common_Lists: {
Action_Menu_List: ['Download', 'Copy URI', 'View YAML', 'Add a tag', 'Delete']
Action_Menu_List: ['Download', 'Copy URI', 'View YAML', 'Add a tag', 'Delete'],
Handler_List: ['train'],
Pods_Priority_List: ['Low','Medium', 'High'],
Ranking_Criteria_List: ['Min','Max']
},
Datasets_Info_Pane: {
Tab_List: ['Overview', 'Preview', 'Metadata', 'Analysis'],
Expand All @@ -106,6 +109,7 @@ module.exports = {
'Version tag:',
'Iter:',
'Size:',
'Label column:',
'Path:',
'URI:',
'UID:',
Expand Down Expand Up @@ -177,6 +181,7 @@ module.exports = {
'Iter:',
'Kind:',
'Size:',
'Label column:',
'Path:',
'URI:',
'Model file:',
Expand Down Expand Up @@ -306,9 +311,9 @@ module.exports = {
Function_Name_Batch_Run_Hint:
'Valid characters: a–z, A–Z, 0–9, –, _, .\nMust begin and end with: a–z, A–Z, 0–9\nLength – max: 63\n' +
'This field is required',
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' +
'Key should be unique',
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',
Labels_Warning_Key: 'Valid characters: a–z, A–Z, 0–9, –, _, .\nMust begin and end with: a–z, A–Z, 0–9\nLength – max: 75\n' +
'Key must be unique',
Labels_Warning_Value: 'Valid characters: a–z, A–Z, 0–9, –, _, .\nMust begin and end with: a–z, A–Z, 0–9\nLength – max: 75',
Feature_Set_Name_Hint:
'Valid characters: a–z, A–Z, 0–9, –, _, .\nMust begin and end with: a–z, A–Z, 0–9\nLength – max: 56\n' +
'This field is required',
Expand Down Expand Up @@ -337,7 +342,7 @@ module.exports = {
Base_Image_Hint:
"The name of a base container image from which to build the function's processor image",
Limit_Number_Warning: 'Limit must be bigger than or equal to Request and not be less than 1',
Minimum_Value_Warning: 'The minimum value should be 1',
Minimum_Value_Warning: 'The minimum value must be 1',
CPU_Limit_Number_Warning:
'Limit must be bigger than or equal to Request and not be less than 0.001',
Request_Number_Warning: 'Request must be less than or equal to Limit and not be less than 1',
Expand Down
2 changes: 1 addition & 1 deletion tests/features/common/actions/api.actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ const action = {

await mainHttpClient
.post(
`${REACT_APP_MLRUN_API_URL_ARTIFACTS}/projects//${mlProjectName}/artifacts/${uid}/${mlArtifactName}`,
`${REACT_APP_MLRUN_API_URL_ARTIFACTS}/projects//${mlProjectName}/artifacts`,
data
)
.then(res => {
Expand Down
6 changes: 6 additions & 0 deletions tests/features/common/actions/common.action.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,12 @@ const action = {
.perform()
await driver.sleep(250)
},
verifyClassDisabled: async function (driver, component) {
const inputField = await driver.findElement(component)
const attributes = await inputField.getAttribute('class')
const flag = attributes.includes('form-field__wrapper-disabled')
expect(flag).equal(true)
},
verifyElementDisabled: async function(driver, component) {
const element = await driver.findElement(component)
const flag = await element.getAttribute('disabled')
Expand Down
1 change: 1 addition & 0 deletions tests/features/common/actions/input-group.action.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ const action = {
},
checkWarningHintText: async function (driver, inputGroup, hintComponent, text) {
const hintButton = await driver.findElement(inputGroup.warningHint)
await driver.sleep(250)
await hintButton.click()
await driver.sleep(250)
const hint = await driver.findElement(hintComponent)
Expand Down
5 changes: 3 additions & 2 deletions tests/features/common/actions/table.action.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,11 @@ const action = {
value
) {
const arr = await getColumnValues(driver, table, columnName)
const subString = value.replace('=', '\n:\n')
expect(arr.length > 0).equal(true)
expect(arr.every(item => item.includes(value))).equal(
expect(arr.every(item => item.includes(subString))).equal(
true,
`Value "${value}" does not includes in all values: [${arr}]`
`Value "${subString}" does not includes in all values: [${arr}]`
)
},
isContainsSubstringInColumnAttributrCells: async function(
Expand Down
20 changes: 20 additions & 0 deletions tests/features/common/page-objects/commonPagesHeader.po.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,24 @@ module.exports = {
Project_Monitoring_First_Instance: By.css('.project-details__details .link'),
Project_Monitoring_Second_Instance: By.css('.project-overview-card:nth-of-type(3) .link:nth-of-type(4)'),
Project_Monitoring_Active: By.css('#monitor'),
Step_1_Button: By.css('.modal .modal__content .modal__body .wizard-steps .btn:nth-of-type(1)'),
Step_1_Button_text: By.css('.modal .modal__content .modal__body .wizard-steps .btn:nth-of-type(1) div'),
Step_2_Button: By.css('.modal .modal__content .modal__body .wizard-steps .btn:nth-of-type(2)'),
Step_2_Button_text: By.css('.modal .modal__content .modal__body .wizard-steps .btn:nth-of-type(2) div'),
Step_3_Button: By.css('.modal .modal__content .modal__body .wizard-steps .btn:nth-of-type(3)'),
Step_3_Button_text: By.css('.modal .modal__content .modal__body .wizard-steps .btn:nth-of-type(3) div'),
Step_4_Button: By.css('.modal .modal__content .modal__body .wizard-steps .btn:nth-of-type(4)'),
Step_4_Button_text: By.css('.modal .modal__content .modal__body .wizard-steps .btn:nth-of-type(4) div'),
Step_5_Button: By.css('.modal .modal__content .modal__body .wizard-steps .btn:nth-of-type(5)'),
Step_5_Button_text: By.css('.modal .modal__content .modal__body .wizard-steps .btn:nth-of-type(5) div'),
Step_6_Button: By.css('.modal .modal__content .modal__body .wizard-steps .btn:nth-of-type(6)'),
Step_6_Button_text: By.css('.modal .modal__content .modal__body .wizard-steps .btn:nth-of-type(6) div'),
Step_7_Button: By.css('.modal .modal__content .modal__body .wizard-steps .btn:nth-of-type(7)'),
Step_7_Button_text: By.css('.modal .modal__content .modal__body .wizard-steps .btn:nth-of-type(7) div'),
Form_Header_Run_Details: By.css('.job-wizard__run-details .form-row .form-step-title'),
Form_Header_Data_Inputs: By.css('.job-wizard__data-inputs .form-row .form-step-title'),
Form_Header_Parameters: By.css('.job-wizard__parameters .form-row .form-step-title'),
Form_Header_Resources: By.css('.job-wizard__resources .form-row .form-step-title'),
Form_Header_Advanced: By.css('.job-wizard__advanced .form-row .form-step-title'),
Form_Header_Hyperparameter_Strategy: By.css('.job-wizard__hyperparameter-strategy .form-row .form-step-title'),
}
27 changes: 25 additions & 2 deletions tests/features/common/page-objects/info-pane.po.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,28 @@ const artifactOverviewTable = {
}
}

const datasetOverviewTable = {
root: '.table__item .item-info__details:nth-of-type(1)',
header: {},
body: {
row: {
root: '',
fields: {
hash: '.details-item:nth-of-type(1) .details-item__data',
key: '.details-item:nth-of-type(2) .details-item__data',
tag: '.details-item:nth-of-type(3) .details-item__data',
iter: '.details-item:nth-of-type(4) .details-item__data',
size: '.details-item:nth-of-type(5) .details-item__data',
path: '.details-item:nth-of-type(7) .details-item__data',
uri: '.details-item:nth-of-type(7) .details-item__data',
uid: '.details-item:nth-of-type(8) .details-item__data',
updated: '.details-item:nth-of-type(9) .details-item__data',
labels: '.details-item:nth-of-type(10) .details-item__data'
}
}
}
}

const modelsOverviewTable = {
root: '.table__item .item-info__details:nth-of-type(1)',
header: {},
Expand Down Expand Up @@ -564,6 +586,7 @@ module.exports = {
Overview_Producer_Headers: commonTable(infoPaneOverviewProducerHeaders),
Overview_Sources_Headers: commonTable(infoPaneOverviewSourcesHeaders),
Train_Button: By.css('[data-testid="detailsPanel"] .item-header__buttons button'),
Label_column: By.css('.item-info__details .details-item:nth-of-type(6) .details-item__data'),
Overview_Hash_Header: labelComponent(
generateLabelGroup(
'.item-info__details:nth-of-type(1) .details-item:nth-of-type(1) .details-item__header',
Expand All @@ -573,14 +596,14 @@ module.exports = {
),
Overview_UID_Header: labelComponent(
generateLabelGroup(
'.item-info__details:nth-of-type(1) .details-item:nth-of-type(8) .details-item__header',
'.item-info__details:nth-of-type(1) .details-item:nth-of-type(9) .details-item__header',
false,
true
)
),
Expand_Sources: By.css('.details-item .info-sources'),
Info_Sources_Table: commonTable(filesInfoSourcesTable),
Overview_Table: commonTable(artifactOverviewTable),
Overview_Table: commonTable(datasetOverviewTable),
Edit_btn_table_view: commonEditBtnTableView,
Edit_btn_full_view: commonEditBtnFullView,
Version_tag_Input_table_view: commonVersionTagInputTableView,
Expand Down
Loading