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:
Alex Velichko 2024-02-20 11:13:04 +03:00 committed by GitHub
parent 20b4854dcc
commit 2955033b68
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 39 additions and 4 deletions

View File

@ -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

View File

@ -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
})
})
})