Skip to content

Commit

Permalink
QA Sprint 171 done 1.7.x (#2846)
Browse files Browse the repository at this point in the history
* Updated tests according to the requirements:
- updated test on Project settings due to ML-7979
- added tests for searching by type, statuses, labels filter on the Jobs Monitoring page
- updated data for searching by type filter on the Jobs Monitoring page

* Updated tests according to the requirements:
- 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 authored Oct 23, 2024
1 parent f4b6fdc commit 1529929
Show file tree
Hide file tree
Showing 22 changed files with 799 additions and 80 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
3 changes: 3 additions & 0 deletions tests/features/common-tools/common-consts.js
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,7 @@ module.exports = {
'Run on spot:',
'Node selector:',
'Priority:',
'Handler:',
'Parameters:',
'Function:',
'Function tag:',
Expand Down Expand Up @@ -598,6 +599,8 @@ module.exports = {
},
No_Data_Message: {
Common_Message_Jobs_Monitoring: /No data matches the filter: "Start time: \d{2}\/\d{2}\/\d{4} \d{2}:\d{2} - \d{2}\/\d{2}\/\d{4} \d{2}:\d{2}, Project: test"/,
Common_Message_Jobs_Monitoring_Status: /No data matches the filter: "Created at: \d{2}\/\d{2}\/\d{4} \d{2}:\d{2} - \d{2}\/\d{2}\/\d{4} \d{2}:\d{2}, Status: (.+?)"/,
Common_Message_Jobs_Monitoring_Type: /No data matches the filter: "Start time: \d{2}\/\d{2}\/\d{4} \d{2}:\d{2} - \d{2}\/\d{2}\/\d{4} \d{2}:\d{2}, Type: (.+?)"/,
Common_Message_Jobs_Monitoring_Scheduled: /No data matches the filter: "Scheduled at: \d{2}\/\d{2}\/\d{4} \d{2}:\d{2} - \d{2}\/\d{2}\/\d{4} \d{2}:\d{2}, Project: test"/,
Common_Message: 'No data matches the filter: "Version Tag: latest, Name: ccccc"',
Common_Message_Feature: 'No data matches the filter: "Version Tag: latest"',
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
17 changes: 16 additions & 1 deletion tests/features/common/page-objects/interactive-popup.po.js
Original file line number Diff line number Diff line change
Expand Up @@ -1512,7 +1512,14 @@ module.exports = {
},
filterByPopup: {
Title: By.css('[data-testid="pop-up-dialog"] h3'),
Table_Label_Filter_Input: commonLabelFilterInput,
Table_Label_Filter_Input: inputGroup(
generateInputGroup(
'[data-testid="labels-form-field-input"]',
true,
false,
'svg'
)
),
Table_Project_Filter_Input: commonProjectFilterInput,
Table_Tree_Filter_Dropdown: commonTableTreeFilterDropdown,
Status_Filter_Element: By.css('[data-testid="state-form-field-select"]'),
Expand All @@ -1538,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
38 changes: 36 additions & 2 deletions tests/features/common/page-objects/jobs-monitoring.po.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,16 @@ such restriction.
import { By } from 'selenium-webdriver'
import commonTable from '../components/table.component'
import dropdownComponent from '../components/dropdown.component'
import labelComponent from '../components/label.component'
import {
generateDropdownGroup,
generateInputGroup
generateInputGroup,
generateLabelGroup
} from '../../common-tools/common-tools'
import inputGroup from '../components/input-group.component'
import checkboxComponent from '../components/checkbox.component'
import datepicker from '../components/date-picker.component'
import actionMenu from '../components/action-menu.component'

const tabSelector = {
root: '.content .content-menu',
Expand All @@ -42,6 +45,14 @@ const tabSelector = {
}
}

const actionMenuStructure = {
root: '.actions-menu__container',
menuElements: {
open_button: 'button',
options: '.actions-menu__body .actions-menu__option'
}
}

const overallTable = {
root: '.table__content',
header: {
Expand All @@ -68,7 +79,30 @@ const overallTable = {
uid:
'.table-body__cell:nth-of-type(1) a .date-uid-row .link-subtext:nth-of-type(2)',
duration: '.table-body__cell:nth-of-type(3) .data-ellipsis',
owner: '.table-body__cell:nth-of-type(4) .data-ellipsis'
owner: '.table-body__cell:nth-of-type(4) .data-ellipsis',
action_menu: {
componentType: actionMenu,
structure: actionMenuStructure
},
labels: {
componentType: dropdownComponent,
structure: generateDropdownGroup(
'.table-body__cell:nth-of-type(7)',
'.chip-block span.chips_button',
'.chip-block-hidden_visible .data-ellipsis.tooltip-wrapper',
false,
false
)
},
type: {
componentType: labelComponent,
structure: generateLabelGroup(
'.table-body__cell:nth-of-type(3)',
'.data-ellipsis',
true,
'.tooltip .tooltip__text span'
)
},
}
}
}
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
9 changes: 9 additions & 0 deletions tests/features/common/page-objects/project-settings.po.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import commonTable from '../components/table.component'
import inputGroup from '../components/input-group.component'
import textAreaGroup from '../components/text-area.component'
import { generateInputGroup, generateTextAreaGroup } from '../../common-tools/common-tools'
import checkboxComponent from '../components/checkbox.component'


const tabSelector = {
Expand Down Expand Up @@ -185,6 +186,14 @@ module.exports = {
'.input-label-value'
)
),
Pull_At_Runtime_Checkbox: checkboxComponent({
root: '.settings__source [data-testid="form-field-checkbox"]',
elements: {
checkbox: 'input',
name: '',
icon: ''
}
})
},
secretsTab: {
Secrets_Table: commonTable(secretsTable),
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
Loading

0 comments on commit 1529929

Please sign in to comment.