Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TESTS-179: feat(tests): done Check the changed description activity test #4598

Merged
merged 3 commits into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions tests/sanity/tests/model/tracker/issues-details-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}
24 changes: 24 additions & 0 deletions tests/sanity/tests/tracker/issues.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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