mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-26 04:23:58 +03:00
TESTS-59: feat(tests): done Create an Issue from template test (#4212)
Signed-off-by: Alex Velichko <nestor_007@mail.ru>
This commit is contained in:
parent
5803d8c5aa
commit
cb53ddf26b
BIN
tests/sanity-ws/000003/activity-1702825379347-0.snp.gz
Normal file
BIN
tests/sanity-ws/000003/activity-1702825379347-0.snp.gz
Normal file
Binary file not shown.
BIN
tests/sanity-ws/000003/activity-data-1702825379347-1.tar.gz
Normal file
BIN
tests/sanity-ws/000003/activity-data-1702825379347-1.tar.gz
Normal file
Binary file not shown.
BIN
tests/sanity-ws/000003/doc-index-state-1702825379347-0.snp.gz
Normal file
BIN
tests/sanity-ws/000003/doc-index-state-1702825379347-0.snp.gz
Normal file
Binary file not shown.
Binary file not shown.
BIN
tests/sanity-ws/000003/fulltext-blob-1702825379347-0.snp.gz
Normal file
BIN
tests/sanity-ws/000003/fulltext-blob-1702825379347-0.snp.gz
Normal file
Binary file not shown.
BIN
tests/sanity-ws/000003/fulltext-blob-data-1702825379347-1.tar.gz
Normal file
BIN
tests/sanity-ws/000003/fulltext-blob-data-1702825379347-1.tar.gz
Normal file
Binary file not shown.
BIN
tests/sanity-ws/000003/tracker-1702825379347-0.snp.gz
Normal file
BIN
tests/sanity-ws/000003/tracker-1702825379347-0.snp.gz
Normal file
Binary file not shown.
BIN
tests/sanity-ws/000003/tracker-data-1702825379347-1.tar.gz
Normal file
BIN
tests/sanity-ws/000003/tracker-data-1702825379347-1.tar.gz
Normal file
Binary file not shown.
BIN
tests/sanity-ws/000003/tx-1702825379347-0.snp.gz
Normal file
BIN
tests/sanity-ws/000003/tx-1702825379347-0.snp.gz
Normal file
Binary file not shown.
BIN
tests/sanity-ws/000003/tx-data-1702825379347-1.tar.gz
Normal file
BIN
tests/sanity-ws/000003/tx-data-1702825379347-1.tar.gz
Normal file
Binary file not shown.
Binary file not shown.
@ -29,6 +29,7 @@ export class IssuesPage extends CommonTrackerPage {
|
||||
readonly buttonClearFilers: Locator
|
||||
readonly issuesList: Locator
|
||||
readonly buttonPopupCreateNewIssueParent: Locator
|
||||
readonly buttonPopupCreateNewIssueTemplate: Locator
|
||||
|
||||
constructor (page: Page) {
|
||||
super(page)
|
||||
@ -68,6 +69,9 @@ export class IssuesPage extends CommonTrackerPage {
|
||||
this.buttonClearFilers = page.locator('div.search-start > div:first-child button')
|
||||
this.issuesList = page.locator('div.listGrid')
|
||||
this.buttonPopupCreateNewIssueParent = page.locator('div#parentissue-editor button')
|
||||
this.buttonPopupCreateNewIssueTemplate = page.locator(
|
||||
'form[id="tracker:string:NewIssue"] div[class*="title"] > div > button'
|
||||
)
|
||||
}
|
||||
|
||||
async createNewIssue (data: NewIssue): Promise<void> {
|
||||
@ -179,4 +183,9 @@ export class IssuesPage extends CommonTrackerPage {
|
||||
expect(href).toContain(priorityName)
|
||||
}
|
||||
}
|
||||
|
||||
async selectTemplate (templateName: string): Promise<void> {
|
||||
await this.buttonPopupCreateNewIssueTemplate.click()
|
||||
await this.selectMenuItem(this.page, templateName)
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { test } from '@playwright/test'
|
||||
import { expect, test } from '@playwright/test'
|
||||
import { generateId, PlatformSetting, PlatformURI } from '../utils'
|
||||
import { LeftSideMenuPage } from '../model/left-side-menu-page'
|
||||
import { IssuesPage } from '../model/tracker/issues-page'
|
||||
@ -255,4 +255,36 @@ test.describe('Tracker issue tests', () => {
|
||||
await issuesDetailsPage.waitDetailsOpened(commentIssue.title)
|
||||
await issuesDetailsPage.checkCommentExist(commentText)
|
||||
})
|
||||
|
||||
test('Create an Issue from template', async ({ page }) => {
|
||||
const templateName = 'New Issue'
|
||||
const newIssue: NewIssue = {
|
||||
title: `New Issue-${generateId(4)}`,
|
||||
description: 'New Issue',
|
||||
priority: 'Medium',
|
||||
estimation: '1d',
|
||||
component: 'Default component',
|
||||
milestone: 'Edit Milestone'
|
||||
}
|
||||
|
||||
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.buttonCreateNewIssue.click()
|
||||
await issuesPage.selectTemplate(templateName)
|
||||
await expect(issuesPage.buttonPopupCreateNewIssueTemplate).toHaveText(templateName)
|
||||
await issuesPage.fillNewIssueForm({ description: newIssue.description, title: newIssue.title })
|
||||
await issuesPage.buttonCreateIssue.click()
|
||||
|
||||
await issuesPage.searchIssueByName(newIssue.title)
|
||||
await issuesPage.openIssueByName(newIssue.title)
|
||||
|
||||
const issuesDetailsPage = new IssuesDetailsPage(page)
|
||||
await issuesDetailsPage.checkIssue(newIssue)
|
||||
})
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user