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 check broken link redirection on ML Functions
- added Show Untagged checkbox verify on ML Functions
- added Filter by filter verification on ML Functions
- updated label key/value verification on project card
- updated mock deleteProjectV2 with mlrun-deletion-strategy
  • Loading branch information
EZheln committed Oct 22, 2024
1 parent dcdb2ba commit 3967db9
Show file tree
Hide file tree
Showing 13 changed files with 139 additions and 44 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
"body-parser": "^1.19.0",
"case-sensitive-paths-webpack-plugin": "^2.4.0",
"chai": "^4.3.4",
"chromedriver": "^128.0.0",
"chromedriver": "^130.0.0",
"css-loader": "^6.5.1",
"cucumber-html-reporter": "^5.3.0",
"eslint": "^8.57.0",
Expand Down
27 changes: 20 additions & 7 deletions tests/features/MLFunction.feature
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ Feature: ML Functions
When collapse "Resources_Accordion" on "New_Function" wizard
Then "Deploy_Button" element on "New_Function" should contains "Create" value
Then click on "Deploy_Button" element on "New_Function" wizard
Then click on "Cross_Close_Button" element on "ML_Function_Info_Pane" wizard
And wait load page
Then check "new-aqa-function-01" value in "name" column in "Functions_Table" table on "ML_Functions" wizard

@MLF
Expand Down Expand Up @@ -1321,6 +1321,8 @@ Feature: ML Functions
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 redirection from "projects/default/functions/INVALID/latest/overview" to "projects/default/functions"
And wait load page
And wait load page
Then verify "Notification_Pop_Up" element visibility on "Notification_Popup" wizard
And wait load page
Then "Notification_Pop_Up" element on "Notification_Popup" should contains "This function either does not exist or was deleted" value
Expand All @@ -1334,16 +1336,16 @@ Feature: ML Functions
Then verify "Date_Picker_Filter_Dropdown" element visibility on "ML_Functions" wizard
When select "Any time" option in "Date_Picker_Filter_Dropdown" filter dropdown on "ML_Functions" wizard
And wait load page
When click on cell with row index 1 in "name" column in "Functions_Table" table on "ML_Functions" wizard
When click on cell with row index 2 in "name" column in "Functions_Table" table on "ML_Functions" wizard
And wait load page
Then verify redirection from "projects/default/functions/85957751e571a92e07213781f5e0c35bfbe42c64/INVALID" to "projects/default/functions/85957751e571a92e07213781f5e0c35bfbe42c64/overview"
Then verify redirection from "projects/default/functions/model-monitoring-stream/latest/INVALID" to "projects/default/functions/model-monitoring-stream/latest/overview"
Then select "Code" tab in "Info_Pane_Tab_Selector" on "ML_Function_Info_Pane" wizard
And wait load page
Then verify redirection from "projects/default/functions/85957751e571a92e07213781f5e0c35bfbe42c64/INVALID" to "projects/default/functions/85957751e571a92e07213781f5e0c35bfbe42c64/overview"
Then verify redirection from "projects/default/functions/model-monitoring-stream/latest/INVALID" to "projects/default/functions/model-monitoring-stream/latest/overview"
Then select "Build Log" tab in "Info_Pane_Tab_Selector" on "ML_Function_Info_Pane" wizard
And wait load page
Then verify redirection from "projects/default/functions/85957751e571a92e07213781f5e0c35bfbe42c64/INVALID" to "projects/default/functions/85957751e571a92e07213781f5e0c35bfbe42c64/overview"
Then verify redirection from "projects/default/INVALID/85957751e571a92e07213781f5e0c35bfbe42c64/overview" to "projects"
Then verify redirection from "projects/default/functions/model-monitoring-stream/latest/INVALID" to "projects/default/functions/model-monitoring-stream/latest/overview"
Then verify redirection from "projects/default/INVALID/model-monitoring-stream/latest/overview" to "projects"

@MLF
@smoke
Expand Down Expand Up @@ -1412,8 +1414,19 @@ Feature: ML Functions
Then verify "New_Function_Build_Commands_Text_Area" not input element in "Code_Accordion" on "New_Function" wizard is enabled
Then click on "Save_Button" element on "New_Function" wizard
And wait load page
Then "Header" element on "ML_Function_Info_Pane" should contains "demo-function-02" value
Then check "demo-function-02" value in "name" column in "Functions_Table" table on "ML_Functions" wizard
Then verify "Table_FilterBy_Button" element visibility on "ML_Functions" wizard
Then click on "Table_FilterBy_Button" element on "ML_Functions" wizard
Then "Title" element on "FilterBy_Popup" should contains "Filter by" value
Then verify "Show_Untagged" element visibility on "FilterBy_Popup" wizard
Then check "Show_Untagged" element on "FilterBy_Popup" wizard
Then click on "Apply_Button" element on "FilterBy_Popup" wizard
And wait load page
And wait load page
Then check "demo-function-02" value in "name" column in "Functions_Table" table on "ML_Functions" wizard
When click on cell with value "demo-function-02" in "name" column in "Functions_Table" table on "ML_Functions" wizard
Then check "demo-function-02" value in "name" column in "Overview_Table" table on "ML_Function_Info_Pane" wizard
Then "Header" element on "ML_Function_Info_Pane" should contains "demo-function-02" value

