mirror of
https://github.com/hcengineering/platform.git
synced 2025-01-08 21:27:45 +03:00
TESTS-179: feat(tests): done Check the changed description activity test (#4598)
Signed-off-by: Alex Velichko <alex@hardcoreeng.com>
This commit is contained in:
parent
318f4eab1a
commit
597caba6bc
@ -147,4 +147,17 @@ export class IssuesDetailsPage extends CommonTrackerPage {
|
||||
async checkCollaboratorsCount (count: string): Promise<void> {
|
||||
await expect(this.buttonCollaborators).toHaveText(count)
|
||||
}
|
||||
|
||||
async addToDescription (description: string): Promise<void> {
|
||||
const existDescription = await this.inputDescription.textContent()
|
||||
await this.inputDescription.fill(`${existDescription}\n${description}`)
|
||||
}
|
||||
|
||||
async openShowMoreLink (activityHeader: string, position: number = 0): Promise<void> {
|
||||
await this.textActivity.filter({ hasText: activityHeader }).locator('xpath=..').locator('div.showMore').click()
|
||||
}
|
||||
|
||||
async checkComparingTextAdded (text: string): Promise<void> {
|
||||
await expect(this.page.locator('span.text-editor-highlighted-node-add', { hasText: text }).first()).toBeVisible()
|
||||
}
|
||||
}
|
||||
|
@ -317,4 +317,28 @@ test.describe('Tracker issue tests', () => {
|
||||
await issuesPage.searchIssueByName(deleteIssue.title)
|
||||
await issuesPage.checkIssueNotExist(deleteIssue.title)
|
||||
})
|
||||
|
||||
test('Check the changed description activity', async ({ page }) => {
|
||||
const additionalDescription = 'New row for the additional description'
|
||||
const changedDescriptionIssue: NewIssue = {
|
||||
title: `Check the changed description activity-${generateId()}`,
|
||||
description: 'Check the changed description activity description'
|
||||
}
|
||||
|
||||
const leftSideMenuPage = new LeftSideMenuPage(page)
|
||||
await leftSideMenuPage.buttonTracker.click()
|
||||
|
||||
const issuesPage = new IssuesPage(page)
|
||||
await issuesPage.modelSelectorAll.click()
|
||||
await issuesPage.createNewIssue(changedDescriptionIssue)
|
||||
await issuesPage.searchIssueByName(changedDescriptionIssue.title)
|
||||
await issuesPage.openIssueByName(changedDescriptionIssue.title)
|
||||
|
||||
const issuesDetailsPage = new IssuesDetailsPage(page)
|
||||
await issuesDetailsPage.waitDetailsOpened(changedDescriptionIssue.title)
|
||||
await issuesDetailsPage.checkIssue(changedDescriptionIssue)
|
||||
await issuesDetailsPage.addToDescription(additionalDescription)
|
||||
await issuesDetailsPage.openShowMoreLink('changed description')
|
||||
await issuesDetailsPage.checkComparingTextAdded(additionalDescription)
|
||||
})
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user