TESTS-99: feat(tests): done Component filter test (#4162)

Signed-off-by: Alex Velichko <nestor_007@mail.ru>
This commit is contained in:
Alex Velichko 2023-12-11 12:15:26 +03:00 committed by GitHub
parent 7a275dc5b6
commit c6853c123f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
62 changed files with 24 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

@ -30,8 +30,8 @@ export class IssuesDetailsPage extends CommonTrackerPage {
this.buttonAssignee = page.locator('(//span[text()="Assignee"]/../div/button)[2]')
this.textLabels = page.locator('div.step-container div.listitems-container')
this.buttonAddLabel = page.locator('button.tag-button')
this.buttonComponent = page.locator('(//span[text()="Component"]/../div/div/button)[2]')
this.buttonMilestone = page.locator('(//span[text()="Milestone"]/../div/div/button)[3]')
this.buttonComponent = page.locator('//span[text()="Component"]/following-sibling::div[1]/div/button')
this.buttonMilestone = page.locator('//span[text()="Milestone"]/following-sibling::div[1]/div/button')
this.textEstimation = page.locator('(//span[text()="Estimation"]/../div/button)[4]')
this.buttonEstimation = page.locator('(//span[text()="Estimation"]/../div/button)[3]')
this.buttonCreatedBy = page.locator('(//span[text()="Assignee"]/../div/button)[1]')

View File

@ -265,4 +265,26 @@ test.describe('Tracker filters tests', () => {
await issuesDetailsPage.buttonCloseIssue.click()
}
})
test('Component filter', async ({ page }) => {
const defaultComponent = 'Default component'
const leftSideMenuPage = new LeftSideMenuPage(page)
await leftSideMenuPage.buttonTracker.click()
const issuesPage = new IssuesPage(page)
await issuesPage.modelSelectorAll.click()
await issuesPage.selectFilter('Component', defaultComponent)
await issuesPage.inputSearch.press('Escape')
await issuesPage.checkFilter('Component', 'is')
for await (const issue of iterateLocator(issuesPage.issuesList)) {
await issue.locator('span.list > a').click()
const issuesDetailsPage = new IssuesDetailsPage(page)
await expect(issuesDetailsPage.buttonComponent).toHaveText(defaultComponent)
await issuesDetailsPage.buttonCloseIssue.click()
}
})
})