mirror of
https://github.com/hcengineering/platform.git
synced 2025-06-07 16:30:49 +00:00
feat(tests): TESTS-45 done Move to project test (#4203)
Signed-off-by: Alex Velichko <nestor_007@mail.ru>
This commit is contained in:
parent
868fc0aed6
commit
818a5c829a
BIN
tests/sanity-ws/000002/activity-1702587939180-0.snp.gz
Normal file
BIN
tests/sanity-ws/000002/activity-1702587939180-0.snp.gz
Normal file
Binary file not shown.
BIN
tests/sanity-ws/000002/activity-data-1702587939180-1.tar.gz
Normal file
BIN
tests/sanity-ws/000002/activity-data-1702587939180-1.tar.gz
Normal file
Binary file not shown.
BIN
tests/sanity-ws/000002/doc-index-state-1702587939180-0.snp.gz
Normal file
BIN
tests/sanity-ws/000002/doc-index-state-1702587939180-0.snp.gz
Normal file
Binary file not shown.
Binary file not shown.
BIN
tests/sanity-ws/000002/fulltext-blob-1702587939180-0.snp.gz
Normal file
BIN
tests/sanity-ws/000002/fulltext-blob-1702587939180-0.snp.gz
Normal file
Binary file not shown.
BIN
tests/sanity-ws/000002/fulltext-blob-data-1702587939180-1.tar.gz
Normal file
BIN
tests/sanity-ws/000002/fulltext-blob-data-1702587939180-1.tar.gz
Normal file
Binary file not shown.
BIN
tests/sanity-ws/000002/space-1702587939180-0.snp.gz
Normal file
BIN
tests/sanity-ws/000002/space-1702587939180-0.snp.gz
Normal file
Binary file not shown.
BIN
tests/sanity-ws/000002/space-data-1702587939180-1.tar.gz
Normal file
BIN
tests/sanity-ws/000002/space-data-1702587939180-1.tar.gz
Normal file
Binary file not shown.
BIN
tests/sanity-ws/000002/tx-1702587939180-0.snp.gz
Normal file
BIN
tests/sanity-ws/000002/tx-1702587939180-0.snp.gz
Normal file
Binary file not shown.
BIN
tests/sanity-ws/000002/tx-data-1702587939180-1.tar.gz
Normal file
BIN
tests/sanity-ws/000002/tx-data-1702587939180-1.tar.gz
Normal file
Binary file not shown.
Binary file not shown.
@ -8,6 +8,9 @@ export class CommonTrackerPage extends CalendarPage {
|
|||||||
readonly buttonSendComment: Locator
|
readonly buttonSendComment: Locator
|
||||||
readonly textComment: Locator
|
readonly textComment: Locator
|
||||||
readonly textActivity: Locator
|
readonly textActivity: Locator
|
||||||
|
readonly buttonSpaceSelectorMoveIssuesModal: Locator
|
||||||
|
readonly buttonMoveIssuesModal: Locator
|
||||||
|
readonly buttonKeepOriginalMoveIssuesModal: Locator
|
||||||
|
|
||||||
constructor (page: Page) {
|
constructor (page: Page) {
|
||||||
super(page)
|
super(page)
|
||||||
@ -17,6 +20,11 @@ export class CommonTrackerPage extends CalendarPage {
|
|||||||
this.buttonSendComment = page.locator('g#Send')
|
this.buttonSendComment = page.locator('g#Send')
|
||||||
this.textComment = page.locator('div.showMore-content p')
|
this.textComment = page.locator('div.showMore-content p')
|
||||||
this.textActivity = page.locator('div.header')
|
this.textActivity = page.locator('div.header')
|
||||||
|
this.buttonSpaceSelectorMoveIssuesModal = page.locator(
|
||||||
|
'form[id="tracker:string:MoveIssues"] button[id="space.selector"]'
|
||||||
|
)
|
||||||
|
this.buttonMoveIssuesModal = page.locator('form[id="tracker:string:MoveIssues"] button[type="submit"]')
|
||||||
|
this.buttonKeepOriginalMoveIssuesModal = page.locator('form[id="tracker:string:MoveIssues"] span.toggle-switch')
|
||||||
}
|
}
|
||||||
|
|
||||||
async selectFilter (filter: string, filterSecondLevel?: string): Promise<void> {
|
async selectFilter (filter: string, filterSecondLevel?: string): Promise<void> {
|
||||||
@ -79,4 +87,13 @@ export class CommonTrackerPage extends CalendarPage {
|
|||||||
async checkActivityExist (activity: string): Promise<void> {
|
async checkActivityExist (activity: string): Promise<void> {
|
||||||
await expect(this.textActivity.filter({ hasText: activity })).toBeVisible()
|
await expect(this.textActivity.filter({ hasText: activity })).toBeVisible()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async fillMoveIssuesModal (newProjectName: string, keepOriginalAttributes: boolean = false): Promise<void> {
|
||||||
|
await this.buttonSpaceSelectorMoveIssuesModal.click()
|
||||||
|
await this.selectMenuItem(this.page, newProjectName)
|
||||||
|
if (keepOriginalAttributes) {
|
||||||
|
await this.buttonKeepOriginalMoveIssuesModal.click()
|
||||||
|
}
|
||||||
|
await this.buttonMoveIssuesModal.click({ timeout: 100 })
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,9 +36,12 @@ export class TrackerNavigationMenuPage extends CommonPage {
|
|||||||
|
|
||||||
async openIssuesForProject (projectName: string): Promise<void> {
|
async openIssuesForProject (projectName: string): Promise<void> {
|
||||||
await this.page
|
await this.page
|
||||||
.locator(`div[class*="antiNav-element"] a[href$="issues"][href*="${projectName}"]> div > span`, {
|
.locator(
|
||||||
hasText: 'Issues'
|
`xpath=//div[contains(@class, "parent")]/span[text()="${projectName}"]/../following-sibling::div[1]/a[contains(@href, "issues")]`,
|
||||||
})
|
{
|
||||||
|
hasText: 'Issues'
|
||||||
|
}
|
||||||
|
)
|
||||||
.click()
|
.click()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -193,4 +193,37 @@ test.describe('Tracker issue tests', () => {
|
|||||||
await issuesPage.checkParentIssue(newIssue.title, parentIssue.title)
|
await issuesPage.checkParentIssue(newIssue.title, parentIssue.title)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
test('Move to project', async ({ page }) => {
|
||||||
|
const secondProjectName = 'Second Project'
|
||||||
|
const moveIssue: NewIssue = {
|
||||||
|
title: `Issue to another project-${generateId()}`,
|
||||||
|
description: 'Issue to move to another project'
|
||||||
|
}
|
||||||
|
|
||||||
|
const leftSideMenuPage = new LeftSideMenuPage(page)
|
||||||
|
await leftSideMenuPage.buttonTracker.click()
|
||||||
|
|
||||||
|
const trackerNavigationMenuPage = new TrackerNavigationMenuPage(page)
|
||||||
|
await trackerNavigationMenuPage.openIssuesForProject('Default')
|
||||||
|
|
||||||
|
const issuesPage = new IssuesPage(page)
|
||||||
|
await issuesPage.modelSelectorAll.click()
|
||||||
|
await issuesPage.createNewIssue(moveIssue)
|
||||||
|
await issuesPage.searchIssueByName(moveIssue.title)
|
||||||
|
await issuesPage.openIssueByName(moveIssue.title)
|
||||||
|
|
||||||
|
const issuesDetailsPage = new IssuesDetailsPage(page)
|
||||||
|
await issuesDetailsPage.moreActionOnIssue('Move to project')
|
||||||
|
await issuesDetailsPage.fillMoveIssuesModal(secondProjectName, true)
|
||||||
|
|
||||||
|
await trackerNavigationMenuPage.openIssuesForProject(secondProjectName)
|
||||||
|
|
||||||
|
await issuesPage.openIssueByName(moveIssue.title)
|
||||||
|
await issuesDetailsPage.checkIssue({
|
||||||
|
...moveIssue
|
||||||
|
})
|
||||||
|
// await issuesDetailsPage.checkActivityExist('changed project in')
|
||||||
|
// await issuesDetailsPage.checkActivityExist('changed number in')
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user