@MLF
@passive
Expand Down
15 changes: 14 additions & 1 deletion tests/features/common/actions/table.action.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const action = {
`Value "${subString}" does not includes in all values: [${arr}]`
)
},
isContainsSubstringInColumnAttributrCells: async function(
isContainsSubstringInColumnAttributeCells: async function(
driver,
table,
columnName,
Expand All @@ -94,6 +94,19 @@ const action = {
`Value "${value}" does not includes in all values: [${arr}]`
)
},
isContainsSubstringInColumnAttributeListCells: async function(
driver,
table,
columnName,
value
) {
const arr = await getColumnValuesAttribute(driver, table, columnName)
expect(arr.length > 0).to.equal(true)
expect(arr.every(item => value.includes(item))).to.equal(
true,
`Value "${value}" does not includes in all values: [${arr}]`
)
},
isContainsSubstringInColumnDropdownCells: async function(
driver,
table,
Expand Down
8 changes: 8 additions & 0 deletions tests/features/common/page-objects/interactive-popup.po.js
Original file line number Diff line number Diff line change
Expand Up @@ -1545,6 +1545,14 @@ module.exports = {
icon: ''
}
}),
Show_Untagged: checkboxComponent({
root: '#overlay_container .form-field-checkbox input',
elements: {
checkbox: '',
name: '',
icon: ''
}
}),
Status_All_Checkbox: checkboxComponent({
root: '[data-testid="select-checkbox"]:nth-of-type(1)',
elements: {
Expand Down
1 change: 1 addition & 0 deletions tests/features/common/page-objects/ml-functions.po.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ module.exports = {
false
)
),
Table_FilterBy_Button: By.css('[data-testid="filter-menu-btn-tooltip-wrapper"]'),
New_Function_Button: By.css('.content [data-testid="btn"]'),
Table_Refresh_Button: By.css(
'.content [data-testid="refresh-tooltip-wrapper"]'
Expand Down
18 changes: 18 additions & 0 deletions tests/features/common/page-objects/projects.po.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,24 @@ const ProjectsTableSelector = {
'.tooltip .tooltip__text span'
)
},
labels_key: {
componentType: labelComponent,
structure: generateLabelGroup(
'[data-testid="project-card__labels"] .chip-block .input-label-key',
false,
false,
'.tooltip .tooltip__text span'
)
},
labels_value: {
componentType: labelComponent,
structure: generateLabelGroup(
'[data-testid="project-card__labels"] .chip-block .input-label-value',
false,
false,
'.tooltip .tooltip__text span'
)
},
labels: {
componentType: dropdownComponent,
structure: generateDropdownGroup(
Expand Down
1 change: 1 addition & 0 deletions tests/features/datasets.feature
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ Feature: Datasets Page
Then verify "Header" element visibility on "Datasets_Info_Pane" wizard
Then "Header" element on "Datasets_Info_Pane" should contains "test-dataset" value
Then refresh a page
And wait load page
Then verify "Header" element visibility on "Datasets_Info_Pane" wizard
Then "Header" element on "Datasets_Info_Pane" should contains "test-dataset" value

Expand Down
4 changes: 4 additions & 0 deletions tests/features/jobsAndWorkflows.feature
Original file line number Diff line number Diff line change
Expand Up @@ -1241,9 +1241,13 @@ Feature: Jobs and workflows
Then select "Pods" tab in "Info_Pane_Tab_Selector" on "Workflows_Monitor_Tab_Info_Pane" wizard
And wait load page
Then verify redirection from "projects/churn-project-admin/jobs/monitor-workflows/workflow/eaae138e-439a-47fa-93c6-ba0fe1dc3b79/07f98fb46a424b2dbee5247b35f37727/INVALID" to "projects/churn-project-admin/jobs/monitor-workflows/workflow/eaae138e-439a-47fa-93c6-ba0fe1dc3b79/07f98fb46a424b2dbee5247b35f37727/overview"
And wait load page
Then verify redirection from "projects/churn-project-admin/jobs/monitor-workflows/workflow/INVALID/07f98fb46a424b2dbee5247b35f37727/overview" to "projects/churn-project-admin/jobs/monitor-workflows"
And wait load page
Then verify redirection from "projects/churn-project-admin/jobs/monitor-workflows/workflow/eaae138e-439a-47fa-93c6-ba0fe1dc3b79/INVALID/overview" to "projects/churn-project-admin/jobs/monitor-workflows"
And wait load page
Then verify redirection from "projects/INVALID/jobs/monitor-workflows/workflow/eaae138e-439a-47fa-93c6-ba0fe1dc3b79/07f98fb46a424b2dbee5247b35f37727/overview" to "projects"
And wait load page

@MLJW
@smoke
Expand Down
4 changes: 2 additions & 2 deletions tests/features/projectMonitoring.feature
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,12 @@ Feature: Project Monitoring Page
Then verify "New_File_Type_Dropdown" dropdown on "Register_File_Popup" wizard selected option value "Table"

@MLPM
@FAILED_TODO
#TODO: 'Register Model' option is missing in list of 'Create New' dropdown in demo mode
@passive
@smoke
Scenario: MLPM005 - Check all mandatory components on Register Model Popup
Given open url
And turn on demo mode
And wait load page
And click on row root with value "default" in "name" column in "Projects_Table" table on "Projects" wizard
And wait load page
Then verify "Create_New" element visibility on "Project" wizard
Expand Down
20 changes: 10 additions & 10 deletions tests/features/projectSettings.feature
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Feature: Project Settings page
Then verify "Source_URL_Input" on "Project_Settings_General_Tab" wizard should display "Input_Hint"."Source_URL_Input"
Then type value " " to "Source_URL_Input" field on "Project_Settings_General_Tab" wizard
Then verify "Source_URL_Input" on "Project_Settings_General_Tab" wizard should display hover warning "Input_Hint"."Input_Field_Invalid"
Then type value "test" to "Source_URL_Input" field on "Project_Settings_General_Tab" wizard
Then verify "Pull_At_Runtime_Checkbox" element visibility on "Project_Settings_General_Tab" wizard
Then "Pull_At_Runtime_Checkbox" element should be unchecked on "Project_Settings_General_Tab" wizard
Then check "Pull_At_Runtime_Checkbox" element on "Project_Settings_General_Tab" wizard
Expand All @@ -34,6 +35,8 @@ Feature: Project Settings page
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
And wait load page
Then click on "Notification_Pop_Up_Cross_Close_Button" element on "Notification_Popup" wizard
And wait load page
Then "Pull_At_Runtime_Checkbox" element should be checked on "Project_Settings_General_Tab" wizard
Then click on breadcrumbs "project" label on "commonPagesHeader" wizard
And wait load page
Expand Down Expand Up @@ -102,9 +105,8 @@ Feature: Project Settings page
And click on "MLRun_Logo" element on "commonPagesHeader" wizard
And wait load page
Then type value "cat-vs-dog-classification" to "Search_Projects_Input" field on "Projects" wizard
Then value in "labels" column with "dropdowns" in "Projects_Table" on "Projects" wizard should contains "c=d"
Then click on "Active_Projects_Button" element on "Projects" wizard
Then value in "labels" column with "dropdowns" in "Projects_Table" on "Projects" wizard should contains "e=f"
Then value in "labels_key" column with "attribute_list" in "Projects_Table" on "Projects" wizard should contains "a,c,e"
Then value in "labels_value" column with "attribute_list" in "Projects_Table" on "Projects" wizard should contains "b,d,f"
And click on row root with value "cat-vs-dog-classification" in "name" column in "Projects_Table" table on "Projects" wizard
And wait load page
And hover "Project_Navigation_Toggler" component on "commonPagesHeader" wizard
Expand All @@ -120,17 +122,15 @@ Feature: Project Settings page
Then verify "Source_URL_Input" on "Project_Settings_General_Tab" wizard should display hover warning "Input_Hint"."Input_Field_Invalid"
When add rows to "Labels_Table" table on "Project_Settings_General_Tab" wizard
| key_input | value_input |
| a | b |
| project_label_key | project_label_value |
| a12345 | b54321 |
| project_label_key | project_label_value |
| a | b |
Then type value "test" to "Source_URL_Input" field on "Project_Settings_General_Tab" wizard
And click on "MLRun_Logo" element on "commonPagesHeader" wizard
And wait load page
Then type value "cat-vs-dog-classification" to "Search_Projects_Input" field on "Projects" wizard
Then value in "labels" column with "dropdowns" in "Projects_Table" on "Projects" wizard should contains "project_label_key=project_label_value"
Then click on "Active_Projects_Button" element on "Projects" wizard
Then value in "labels" column with "dropdowns" in "Projects_Table" on "Projects" wizard should contains "a12345=b54321"
Then click on "Active_Projects_Button" element on "Projects" wizard
Then value in "labels_key" column with "attribute_list" in "Projects_Table" on "Projects" wizard should contains "a12345,project_label_key,a"
Then value in "labels_value" column with "attribute_list" in "Projects_Table" on "Projects" wizard should contains "b54321,project_label_value,b"
And click on row root with value "cat-vs-dog-classification" in "name" column in "Projects_Table" table on "Projects" wizard
And wait load page
And hover "Project_Navigation_Toggler" component on "commonPagesHeader" wizard
Expand Down Expand Up @@ -424,4 +424,4 @@ Feature: Project Settings page
And select "Secrets" tab in "Project_Settings_Tab_Selector" on "Project_Settings_General_Tab" wizard
And wait load page
Then verify redirection from "projects/default/settings/INVALID" to "projects/default/settings/general"
Then verify redirection from "projects/default/INVALID/general" to "projects"
Then verify redirection from "projects/default/INVALID/general" to "projects"
Loading

0 comments on commit 3967db9

Please sign in to comment.