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:
Alex Velichko 2024-02-12 11:58:30 +03:00 committed by GitHub
parent 318f4eab1a
commit 597caba6bc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 37 additions and 0 deletions

View File

@ -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()
}
}

View File

@ -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)
})
})