mirror of
https://github.com/hcengineering/platform.git
synced 2025-06-01 21:31:04 +00:00
TESTS-196: feat(test): done Remove relation be editing issue details test (#4755)
Signed-off-by: Alex Velichko <alex@hardcoreeng.com>
This commit is contained in:
parent
c71e5c5192
commit
748ab24bb7
@ -25,6 +25,7 @@ export class IssuesDetailsPage extends CommonTrackerPage {
|
|||||||
readonly inputSearchOnSearchForIssueModal: Locator
|
readonly inputSearchOnSearchForIssueModal: Locator
|
||||||
readonly textBlockedBy: Locator
|
readonly textBlockedBy: Locator
|
||||||
readonly textBlocks: Locator
|
readonly textBlocks: Locator
|
||||||
|
readonly buttonRemoveBlockedBy: Locator
|
||||||
|
|
||||||
constructor (page: Page) {
|
constructor (page: Page) {
|
||||||
super(page)
|
super(page)
|
||||||
@ -50,6 +51,7 @@ export class IssuesDetailsPage extends CommonTrackerPage {
|
|||||||
this.inputSearchOnSearchForIssueModal = page.locator('div.popup input[type="text"]')
|
this.inputSearchOnSearchForIssueModal = page.locator('div.popup input[type="text"]')
|
||||||
this.textBlockedBy = page.locator('//span[text()="Blocked by"]/following-sibling::div[1]/div/div/button/span')
|
this.textBlockedBy = page.locator('//span[text()="Blocked by"]/following-sibling::div[1]/div/div/button/span')
|
||||||
this.textBlocks = page.locator('//span[text()="Blocks"]/following-sibling::div[1]/div/div/button/span')
|
this.textBlocks = page.locator('//span[text()="Blocks"]/following-sibling::div[1]/div/div/button/span')
|
||||||
|
this.buttonRemoveBlockedBy = page.locator('//span[text()="Blocked by"]/following-sibling::div[1]/div/button')
|
||||||
}
|
}
|
||||||
|
|
||||||
async editIssue (data: Issue): Promise<void> {
|
async editIssue (data: Issue): Promise<void> {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { test } from '@playwright/test'
|
import { expect, test } from '@playwright/test'
|
||||||
import { IssuesPage } from '../model/tracker/issues-page'
|
import { IssuesPage } from '../model/tracker/issues-page'
|
||||||
import { generateId, PlatformSetting, PlatformURI } from '../utils'
|
import { generateId, PlatformSetting, PlatformURI } from '../utils'
|
||||||
import { NewIssue } from '../model/tracker/types'
|
import { NewIssue } from '../model/tracker/types'
|
||||||
@ -154,4 +154,50 @@ test.describe('Relations', () => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
test('Remove relation be editing issue details', async ({ page }) => {
|
||||||
|
const firstIssue: NewIssue = {
|
||||||
|
title: `First. Remove relation be editing issue details-${generateId()}`,
|
||||||
|
description: 'First. Remove relation be editing issue details'
|
||||||
|
}
|
||||||
|
const secondIssue: NewIssue = {
|
||||||
|
title: `Second. Remove relation be editing issue details-${generateId()}`,
|
||||||
|
description: 'Second. Remove relation be editing issue details'
|
||||||
|
}
|
||||||
|
const leftSideMenuPage = new LeftSideMenuPage(page)
|
||||||
|
await leftSideMenuPage.buttonTracker.click()
|
||||||
|
|
||||||
|
const secondIssueId = await prepareNewIssueStep(page, secondIssue)
|
||||||
|
await prepareNewIssueStep(page, firstIssue)
|
||||||
|
|
||||||
|
const issuesPage = new IssuesPage(page)
|
||||||
|
await issuesPage.openIssueByName(firstIssue.title)
|
||||||
|
|
||||||
|
const issuesDetailsPage = new IssuesDetailsPage(page)
|
||||||
|
await test.step('Reference another issue... and check issue description', async () => {
|
||||||
|
await issuesDetailsPage.waitDetailsOpened(firstIssue.title)
|
||||||
|
await issuesDetailsPage.moreActionOnIssueWithSecondLevel('Relations', 'Mark as blocked by...')
|
||||||
|
await issuesDetailsPage.fillSearchForIssueModal(secondIssue.title)
|
||||||
|
|
||||||
|
await issuesDetailsPage.waitDetailsOpened(firstIssue.title)
|
||||||
|
await issuesDetailsPage.checkIssue({
|
||||||
|
...firstIssue,
|
||||||
|
blockedBy: secondIssueId
|
||||||
|
})
|
||||||
|
|
||||||
|
// delete here
|
||||||
|
await issuesDetailsPage.buttonRemoveBlockedBy.click()
|
||||||
|
await expect(issuesDetailsPage.textBlockedBy).toBeVisible({ visible: false })
|
||||||
|
})
|
||||||
|
|
||||||
|
await test.step('Check the second issue description', async () => {
|
||||||
|
const trackerNavigationMenuPage = new TrackerNavigationMenuPage(page)
|
||||||
|
await trackerNavigationMenuPage.openIssuesForProject('Default')
|
||||||
|
|
||||||
|
await issuesPage.searchIssueByName(secondIssue.title)
|
||||||
|
await issuesPage.openIssueByName(secondIssue.title)
|
||||||
|
await issuesDetailsPage.waitDetailsOpened(secondIssue.title)
|
||||||
|
await expect(issuesDetailsPage.textBlocks).toBeVisible({ visible: false })
|
||||||
|
})
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user