TESTS-100: feat(tests): done Milestone filter test (#4872)

Signed-off-by: Alex Velichko <alex@hardcoreeng.com>
This commit is contained in:
Alex Velichko 2024-03-07 10:15:36 +03:00 committed by GitHub
parent 517f5a85d8
commit 4fc3a0bd5d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
16 changed files with 45 additions and 2 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -122,7 +122,7 @@ export class IssuesPage extends CommonTrackerPage {
}
if (data.milestone != null) {
await this.buttonPopupCreateNewIssueMilestone.click()
await this.selectMenuItem(this.page, data.milestone)
await this.selectAssignee(this.page, data.milestone)
}
if (data.duedate != null) {
await this.buttonPopupCreateNewIssueDuedate.click()

View File

@ -359,4 +359,46 @@ test.describe('Tracker filters tests', () => {
await issuesDetailsPage.buttonCloseIssue.click()
}
})
test('Milestone filter', async ({ page }) => {
const filterMilestoneName = 'Filter Milestone'
const milestoneIssue: NewIssue = {
title: `Issue for the Milestone filter-${generateId()}`,
description: 'Issue for the Milestone filter',
milestone: filterMilestoneName
}
const leftSideMenuPage = new LeftSideMenuPage(page)
await leftSideMenuPage.buttonTracker.click()
const issuesPage = new IssuesPage(page)
await issuesPage.modelSelectorAll.click()
await issuesPage.createNewIssue(milestoneIssue)
await test.step('Check Milestone filter for Filter Milestone', async () => {
await issuesPage.selectFilter('Milestone', filterMilestoneName)
await issuesPage.inputSearch.press('Escape')
await issuesPage.checkFilter('Milestone', 'is', '1 state')
for await (const issue of iterateLocator(issuesPage.issuesList)) {
await expect(issue.locator('div.compression-bar button span.label')).toContainText(filterMilestoneName)
}
})
await test.step('Check Milestone filter for Not selected', async () => {
await issuesPage.buttonClearFilters.click()
await issuesPage.selectFilter('Milestone', 'Not selected')
await issuesPage.inputSearch.press('Escape')
await issuesPage.checkFilter('Milestone', 'is', '1 state')
for await (const issue of iterateLocator(issuesPage.issuesList)) {
await issue.locator('span.list > a').click()
const issuesDetailsPage = new IssuesDetailsPage(page)
await expect(issuesDetailsPage.buttonMilestone).toHaveText('Milestone')
await issuesDetailsPage.buttonCloseIssue.click()
}
})
})
})

View File

@ -29,7 +29,7 @@ test.describe('Tracker related issue tests', () => {
labels: `RELATED-ISSUE-${generateId()}`,
component: 'No component',
estimation: '12',
milestone: 'Milestone',
milestone: 'No Milestone',
duedate: 'today'
}
@ -57,6 +57,7 @@ test.describe('Tracker related issue tests', () => {
await issuesDetailsPage.checkIssue({
...newIssue,
...relatedIssue,
milestone: 'Milestone',
estimation: '1d 4h',
relatedIssue: 'TSK'
})