mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-23 08:48:01 +00:00
TESTS-101: feat(tests): done Modified by filter test (#4871)
Signed-off-by: Alex Velichko <alex@hardcoreeng.com>
This commit is contained in:
parent
b155bf0e53
commit
049c3125b6
@ -22,6 +22,7 @@ export class CommonTrackerPage extends CalendarPage {
|
|||||||
readonly inputFilterTitle: Locator
|
readonly inputFilterTitle: Locator
|
||||||
readonly buttonFilterApply: Locator
|
readonly buttonFilterApply: Locator
|
||||||
readonly buttonClearFilters: Locator
|
readonly buttonClearFilters: Locator
|
||||||
|
readonly textCategoryHeader: Locator
|
||||||
|
|
||||||
constructor (page: Page) {
|
constructor (page: Page) {
|
||||||
super(page)
|
super(page)
|
||||||
@ -45,6 +46,7 @@ export class CommonTrackerPage extends CalendarPage {
|
|||||||
this.inputFilterTitle = page.locator('div.selectPopup input[placeholder="Title"]')
|
this.inputFilterTitle = page.locator('div.selectPopup input[placeholder="Title"]')
|
||||||
this.buttonFilterApply = page.locator('div.selectPopup button[type="button"]', { hasText: 'Apply' })
|
this.buttonFilterApply = page.locator('div.selectPopup button[type="button"]', { hasText: 'Apply' })
|
||||||
this.buttonClearFilters = page.locator('button > span', { hasText: 'Clear filters' })
|
this.buttonClearFilters = page.locator('button > span', { hasText: 'Clear filters' })
|
||||||
|
this.textCategoryHeader = page.locator('div.category-container > div.categoryHeader span[class*="label"]')
|
||||||
}
|
}
|
||||||
|
|
||||||
async selectFilter (filter: string, filterSecondLevel?: string): Promise<void> {
|
async selectFilter (filter: string, filterSecondLevel?: string): Promise<void> {
|
||||||
@ -206,4 +208,8 @@ export class CommonTrackerPage extends CalendarPage {
|
|||||||
const srcset = await this.commentImg.getAttribute('srcset')
|
const srcset = await this.commentImg.getAttribute('srcset')
|
||||||
expect(srcset).toContain(fileName)
|
expect(srcset).toContain(fileName)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async checkCategoryHeader (categoryHeader: string): Promise<void> {
|
||||||
|
await expect(this.textCategoryHeader).toHaveText(categoryHeader)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,7 @@ export class IssuesDetailsPage extends CommonTrackerPage {
|
|||||||
this.buttonMilestone = page.locator('//span[text()="Milestone"]/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"]/following-sibling::div[1]/button/span')
|
this.textEstimation = page.locator('//span[text()="Estimation"]/following-sibling::div[1]/button/span')
|
||||||
this.buttonEstimation = page.locator('(//span[text()="Estimation"]/../div/button)[3]')
|
this.buttonEstimation = page.locator('(//span[text()="Estimation"]/../div/button)[3]')
|
||||||
this.buttonCreatedBy = page.locator('(//span[text()="Assignee"]/../div/button)[1]')
|
this.buttonCreatedBy = page.locator('//span[text()="Created by"]/following-sibling::div[1]/button')
|
||||||
this.buttonCloseIssue = page.locator('#btnPClose')
|
this.buttonCloseIssue = page.locator('#btnPClose')
|
||||||
this.textParentTitle = page.locator('span.issue-title')
|
this.textParentTitle = page.locator('span.issue-title')
|
||||||
this.buttonAddSubIssue = page.locator('#add-sub-issue')
|
this.buttonAddSubIssue = page.locator('#add-sub-issue')
|
||||||
|
@ -337,4 +337,26 @@ test.describe('Tracker filters tests', () => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
test('Modified by filter', async ({ page }) => {
|
||||||
|
const modifierName = 'Appleseed John'
|
||||||
|
const leftSideMenuPage = new LeftSideMenuPage(page)
|
||||||
|
await leftSideMenuPage.buttonTracker.click()
|
||||||
|
|
||||||
|
const issuesPage = new IssuesPage(page)
|
||||||
|
await issuesPage.modelSelectorAll.click()
|
||||||
|
|
||||||
|
await issuesPage.selectFilter('Modified by', modifierName)
|
||||||
|
await issuesPage.inputSearch.press('Escape')
|
||||||
|
await issuesPage.checkFilter('Modified by', 'is')
|
||||||
|
|
||||||
|
for await (const issue of iterateLocator(issuesPage.issuesList)) {
|
||||||
|
await issue.locator('span.list > a').click()
|
||||||
|
|
||||||
|
const issuesDetailsPage = new IssuesDetailsPage(page)
|
||||||
|
await expect(issuesDetailsPage.buttonCreatedBy).toHaveText(modifierName)
|
||||||
|
|
||||||
|
await issuesDetailsPage.buttonCloseIssue.click()
|
||||||
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user