mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-22 00:10:37 +00:00
feat(tests): TESTS-55 done Delete a Milestone test (#4184)
Signed-off-by: Alex Velichko <nestor_007@mail.ru>
This commit is contained in:
parent
916c499af3
commit
cd72d71ec5
BIN
tests/sanity-ws/000002/doc-index-state-1702401246034-0.snp.gz
Normal file
BIN
tests/sanity-ws/000002/doc-index-state-1702401246034-0.snp.gz
Normal file
Binary file not shown.
Binary file not shown.
BIN
tests/sanity-ws/000002/fulltext-blob-1702401246034-0.snp.gz
Normal file
BIN
tests/sanity-ws/000002/fulltext-blob-1702401246034-0.snp.gz
Normal file
Binary file not shown.
BIN
tests/sanity-ws/000002/fulltext-blob-data-1702401246034-1.tar.gz
Normal file
BIN
tests/sanity-ws/000002/fulltext-blob-data-1702401246034-1.tar.gz
Normal file
Binary file not shown.
BIN
tests/sanity-ws/000002/notification-1702401246034-0.snp.gz
Normal file
BIN
tests/sanity-ws/000002/notification-1702401246034-0.snp.gz
Normal file
Binary file not shown.
BIN
tests/sanity-ws/000002/notification-data-1702401246034-1.tar.gz
Normal file
BIN
tests/sanity-ws/000002/notification-data-1702401246034-1.tar.gz
Normal file
Binary file not shown.
BIN
tests/sanity-ws/000002/tracker-1702401246034-0.snp.gz
Normal file
BIN
tests/sanity-ws/000002/tracker-1702401246034-0.snp.gz
Normal file
Binary file not shown.
BIN
tests/sanity-ws/000002/tracker-data-1702401246034-1.tar.gz
Normal file
BIN
tests/sanity-ws/000002/tracker-data-1702401246034-1.tar.gz
Normal file
Binary file not shown.
BIN
tests/sanity-ws/000002/tx-1702401246034-0.snp.gz
Normal file
BIN
tests/sanity-ws/000002/tx-1702401246034-0.snp.gz
Normal file
Binary file not shown.
BIN
tests/sanity-ws/000002/tx-data-1702401246034-1.tar.gz
Normal file
BIN
tests/sanity-ws/000002/tx-data-1702401246034-1.tar.gz
Normal file
Binary file not shown.
Binary file not shown.
@ -9,6 +9,9 @@ export class MilestonesDetailsPage extends CommonTrackerPage {
|
|||||||
readonly buttonTargetDate: Locator
|
readonly buttonTargetDate: Locator
|
||||||
readonly inputMilestoneName: Locator
|
readonly inputMilestoneName: Locator
|
||||||
readonly inputDescription: Locator
|
readonly inputDescription: Locator
|
||||||
|
readonly buttonMoreActions: Locator
|
||||||
|
readonly buttonYesMoveAndDeleteMilestonePopup: Locator
|
||||||
|
readonly buttonModalOk: Locator
|
||||||
|
|
||||||
constructor (page: Page) {
|
constructor (page: Page) {
|
||||||
super(page)
|
super(page)
|
||||||
@ -18,6 +21,11 @@ export class MilestonesDetailsPage extends CommonTrackerPage {
|
|||||||
this.buttonTargetDate = page.locator('//span[text()="Target date"]/following-sibling::div[1]/button')
|
this.buttonTargetDate = page.locator('//span[text()="Target date"]/following-sibling::div[1]/button')
|
||||||
this.inputMilestoneName = page.locator('input[placeholder="Milestone name"]')
|
this.inputMilestoneName = page.locator('input[placeholder="Milestone name"]')
|
||||||
this.inputDescription = page.locator('div.inputMsg div.tiptap')
|
this.inputDescription = page.locator('div.inputMsg div.tiptap')
|
||||||
|
this.buttonMoreActions = page.locator('div.popupPanel-title > div:last-child > button:first-child')
|
||||||
|
this.buttonYesMoveAndDeleteMilestonePopup = page.locator(
|
||||||
|
'form[id="tracker:string:MoveAndDeleteMilestone"] button.primary'
|
||||||
|
)
|
||||||
|
this.buttonModalOk = page.locator('div.popup div.footer button:first-child span', { hasText: 'Ok' })
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkIssue (data: NewMilestone): Promise<void> {
|
async checkIssue (data: NewMilestone): Promise<void> {
|
||||||
@ -50,4 +58,11 @@ export class MilestonesDetailsPage extends CommonTrackerPage {
|
|||||||
await this.fillDatePopupInDays(data.targetDateInDays)
|
await this.fillDatePopupInDays(data.targetDateInDays)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async deleteMilestone (): Promise<void> {
|
||||||
|
await this.buttonMoreActions.click()
|
||||||
|
await this.selectFromDropdown(this.page, 'Delete')
|
||||||
|
await this.buttonYesMoveAndDeleteMilestonePopup.click()
|
||||||
|
await this.buttonModalOk.click()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { type Locator, type Page } from '@playwright/test'
|
import { expect, type Locator, type Page } from '@playwright/test'
|
||||||
import { NewMilestone } from './types'
|
import { NewMilestone } from './types'
|
||||||
import { CommonTrackerPage } from './common-tracker-page'
|
import { CommonTrackerPage } from './common-tracker-page'
|
||||||
|
|
||||||
@ -59,4 +59,8 @@ export class MilestonesPage extends CommonTrackerPage {
|
|||||||
async openMilestoneByName (milestoneName: string): Promise<void> {
|
async openMilestoneByName (milestoneName: string): Promise<void> {
|
||||||
await this.page.locator('div.listGrid a', { hasText: milestoneName }).click()
|
await this.page.locator('div.listGrid a', { hasText: milestoneName }).click()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async checkMilestoneNotExist (milestoneName: string): Promise<void> {
|
||||||
|
await expect(this.page.locator('div.listGrid a', { hasText: milestoneName })).toHaveCount(0)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,7 @@ test.describe('Tracker milestone tests', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
test('Edit a Milestone', async ({ page }) => {
|
test('Edit a Milestone', async ({ page }) => {
|
||||||
const commentText: 'Edit Milestone comment' = 'Edit Milestone comment'
|
const commentText = 'Edit Milestone comment'
|
||||||
const editMilestone: NewMilestone = {
|
const editMilestone: NewMilestone = {
|
||||||
name: 'Edit Milestone',
|
name: 'Edit Milestone',
|
||||||
description: 'Edit Milestone Description',
|
description: 'Edit Milestone Description',
|
||||||
@ -68,4 +68,27 @@ test.describe('Tracker milestone tests', () => {
|
|||||||
await milestonesDetailsPage.checkActivityExist('changed status in')
|
await milestonesDetailsPage.checkActivityExist('changed status in')
|
||||||
await milestonesDetailsPage.checkActivityExist('changed description in')
|
await milestonesDetailsPage.checkActivityExist('changed description in')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
test('Delete a Milestone', async ({ page }) => {
|
||||||
|
const deleteMilestone: NewMilestone = {
|
||||||
|
name: 'Delete Milestone',
|
||||||
|
description: 'Delete Milestone Description',
|
||||||
|
status: 'Canceled'
|
||||||
|
}
|
||||||
|
|
||||||
|
const leftSideMenuPage = new LeftSideMenuPage(page)
|
||||||
|
await leftSideMenuPage.buttonTracker.click()
|
||||||
|
|
||||||
|
const trackerNavigationMenuPage = new TrackerNavigationMenuPage(page)
|
||||||
|
await trackerNavigationMenuPage.openMilestonesForProject('Default')
|
||||||
|
|
||||||
|
const milestonesPage = new MilestonesPage(page)
|
||||||
|
await milestonesPage.openMilestoneByName(deleteMilestone.name)
|
||||||
|
|
||||||
|
const milestonesDetailsPage = new MilestonesDetailsPage(page)
|
||||||
|
await milestonesDetailsPage.checkIssue(deleteMilestone)
|
||||||
|
await milestonesDetailsPage.deleteMilestone()
|
||||||
|
|
||||||
|
await milestonesPage.checkMilestoneNotExist(deleteMilestone.name)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user