mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-22 21:50:34 +03:00
TESTS-182: feat(tests): done Create sub-issue from template test (#4711)
Signed-off-by: Alex Velichko <alex@hardcoreeng.com>
This commit is contained in:
parent
20b4854dcc
commit
2955033b68
@ -101,14 +101,14 @@ export class CommonRecruitingPage extends CalendarPage {
|
||||
async checkSocialLinks (link: string, value: string): Promise<void> {
|
||||
switch (link) {
|
||||
case 'Phone':
|
||||
await expect(this.buttonContactPhone).toBeVisible()
|
||||
await expect(this.buttonContactPhone).toBeEnabled()
|
||||
await this.buttonContactPhone.click()
|
||||
await expect(this.inputSocialValue).toHaveValue(value)
|
||||
await this.buttonSocialSave.click()
|
||||
break
|
||||
case 'Email':
|
||||
await expect(this.buttonContactEmail).toBeVisible()
|
||||
await this.buttonContactEmail.click()
|
||||
await expect(this.buttonContactEmail.first()).toBeEnabled()
|
||||
await this.buttonContactEmail.first().click()
|
||||
await expect(this.inputSocialValue).toHaveValue(value)
|
||||
await this.buttonSocialSave.click()
|
||||
break
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { test } from '@playwright/test'
|
||||
import { expect, test } from '@playwright/test'
|
||||
import { IssuesPage } from '../model/tracker/issues-page'
|
||||
import { generateId, PlatformSetting, PlatformURI } from '../utils'
|
||||
import {
|
||||
@ -139,4 +139,39 @@ test.describe('Tracker sub-issues tests', () => {
|
||||
await issuesPage.searchIssueByName(deleteSubIssue.title)
|
||||
await issuesPage.checkIssueNotExist(deleteSubIssue.title)
|
||||
})
|
||||
|
||||
test('Create sub-issue from template', async ({ page }) => {
|
||||
const parentIssue: NewIssue = {
|
||||
title: `Parent issue for the Create sub-issue from template-${generateId()}`,
|
||||
description: 'Create sub-issue from template'
|
||||
}
|
||||
const subIssue: NewIssue = {
|
||||
title: `Create sub-issue from template-${generateId()}`,
|
||||
description: 'Create sub-issue from template'
|
||||
}
|
||||
const templateName = 'New Issue'
|
||||
|
||||
const leftSideMenuPage = new LeftSideMenuPage(page)
|
||||
await leftSideMenuPage.buttonTracker.click()
|
||||
|
||||
const issuesPage = new IssuesPage(page)
|
||||
await issuesPage.modelSelectorAll.click()
|
||||
await issuesPage.createNewIssue(parentIssue)
|
||||
await issuesPage.searchIssueByName(parentIssue.title)
|
||||
await issuesPage.openIssueByName(parentIssue.title)
|
||||
|
||||
const issuesDetailsPage = new IssuesDetailsPage(page)
|
||||
await issuesDetailsPage.moreActionOnIssue('Add sub-issue...')
|
||||
await issuesPage.selectTemplate(templateName)
|
||||
await expect(issuesPage.buttonPopupCreateNewIssueTemplate).toHaveText(templateName)
|
||||
await issuesPage.fillNewIssueForm(subIssue)
|
||||
await issuesPage.buttonCreateIssue.click()
|
||||
|
||||
await issuesDetailsPage.openSubIssueByName(subIssue.title)
|
||||
await issuesDetailsPage.waitDetailsOpened(subIssue.title)
|
||||
await issuesDetailsPage.checkIssue({
|
||||
...subIssue,
|
||||
parentIssue: parentIssue.title
|
||||
})
|
||||
})
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user