mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-24 01:07:50 +00:00
Added and fixed UI tests (#6276)
Signed-off-by: Alexander Platov <alexander.platov@hardcoreeng.com>
This commit is contained in:
parent
954a3bb9e7
commit
c577282192
@ -75,12 +75,20 @@
|
|||||||
icon={action.icon}
|
icon={action.icon}
|
||||||
kind={'tertiary'}
|
kind={'tertiary'}
|
||||||
size={'extra-small'}
|
size={'extra-small'}
|
||||||
|
dataId={action.label}
|
||||||
tooltip={{ label: action.label, direction: 'top' }}
|
tooltip={{ label: action.label, direction: 'top' }}
|
||||||
on:click={(evt) => action.action({}, evt)}
|
on:click={(evt) => action.action({}, evt)}
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
{/each}
|
{/each}
|
||||||
<ButtonIcon icon={IconMoreH} kind={'tertiary'} size={'extra-small'} pressed={hovered} on:click={onMenuClick} />
|
<ButtonIcon
|
||||||
|
icon={IconMoreH}
|
||||||
|
kind={'tertiary'}
|
||||||
|
size={'extra-small'}
|
||||||
|
pressed={hovered}
|
||||||
|
dataId={'btnDocMore'}
|
||||||
|
on:click={onMenuClick}
|
||||||
|
/>
|
||||||
</svelte:fragment>
|
</svelte:fragment>
|
||||||
<svelte:fragment slot="dropbox">
|
<svelte:fragment slot="dropbox">
|
||||||
<slot />
|
<slot />
|
||||||
|
@ -416,6 +416,7 @@ test.describe('channel tests', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
test('Checking backlinks in the Chat', async ({ browser, page }) => {
|
test('Checking backlinks in the Chat', async ({ browser, page }) => {
|
||||||
|
await api.createAccount(newUser2.email, newUser2.password, newUser2.firstName, newUser2.lastName)
|
||||||
await leftSideMenuPage.openProfileMenu()
|
await leftSideMenuPage.openProfileMenu()
|
||||||
await leftSideMenuPage.inviteToWorkspace()
|
await leftSideMenuPage.inviteToWorkspace()
|
||||||
await leftSideMenuPage.getInviteLink()
|
await leftSideMenuPage.getInviteLink()
|
||||||
@ -424,10 +425,10 @@ test.describe('channel tests', () => {
|
|||||||
const page2 = await browser.newPage()
|
const page2 = await browser.newPage()
|
||||||
const leftSideMenuPageSecond = new LeftSideMenuPage(page2)
|
const leftSideMenuPageSecond = new LeftSideMenuPage(page2)
|
||||||
const channelPageSecond = new ChannelPage(page2)
|
const channelPageSecond = new ChannelPage(page2)
|
||||||
await api.createAccount(newUser2.email, newUser2.password, newUser2.firstName, newUser2.lastName)
|
|
||||||
await page2.goto(linkText ?? '')
|
await page2.goto(linkText ?? '')
|
||||||
const joinPage = new SignInJoinPage(page2)
|
const joinPage = new SignInJoinPage(page2)
|
||||||
await joinPage.join(newUser2)
|
await joinPage.join(newUser2)
|
||||||
|
await leftSideMenuPageSecond.clickChunter()
|
||||||
|
|
||||||
await leftSideMenuPage.clickChunter()
|
await leftSideMenuPage.clickChunter()
|
||||||
await channelPage.clickChannel('general')
|
await channelPage.clickChannel('general')
|
||||||
@ -435,7 +436,6 @@ test.describe('channel tests', () => {
|
|||||||
await channelPage.sendMention(mentionName)
|
await channelPage.sendMention(mentionName)
|
||||||
await channelPage.checkMessageExist(`@${mentionName}`, true, `@${mentionName}`)
|
await channelPage.checkMessageExist(`@${mentionName}`, true, `@${mentionName}`)
|
||||||
|
|
||||||
await leftSideMenuPageSecond.clickChunter()
|
|
||||||
await channelPageSecond.clickChannel('general')
|
await channelPageSecond.clickChannel('general')
|
||||||
await channelPageSecond.checkMessageExist(`@${mentionName}`, true, `@${mentionName}`)
|
await channelPageSecond.checkMessageExist(`@${mentionName}`, true, `@${mentionName}`)
|
||||||
await page2.close()
|
await page2.close()
|
||||||
|
@ -69,11 +69,7 @@ test.describe('Collaborative test for issue', () => {
|
|||||||
await issuesPageSecond.openIssueByName(newIssue.title)
|
await issuesPageSecond.openIssueByName(newIssue.title)
|
||||||
|
|
||||||
const issuesDetailsPageSecond = new IssuesDetailsPage(userSecondPage)
|
const issuesDetailsPageSecond = new IssuesDetailsPage(userSecondPage)
|
||||||
await issuesDetailsPageSecond.checkIssue({
|
await issuesDetailsPageSecond.checkIssue(newIssue)
|
||||||
...newIssue,
|
|
||||||
milestone: 'Milestone',
|
|
||||||
estimation: '2h'
|
|
||||||
})
|
|
||||||
|
|
||||||
await closePages()
|
await closePages()
|
||||||
})
|
})
|
||||||
@ -176,7 +172,7 @@ test.describe('Collaborative test for issue', () => {
|
|||||||
await issuesPageSecond.openIssueByName(issue.title)
|
await issuesPageSecond.openIssueByName(issue.title)
|
||||||
|
|
||||||
const issuesDetailsPageSecond = new IssuesDetailsPage(userSecondPage)
|
const issuesDetailsPageSecond = new IssuesDetailsPage(userSecondPage)
|
||||||
await issuesDetailsPageSecond.checkIssue({ ...issue })
|
await issuesDetailsPageSecond.checkIssue(issue)
|
||||||
})
|
})
|
||||||
|
|
||||||
await closePages()
|
await closePages()
|
||||||
|
@ -150,4 +150,23 @@ test.describe('Documents tests', () => {
|
|||||||
await documentContentPage.addLinkToText(contentLink, 'test/link/123456')
|
await documentContentPage.addLinkToText(contentLink, 'test/link/123456')
|
||||||
await documentContentPage.checkLinkInTheText(contentLink, 'test/link/123456')
|
await documentContentPage.checkLinkInTheText(contentLink, 'test/link/123456')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
test('Locked document and checking URL', async ({ page, context }) => {
|
||||||
|
const newDocument: NewDocument = {
|
||||||
|
title: `New Document-${generateId()}`,
|
||||||
|
space: 'Default'
|
||||||
|
}
|
||||||
|
|
||||||
|
await leftSideMenuPage.clickDocuments()
|
||||||
|
await documentsPage.clickOnButtonCreateDocument()
|
||||||
|
await documentsPage.createDocument(newDocument)
|
||||||
|
await documentsPage.selectMoreActionOfDocument(newDocument.title, 'Lock')
|
||||||
|
await documentsPage.selectMoreActionOfDocument(newDocument.title, 'Copy document URL to clipboard')
|
||||||
|
await context.grantPermissions(['clipboard-read'])
|
||||||
|
const handle = await page.evaluateHandle(() => navigator.clipboard.readText())
|
||||||
|
const clipboardContent = await handle.jsonValue()
|
||||||
|
await page.goto(`${clipboardContent}`)
|
||||||
|
await documentContentPage.checkDocumentTitle(newDocument.title)
|
||||||
|
await documentContentPage.checkDocumentLocked()
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { test } from '@playwright/test'
|
import { test } from '@playwright/test'
|
||||||
import { PlatformURI, generateTestData } from '../utils'
|
import { PlatformURI, generateTestData, getTimeForPlanner, attachScreenshot } from '../utils'
|
||||||
import { LeftSideMenuPage } from '../model/left-side-menu-page'
|
import { LeftSideMenuPage } from '../model/left-side-menu-page'
|
||||||
import { ApiEndpoint } from '../API/Api'
|
import { ApiEndpoint } from '../API/Api'
|
||||||
import { LoginPage } from '../model/login-page'
|
import { LoginPage } from '../model/login-page'
|
||||||
@ -13,6 +13,8 @@ import { ChannelPage } from '../model/channel-page'
|
|||||||
import { UserProfilePage } from '../model/profile/user-profile-page'
|
import { UserProfilePage } from '../model/profile/user-profile-page'
|
||||||
import { MenuItems, NotificationsPage } from '../model/profile/notifications-page'
|
import { MenuItems, NotificationsPage } from '../model/profile/notifications-page'
|
||||||
import { SelectWorkspacePage } from '../model/select-workspace-page'
|
import { SelectWorkspacePage } from '../model/select-workspace-page'
|
||||||
|
import { PlanningPage } from '../model/planning/planning-page'
|
||||||
|
import { TeamPage } from '../model/team-page'
|
||||||
|
|
||||||
test.describe('Inbox tests', () => {
|
test.describe('Inbox tests', () => {
|
||||||
let leftSideMenuPage: LeftSideMenuPage
|
let leftSideMenuPage: LeftSideMenuPage
|
||||||
@ -49,11 +51,7 @@ test.describe('Inbox tests', () => {
|
|||||||
test('User is able to create a task, assign a himself and see it inside the inbox', async ({ page }) => {
|
test('User is able to create a task, assign a himself and see it inside the inbox', async ({ page }) => {
|
||||||
const newIssue = createNewIssueData(data.firstName, data.lastName)
|
const newIssue = createNewIssueData(data.firstName, data.lastName)
|
||||||
await prepareNewIssueWithOpenStep(page, newIssue)
|
await prepareNewIssueWithOpenStep(page, newIssue)
|
||||||
await issuesDetailsPage.checkIssue({
|
await issuesDetailsPage.checkIssue(newIssue)
|
||||||
...newIssue,
|
|
||||||
milestone: 'Milestone',
|
|
||||||
estimation: '2h'
|
|
||||||
})
|
|
||||||
await leftSideMenuPage.clickTracker()
|
await leftSideMenuPage.clickTracker()
|
||||||
|
|
||||||
await leftSideMenuPage.clickNotification()
|
await leftSideMenuPage.clickNotification()
|
||||||
@ -63,44 +61,28 @@ test.describe('Inbox tests', () => {
|
|||||||
test('User is able to create a task, assign a himself and open it from inbox', async ({ page }) => {
|
test('User is able to create a task, assign a himself and open it from inbox', async ({ page }) => {
|
||||||
const newIssue = createNewIssueData(data.firstName, data.lastName)
|
const newIssue = createNewIssueData(data.firstName, data.lastName)
|
||||||
await prepareNewIssueWithOpenStep(page, newIssue)
|
await prepareNewIssueWithOpenStep(page, newIssue)
|
||||||
await issuesDetailsPage.checkIssue({
|
await issuesDetailsPage.checkIssue(newIssue)
|
||||||
...newIssue,
|
|
||||||
milestone: 'Milestone',
|
|
||||||
estimation: '2h'
|
|
||||||
})
|
|
||||||
await leftSideMenuPage.clickTracker()
|
await leftSideMenuPage.clickTracker()
|
||||||
|
|
||||||
await leftSideMenuPage.clickNotification()
|
await leftSideMenuPage.clickNotification()
|
||||||
await inboxPage.checkIfTaskIsPresentInInbox(newIssue.title)
|
await inboxPage.checkIfTaskIsPresentInInbox(newIssue.title)
|
||||||
await inboxPage.clickOnToDo(newIssue.title)
|
await inboxPage.clickOnToDo(newIssue.title)
|
||||||
await inboxPage.clickLeftSidePanelOpen()
|
await inboxPage.clickLeftSidePanelOpen()
|
||||||
await issuesDetailsPage.checkIssue({
|
await issuesDetailsPage.checkIssue(newIssue)
|
||||||
...newIssue,
|
|
||||||
milestone: 'Milestone',
|
|
||||||
estimation: '2h'
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|
||||||
test.skip('User is able to create a task, assign a himself and close it from inbox', async ({ page }) => {
|
test.skip('User is able to create a task, assign a himself and close it from inbox', async ({ page }) => {
|
||||||
const newIssue = createNewIssueData(data.firstName, data.lastName)
|
const newIssue = createNewIssueData(data.firstName, data.lastName)
|
||||||
|
|
||||||
await prepareNewIssueWithOpenStep(page, newIssue)
|
await prepareNewIssueWithOpenStep(page, newIssue)
|
||||||
await issuesDetailsPage.checkIssue({
|
await issuesDetailsPage.checkIssue(newIssue)
|
||||||
...newIssue,
|
|
||||||
milestone: 'Milestone',
|
|
||||||
estimation: '2h'
|
|
||||||
})
|
|
||||||
await leftSideMenuPage.clickTracker()
|
await leftSideMenuPage.clickTracker()
|
||||||
|
|
||||||
await leftSideMenuPage.clickNotification()
|
await leftSideMenuPage.clickNotification()
|
||||||
await inboxPage.checkIfTaskIsPresentInInbox(newIssue.title)
|
await inboxPage.checkIfTaskIsPresentInInbox(newIssue.title)
|
||||||
await inboxPage.clickOnToDo(newIssue.title)
|
await inboxPage.clickOnToDo(newIssue.title)
|
||||||
await inboxPage.clickLeftSidePanelOpen()
|
await inboxPage.clickLeftSidePanelOpen()
|
||||||
await issuesDetailsPage.checkIssue({
|
await issuesDetailsPage.checkIssue(newIssue)
|
||||||
...newIssue,
|
|
||||||
milestone: 'Milestone',
|
|
||||||
estimation: '2h'
|
|
||||||
})
|
|
||||||
await inboxPage.clickCloseLeftSidePanel()
|
await inboxPage.clickCloseLeftSidePanel()
|
||||||
// ADD ASSERT ONCE THE ISSUE IS FIXED
|
// ADD ASSERT ONCE THE ISSUE IS FIXED
|
||||||
})
|
})
|
||||||
@ -120,11 +102,7 @@ test.describe('Inbox tests', () => {
|
|||||||
|
|
||||||
const newIssue = createNewIssueData(newUser2.firstName, newUser2.lastName)
|
const newIssue = createNewIssueData(newUser2.firstName, newUser2.lastName)
|
||||||
await prepareNewIssueWithOpenStep(page, newIssue)
|
await prepareNewIssueWithOpenStep(page, newIssue)
|
||||||
await issuesDetailsPage.checkIssue({
|
await issuesDetailsPage.checkIssue(newIssue)
|
||||||
...newIssue,
|
|
||||||
milestone: 'Milestone',
|
|
||||||
estimation: '2h'
|
|
||||||
})
|
|
||||||
await leftSideMenuPageSecond.clickTracker()
|
await leftSideMenuPageSecond.clickTracker()
|
||||||
await leftSideMenuPageSecond.clickNotification()
|
await leftSideMenuPageSecond.clickNotification()
|
||||||
await inboxPageSecond.checkIfTaskIsPresentInInbox(newIssue.title)
|
await inboxPageSecond.checkIfTaskIsPresentInInbox(newIssue.title)
|
||||||
@ -147,21 +125,13 @@ test.describe('Inbox tests', () => {
|
|||||||
|
|
||||||
const newIssue = createNewIssueData(newUser2.firstName, newUser2.lastName)
|
const newIssue = createNewIssueData(newUser2.firstName, newUser2.lastName)
|
||||||
await prepareNewIssueWithOpenStep(page, newIssue)
|
await prepareNewIssueWithOpenStep(page, newIssue)
|
||||||
await issuesDetailsPage.checkIssue({
|
await issuesDetailsPage.checkIssue(newIssue)
|
||||||
...newIssue,
|
|
||||||
milestone: 'Milestone',
|
|
||||||
estimation: '2h'
|
|
||||||
})
|
|
||||||
await leftSideMenuPageSecond.clickTracker()
|
await leftSideMenuPageSecond.clickTracker()
|
||||||
await leftSideMenuPageSecond.clickNotification()
|
await leftSideMenuPageSecond.clickNotification()
|
||||||
await inboxPageSecond.checkIfTaskIsPresentInInbox(newIssue.title)
|
await inboxPageSecond.checkIfTaskIsPresentInInbox(newIssue.title)
|
||||||
await inboxPageSecond.clickOnToDo(newIssue.title)
|
await inboxPageSecond.clickOnToDo(newIssue.title)
|
||||||
await inboxPageSecond.clickLeftSidePanelOpen()
|
await inboxPageSecond.clickLeftSidePanelOpen()
|
||||||
await issuesDetailsPageSecond.checkIssue({
|
await issuesDetailsPageSecond.checkIssue(newIssue)
|
||||||
...newIssue,
|
|
||||||
milestone: 'Milestone',
|
|
||||||
estimation: '2h'
|
|
||||||
})
|
|
||||||
await page2.close()
|
await page2.close()
|
||||||
})
|
})
|
||||||
test.skip('User is able to create a task, assign a other user and close it from inbox', async ({ page, browser }) => {
|
test.skip('User is able to create a task, assign a other user and close it from inbox', async ({ page, browser }) => {
|
||||||
@ -180,21 +150,13 @@ test.describe('Inbox tests', () => {
|
|||||||
|
|
||||||
const newIssue = createNewIssueData(newUser2.firstName, newUser2.lastName)
|
const newIssue = createNewIssueData(newUser2.firstName, newUser2.lastName)
|
||||||
await prepareNewIssueWithOpenStep(page, newIssue)
|
await prepareNewIssueWithOpenStep(page, newIssue)
|
||||||
await issuesDetailsPage.checkIssue({
|
await issuesDetailsPage.checkIssue(newIssue)
|
||||||
...newIssue,
|
|
||||||
milestone: 'Milestone',
|
|
||||||
estimation: '2h'
|
|
||||||
})
|
|
||||||
await leftSideMenuPageSecond.clickTracker()
|
await leftSideMenuPageSecond.clickTracker()
|
||||||
await leftSideMenuPageSecond.clickNotification()
|
await leftSideMenuPageSecond.clickNotification()
|
||||||
await inboxPageSecond.checkIfTaskIsPresentInInbox(newIssue.title)
|
await inboxPageSecond.checkIfTaskIsPresentInInbox(newIssue.title)
|
||||||
await inboxPageSecond.clickOnToDo(newIssue.title)
|
await inboxPageSecond.clickOnToDo(newIssue.title)
|
||||||
await inboxPageSecond.clickLeftSidePanelOpen()
|
await inboxPageSecond.clickLeftSidePanelOpen()
|
||||||
await issuesDetailsPageSecond.checkIssue({
|
await issuesDetailsPageSecond.checkIssue(newIssue)
|
||||||
...newIssue,
|
|
||||||
milestone: 'Milestone',
|
|
||||||
estimation: '2h'
|
|
||||||
})
|
|
||||||
await inboxPage.clickCloseLeftSidePanel()
|
await inboxPage.clickCloseLeftSidePanel()
|
||||||
// ADD ASSERT ONCE THE ISSUE IS FIXED
|
// ADD ASSERT ONCE THE ISSUE IS FIXED
|
||||||
await page2.close()
|
await page2.close()
|
||||||
@ -285,11 +247,7 @@ test.describe('Inbox tests', () => {
|
|||||||
|
|
||||||
const newIssue = createNewIssueData(newUser2.firstName, newUser2.lastName)
|
const newIssue = createNewIssueData(newUser2.firstName, newUser2.lastName)
|
||||||
await prepareNewIssueWithOpenStep(page, newIssue)
|
await prepareNewIssueWithOpenStep(page, newIssue)
|
||||||
await issuesDetailsPage.checkIssue({
|
await issuesDetailsPage.checkIssue(newIssue)
|
||||||
...newIssue,
|
|
||||||
milestone: 'Milestone',
|
|
||||||
estimation: '2h'
|
|
||||||
})
|
|
||||||
await leftSideMenuPageSecond.clickTracker()
|
await leftSideMenuPageSecond.clickTracker()
|
||||||
await leftSideMenuPageSecond.clickNotification()
|
await leftSideMenuPageSecond.clickNotification()
|
||||||
await inboxPageSecond.clickOnInboxFilter('Channels')
|
await inboxPageSecond.clickOnInboxFilter('Channels')
|
||||||
@ -300,4 +258,51 @@ test.describe('Inbox tests', () => {
|
|||||||
await inboxPageSecond.checkIfInboxChatExists('Channel general', false)
|
await inboxPageSecond.checkIfInboxChatExists('Channel general', false)
|
||||||
await page2.close()
|
await page2.close()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
test('Checking the ability to receive a task and schedule it', async ({ page, browser }) => {
|
||||||
|
await leftSideMenuPage.openProfileMenu()
|
||||||
|
await leftSideMenuPage.inviteToWorkspace()
|
||||||
|
await leftSideMenuPage.getInviteLink()
|
||||||
|
const linkText = await page.locator('.antiPopup .link').textContent()
|
||||||
|
await leftSideMenuPage.clickOnCloseInvite()
|
||||||
|
|
||||||
|
const page2 = await browser.newPage()
|
||||||
|
await page2.goto(linkText ?? '')
|
||||||
|
const joinPage = new SignInJoinPage(page2)
|
||||||
|
await joinPage.join(newUser2)
|
||||||
|
|
||||||
|
const newIssue = createNewIssueData(data.firstName, data.lastName, {
|
||||||
|
status: 'Todo',
|
||||||
|
assignee: `${newUser2.lastName} ${newUser2.firstName}`,
|
||||||
|
estimation: '0'
|
||||||
|
})
|
||||||
|
await prepareNewIssueWithOpenStep(page, newIssue)
|
||||||
|
await issuesDetailsPage.checkIssue(newIssue)
|
||||||
|
|
||||||
|
const leftSideMenuPageSecond = new LeftSideMenuPage(page2)
|
||||||
|
const inboxPageSecond = new InboxPage(page2)
|
||||||
|
const issuesDetailsPageSecond = new IssuesDetailsPage(page2)
|
||||||
|
const planningPageSecond = new PlanningPage(page2)
|
||||||
|
await leftSideMenuPageSecond.clickNotification()
|
||||||
|
await inboxPageSecond.checkIfIssueIsPresentInInbox(newIssue.title)
|
||||||
|
await inboxPageSecond.clickIssuePresentInInbox(newIssue.title)
|
||||||
|
await inboxPageSecond.clickLeftSidePanelOpen()
|
||||||
|
await issuesDetailsPageSecond.checkIssue(newIssue)
|
||||||
|
await leftSideMenuPageSecond.clickPlanner()
|
||||||
|
await planningPageSecond.closeNotification()
|
||||||
|
await planningPageSecond.dragdropTomorrow(newIssue.title, getTimeForPlanner())
|
||||||
|
await planningPageSecond.eventInSchedule(newIssue.title).isVisible()
|
||||||
|
await attachScreenshot('Recive_task_and_scheduled.png', page2)
|
||||||
|
|
||||||
|
await attachScreenshot('Recive_task_and_scheduled-Detail.png', page)
|
||||||
|
await issuesDetailsPage.checkIssue({ ...newIssue, status: 'In Progress' })
|
||||||
|
await leftSideMenuPage.clickTeam()
|
||||||
|
const teamPage = new TeamPage(page)
|
||||||
|
await teamPage.checkTeamPageIsOpened()
|
||||||
|
await teamPage.selectTeam('Default')
|
||||||
|
await teamPage.buttonNextDay().click()
|
||||||
|
await attachScreenshot('Recive_task_and_scheduled-Tomorrow.png', page)
|
||||||
|
await teamPage.getItemByText('Tomorrow', newIssue.title).isVisible()
|
||||||
|
await page2.close()
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
@ -31,7 +31,7 @@ export class CommonPage {
|
|||||||
tagsStringAddTagButtonSubmit = (): Locator =>
|
tagsStringAddTagButtonSubmit = (): Locator =>
|
||||||
this.page.locator('div.popup form[id="tags:string:AddTag"] button[type="submit"]')
|
this.page.locator('div.popup form[id="tags:string:AddTag"] button[type="submit"]')
|
||||||
|
|
||||||
notifyContainerButton = (): Locator => this.page.locator('div.notify-container button[type="button"].small').nth(0)
|
notifyContainerButton = (): Locator => this.page.locator('div.notifyPopup button[data-id="btnNotifyClose"]').first()
|
||||||
errorSpan = (): Locator => this.page.locator('div.ERROR span')
|
errorSpan = (): Locator => this.page.locator('div.ERROR span')
|
||||||
infoSpan = (): Locator => this.page.locator('div.INFO span')
|
infoSpan = (): Locator => this.page.locator('div.INFO span')
|
||||||
popupSubmitButton = (): Locator => this.page.locator('div.popup button[type="submit"]')
|
popupSubmitButton = (): Locator => this.page.locator('div.popup button[type="submit"]')
|
||||||
@ -165,8 +165,10 @@ export class CommonPage {
|
|||||||
await this.selectPopupSpanLines(point).click()
|
await this.selectPopupSpanLines(point).click()
|
||||||
}
|
}
|
||||||
|
|
||||||
async closeNotification (page: Page): Promise<void> {
|
async closeNotification (): Promise<void> {
|
||||||
await this.notifyContainerButton().click()
|
while (await this.notifyContainerButton().isVisible()) {
|
||||||
|
await this.notifyContainerButton().click()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async checkError (page: Page, errorMessage: string): Promise<void> {
|
async checkError (page: Page, errorMessage: string): Promise<void> {
|
||||||
|
@ -19,6 +19,8 @@ export class DocumentContentPage extends CommonPage {
|
|||||||
readonly buttonMoreActions = (): Locator =>
|
readonly buttonMoreActions = (): Locator =>
|
||||||
this.page.locator('div.hulyHeader-buttonsGroup button#btn-doc-title-open-more')
|
this.page.locator('div.hulyHeader-buttonsGroup button#btn-doc-title-open-more')
|
||||||
|
|
||||||
|
readonly buttonLockedInTitle = (): Locator => this.page.getByRole('button', { name: 'Locked' })
|
||||||
|
|
||||||
readonly popupPanel = (): Locator => this.page.locator('div.popupPanel-title')
|
readonly popupPanel = (): Locator => this.page.locator('div.popupPanel-title')
|
||||||
readonly popupPanelH1 = (): Locator => this.page.locator('div.antiPopup > h1')
|
readonly popupPanelH1 = (): Locator => this.page.locator('div.antiPopup > h1')
|
||||||
|
|
||||||
@ -26,6 +28,10 @@ export class DocumentContentPage extends CommonPage {
|
|||||||
await expect(this.buttonDocumentTitle()).toHaveValue(title)
|
await expect(this.buttonDocumentTitle()).toHaveValue(title)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async checkDocumentLocked (): Promise<void> {
|
||||||
|
await expect(this.buttonLockedInTitle()).toBeVisible({ timeout: 1000 })
|
||||||
|
}
|
||||||
|
|
||||||
async addContentToTheNewLine (newContent: string): Promise<string> {
|
async addContentToTheNewLine (newContent: string): Promise<string> {
|
||||||
await expect(this.inputContent()).toBeVisible()
|
await expect(this.inputContent()).toBeVisible()
|
||||||
await expect(this.inputContent()).toHaveJSProperty('contentEditable', 'true')
|
await expect(this.inputContent()).toHaveJSProperty('contentEditable', 'true')
|
||||||
|
@ -20,6 +20,9 @@ export class DocumentsPage extends CommonPage {
|
|||||||
readonly buttonCreateDocument = (): Locator =>
|
readonly buttonCreateDocument = (): Locator =>
|
||||||
this.page.locator('div[data-float="navigator"] button[id="new-document"]')
|
this.page.locator('div[data-float="navigator"] button[id="new-document"]')
|
||||||
|
|
||||||
|
readonly buttonDocument = (name: string): Locator =>
|
||||||
|
this.page.locator('button.hulyNavItem-container > span[class*="label"]', { hasText: name })
|
||||||
|
|
||||||
readonly divTeamspacesParent = (): Locator =>
|
readonly divTeamspacesParent = (): Locator =>
|
||||||
this.page.locator('div#navGroup-tree-teamspaces').locator('xpath=../button[1]')
|
this.page.locator('div#navGroup-tree-teamspaces').locator('xpath=../button[1]')
|
||||||
|
|
||||||
@ -97,7 +100,13 @@ export class DocumentsPage extends CommonPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async openDocument (name: string): Promise<void> {
|
async openDocument (name: string): Promise<void> {
|
||||||
await this.page.locator('button.hulyNavItem-container > span[class*="label"]', { hasText: name }).click()
|
await this.buttonDocument(name).click()
|
||||||
|
}
|
||||||
|
|
||||||
|
async selectMoreActionOfDocument (name: string, popupItem: string): Promise<void> {
|
||||||
|
await this.buttonDocument(name).hover()
|
||||||
|
await this.page.getByRole('button', { name }).getByRole('button').nth(2).click()
|
||||||
|
await this.selectFromDropdown(this.page, popupItem)
|
||||||
}
|
}
|
||||||
|
|
||||||
async openDocumentForTeamspace (spaceName: string, documentName: string): Promise<void> {
|
async openDocumentForTeamspace (spaceName: string, documentName: string): Promise<void> {
|
||||||
|
@ -12,7 +12,7 @@ export class InboxPage {
|
|||||||
readonly leftSidePanelOpen = (): Locator => this.page.locator('#btnPAside')
|
readonly leftSidePanelOpen = (): Locator => this.page.locator('#btnPAside')
|
||||||
readonly leftSidePanelClose = (): Locator => this.page.locator('#btnPClose')
|
readonly leftSidePanelClose = (): Locator => this.page.locator('#btnPClose')
|
||||||
readonly inboxChat = (text: string): Locator => this.page.getByText(text)
|
readonly inboxChat = (text: string): Locator => this.page.getByText(text)
|
||||||
readonly issueTitle = (issueTitle: string): Locator => this.page.getByTitle(issueTitle)
|
readonly issueTitle = (issueTitle: string): Locator => this.page.getByText(issueTitle).first()
|
||||||
|
|
||||||
// ACTIONS
|
// ACTIONS
|
||||||
|
|
||||||
@ -48,6 +48,10 @@ export class InboxPage {
|
|||||||
await expect(this.issueTitle(issueTitle)).toBeVisible()
|
await expect(this.issueTitle(issueTitle)).toBeVisible()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async clickIssuePresentInInbox (issueTitle: string): Promise<void> {
|
||||||
|
await this.issueTitle(issueTitle).click()
|
||||||
|
}
|
||||||
|
|
||||||
async checkIfInboxChatExists (text: string, exists: boolean): Promise<void> {
|
async checkIfInboxChatExists (text: string, exists: boolean): Promise<void> {
|
||||||
if (exists) {
|
if (exists) {
|
||||||
await expect(this.inboxChat(text)).toBeVisible()
|
await expect(this.inboxChat(text)).toBeVisible()
|
||||||
|
@ -16,6 +16,9 @@ export class TeamPage extends CommonPage {
|
|||||||
buttonNextDay = (): Locator =>
|
buttonNextDay = (): Locator =>
|
||||||
this.page.locator('div.hulyComponent div.hulyHeader-container .actions button[data-id="btnNext"]')
|
this.page.locator('div.hulyComponent div.hulyHeader-container .actions button[data-id="btnNext"]')
|
||||||
|
|
||||||
|
getItemByText = (column: string, title: string): Locator =>
|
||||||
|
this.page.locator('div.hulyComponent div.item', { hasText: column }).locator('div.item', { hasText: title })
|
||||||
|
|
||||||
async checkTeamPageIsOpened (): Promise<void> {
|
async checkTeamPageIsOpened (): Promise<void> {
|
||||||
await expect(this.appHeader()).toBeVisible()
|
await expect(this.appHeader()).toBeVisible()
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { expect, type Locator, type Page } from '@playwright/test'
|
import { expect, type Locator, type Page } from '@playwright/test'
|
||||||
import { CommonTrackerPage } from './common-tracker-page'
|
import { CommonTrackerPage } from './common-tracker-page'
|
||||||
import { Issue, NewIssue } from './types'
|
import { Issue, NewIssue } from './types'
|
||||||
|
import { convertEstimation } from '../../tracker/tracker.utils'
|
||||||
|
|
||||||
export class IssuesDetailsPage extends CommonTrackerPage {
|
export class IssuesDetailsPage extends CommonTrackerPage {
|
||||||
readonly page: Page
|
readonly page: Page
|
||||||
@ -139,10 +140,10 @@ export class IssuesDetailsPage extends CommonTrackerPage {
|
|||||||
await expect(this.buttonComponent()).toHaveText(data.component)
|
await expect(this.buttonComponent()).toHaveText(data.component)
|
||||||
}
|
}
|
||||||
if (data.milestone != null) {
|
if (data.milestone != null) {
|
||||||
await expect(this.buttonMilestone()).toHaveText(data.milestone)
|
await expect(this.buttonMilestone()).toHaveText(data.milestone === 'No Milestone' ? 'Milestone' : data.milestone)
|
||||||
}
|
}
|
||||||
if (data.estimation != null) {
|
if (data.estimation != null) {
|
||||||
await expect(this.textEstimation()).toHaveText(data.estimation)
|
await expect(this.textEstimation()).toHaveText(convertEstimation(data.estimation))
|
||||||
}
|
}
|
||||||
if (data.parentIssue != null) {
|
if (data.parentIssue != null) {
|
||||||
await expect(this.textParentTitle()).toHaveText(data.parentIssue)
|
await expect(this.textParentTitle()).toHaveText(data.parentIssue)
|
||||||
|
@ -412,7 +412,7 @@ export class IssuesPage extends CommonTrackerPage {
|
|||||||
await this.fillNewIssueForm(data)
|
await this.fillNewIssueForm(data)
|
||||||
await this.clickButtonCreateIssue()
|
await this.clickButtonCreateIssue()
|
||||||
if (closeNotification) {
|
if (closeNotification) {
|
||||||
await this.closeNotification(this.page)
|
await this.closeNotification()
|
||||||
}
|
}
|
||||||
await attachScreenshot(`createdNewIssue-${data.title}.png`, this.page)
|
await attachScreenshot(`createdNewIssue-${data.title}.png`, this.page)
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { expect, type Locator } from '@playwright/test'
|
import { expect, type Locator } from '@playwright/test'
|
||||||
import { CommonTrackerPage } from './common-tracker-page'
|
import { CommonTrackerPage } from './common-tracker-page'
|
||||||
import { Issue, NewIssue } from './types'
|
import { Issue, NewIssue } from './types'
|
||||||
|
import { convertEstimation } from '../../tracker/tracker.utils'
|
||||||
|
|
||||||
export class TemplateDetailsPage extends CommonTrackerPage {
|
export class TemplateDetailsPage extends CommonTrackerPage {
|
||||||
inputTitle = (): Locator => this.page.locator('div.popupPanel-body input[type="text"]')
|
inputTitle = (): Locator => this.page.locator('div.popupPanel-body input[type="text"]')
|
||||||
@ -34,7 +35,7 @@ export class TemplateDetailsPage extends CommonTrackerPage {
|
|||||||
await expect(this.buttonComponent()).toHaveText(data.component)
|
await expect(this.buttonComponent()).toHaveText(data.component)
|
||||||
}
|
}
|
||||||
if (data.estimation != null) {
|
if (data.estimation != null) {
|
||||||
await expect(this.buttonEstimation()).toHaveText(data.estimation)
|
await expect(this.buttonEstimation()).toHaveText(convertEstimation(data.estimation))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { test } from '@playwright/test'
|
import { test } from '@playwright/test'
|
||||||
import { generateId, PlatformSetting, PlatformURI, generateTestData } from '../utils'
|
import { generateId, PlatformSetting, PlatformURI, generateTestData, getTimeForPlanner } from '../utils'
|
||||||
import { PlanningPage } from '../model/planning/planning-page'
|
import { PlanningPage } from '../model/planning/planning-page'
|
||||||
import { NewToDo } from '../model/planning/types'
|
import { NewToDo } from '../model/planning/types'
|
||||||
import { PlanningNavigationMenuPage } from '../model/planning/planning-navigation-menu-page'
|
import { PlanningNavigationMenuPage } from '../model/planning/planning-navigation-menu-page'
|
||||||
@ -179,12 +179,7 @@ test.describe('Planning ToDo tests', () => {
|
|||||||
}
|
}
|
||||||
const titleV = `Visible ToDo ${generateId()}`
|
const titleV = `Visible ToDo ${generateId()}`
|
||||||
const titleI = `Inisible ToDo ${generateId()}`
|
const titleI = `Inisible ToDo ${generateId()}`
|
||||||
|
const time = getTimeForPlanner()
|
||||||
let hour = new Date().getHours()
|
|
||||||
const ampm = hour < 13 ? 'am' : 'pm'
|
|
||||||
hour = hour < 1 ? 1 : hour >= 11 && hour < 13 ? 11 : hour >= 22 ? 10 : hour > 12 ? hour - 12 : hour
|
|
||||||
const time = `${hour}${ampm}`
|
|
||||||
// const timeI = `${hour + 1}${ampm}`
|
|
||||||
|
|
||||||
const leftSideMenuPage: LeftSideMenuPage = new LeftSideMenuPage(page)
|
const leftSideMenuPage: LeftSideMenuPage = new LeftSideMenuPage(page)
|
||||||
const loginPage: LoginPage = new LoginPage(page)
|
const loginPage: LoginPage = new LoginPage(page)
|
||||||
|
@ -26,7 +26,7 @@ export async function prepareNewIssueWithOpenStep (page: Page, issue: NewIssue):
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function createNewIssueData (firstName: string, lastName: string): NewIssue {
|
export function createNewIssueData (firstName: string, lastName: string, replace?: object): NewIssue {
|
||||||
return {
|
return {
|
||||||
title: faker.lorem.words(3),
|
title: faker.lorem.words(3),
|
||||||
description: faker.lorem.sentence(),
|
description: faker.lorem.sentence(),
|
||||||
@ -39,6 +39,7 @@ export function createNewIssueData (firstName: string, lastName: string): NewIss
|
|||||||
estimation: '2',
|
estimation: '2',
|
||||||
milestone: 'No Milestone',
|
milestone: 'No Milestone',
|
||||||
duedate: 'today',
|
duedate: 'today',
|
||||||
filePath: 'cat.jpeg'
|
filePath: 'cat.jpeg',
|
||||||
|
...replace
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -46,11 +46,7 @@ test.describe('Tracker issue tests', () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
await prepareNewIssueWithOpenStep(page, newIssue)
|
await prepareNewIssueWithOpenStep(page, newIssue)
|
||||||
await issuesDetailsPage.checkIssue({
|
await issuesDetailsPage.checkIssue(newIssue)
|
||||||
...newIssue,
|
|
||||||
milestone: 'Milestone',
|
|
||||||
estimation: '2h'
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|
||||||
test('Edit an issue', async ({ page }) => {
|
test('Edit an issue', async ({ page }) => {
|
||||||
@ -74,34 +70,19 @@ test.describe('Tracker issue tests', () => {
|
|||||||
|
|
||||||
await issuesDetailsPage.checkIssue({
|
await issuesDetailsPage.checkIssue({
|
||||||
...newIssue,
|
...newIssue,
|
||||||
...editIssue,
|
...editIssue
|
||||||
estimation: '1d'
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const estimations = new Map([
|
const estimations = ['0', '1', '1.25', '1.259', '1.26', '1.27', '1.5', '1.75', '2', '7', '8', '9', '9.5']
|
||||||
['0', '0h'],
|
|
||||||
['1', '1h'],
|
|
||||||
['1.25', '1h 15m'],
|
|
||||||
['1.259', '1h 15m'],
|
|
||||||
['1.26', '1h 15m'],
|
|
||||||
['1.27', '1h 16m'],
|
|
||||||
['1.5', '1h 30m'],
|
|
||||||
['1.75', '1h 45m'],
|
|
||||||
['2', '2h'],
|
|
||||||
['7', '7h'],
|
|
||||||
['8', '1d'],
|
|
||||||
['9', '1d 1h'],
|
|
||||||
['9.5', '1d 1h 30m']
|
|
||||||
])
|
|
||||||
|
|
||||||
for (const [input, expected] of estimations.entries()) {
|
for (const input of estimations) {
|
||||||
await issuesDetailsPage.editIssue({
|
await issuesDetailsPage.editIssue({
|
||||||
estimation: input
|
estimation: input
|
||||||
})
|
})
|
||||||
await issuesDetailsPage.checkIssue({
|
await issuesDetailsPage.checkIssue({
|
||||||
...newIssue,
|
...newIssue,
|
||||||
...editIssue,
|
...editIssue,
|
||||||
estimation: expected
|
estimation: input
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -222,7 +203,7 @@ test.describe('Tracker issue tests', () => {
|
|||||||
title: `New Issue-${generateId(4)}`,
|
title: `New Issue-${generateId(4)}`,
|
||||||
description: 'New Issue',
|
description: 'New Issue',
|
||||||
priority: 'Medium',
|
priority: 'Medium',
|
||||||
estimation: '1d',
|
estimation: '8',
|
||||||
component: 'Default component',
|
component: 'Default component',
|
||||||
milestone: 'Edit Milestone'
|
milestone: 'Edit Milestone'
|
||||||
}
|
}
|
||||||
|
@ -57,8 +57,6 @@ test.describe('Tracker related issue tests', () => {
|
|||||||
await issuesDetailsPage.checkIssue({
|
await issuesDetailsPage.checkIssue({
|
||||||
...newIssue,
|
...newIssue,
|
||||||
...relatedIssue,
|
...relatedIssue,
|
||||||
milestone: 'Milestone',
|
|
||||||
estimation: '1d 4h',
|
|
||||||
relatedIssue: 'TSK'
|
relatedIssue: 'TSK'
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -94,8 +94,6 @@ test.describe('Tracker sub-issues tests', () => {
|
|||||||
await issuesDetailsPage.checkIssue({
|
await issuesDetailsPage.checkIssue({
|
||||||
...newSubIssue,
|
...newSubIssue,
|
||||||
...editSubIssue,
|
...editSubIssue,
|
||||||
milestone: 'Milestone',
|
|
||||||
estimation: '1d',
|
|
||||||
parentIssue: newIssue.title
|
parentIssue: newIssue.title
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -41,10 +41,7 @@ test.describe('Tracker template tests', () => {
|
|||||||
await trackerNavigationMenuPage.openTemplateForProject('Default')
|
await trackerNavigationMenuPage.openTemplateForProject('Default')
|
||||||
await templatePage.createNewTemplate(newTemplate)
|
await templatePage.createNewTemplate(newTemplate)
|
||||||
await templatePage.openTemplate(newTemplate.title)
|
await templatePage.openTemplate(newTemplate.title)
|
||||||
await templateDetailsPage.checkTemplate({
|
await templateDetailsPage.checkTemplate(newTemplate)
|
||||||
...newTemplate,
|
|
||||||
estimation: '2h'
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|
||||||
test('Edit a Template', async ({ page }) => {
|
test('Edit a Template', async ({ page }) => {
|
||||||
@ -69,36 +66,21 @@ test.describe('Tracker template tests', () => {
|
|||||||
await templateDetailsPage.editTemplate(editTemplate)
|
await templateDetailsPage.editTemplate(editTemplate)
|
||||||
await templateDetailsPage.checkTemplate({
|
await templateDetailsPage.checkTemplate({
|
||||||
...newTemplate,
|
...newTemplate,
|
||||||
...editTemplate,
|
...editTemplate
|
||||||
estimation: '1d'
|
|
||||||
})
|
})
|
||||||
|
|
||||||
await templateDetailsPage.checkActivityContent(`New template: ${newTemplate.title}`)
|
await templateDetailsPage.checkActivityContent(`New template: ${newTemplate.title}`)
|
||||||
|
|
||||||
const estimations = new Map([
|
const estimations = ['0', '1', '1.25', '1.259', '1.26', '1.27', '1.5', '1.75', '2', '7', '8', '9', '9.5']
|
||||||
['0', '0h'],
|
|
||||||
['1', '1h'],
|
|
||||||
['1.25', '1h 15m'],
|
|
||||||
['1.259', '1h 15m'],
|
|
||||||
['1.26', '1h 15m'],
|
|
||||||
['1.27', '1h 16m'],
|
|
||||||
['1.5', '1h 30m'],
|
|
||||||
['1.75', '1h 45m'],
|
|
||||||
['2', '2h'],
|
|
||||||
['7', '7h'],
|
|
||||||
['8', '1d'],
|
|
||||||
['9', '1d 1h'],
|
|
||||||
['9.5', '1d 1h 30m']
|
|
||||||
])
|
|
||||||
|
|
||||||
for (const [input, expected] of estimations.entries()) {
|
for (const input of estimations) {
|
||||||
await templateDetailsPage.editTemplate({
|
await templateDetailsPage.editTemplate({
|
||||||
estimation: input
|
estimation: input
|
||||||
})
|
})
|
||||||
await templateDetailsPage.checkTemplate({
|
await templateDetailsPage.checkTemplate({
|
||||||
...newTemplate,
|
...newTemplate,
|
||||||
...editTemplate,
|
...editTemplate,
|
||||||
estimation: expected
|
estimation: input
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -168,7 +168,7 @@ test.describe('Tracker tests', () => {
|
|||||||
status: 'Todo',
|
status: 'Todo',
|
||||||
priority: 'Urgent',
|
priority: 'Urgent',
|
||||||
assignee: 'Appleseed John',
|
assignee: 'Appleseed John',
|
||||||
estimation: '1h',
|
estimation: '1',
|
||||||
dueDate: '24'
|
dueDate: '24'
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -204,7 +204,7 @@ export async function checkIssueDraft (page: Page, props: IssueProps): Promise<v
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (props.estimation !== undefined) {
|
if (props.estimation !== undefined) {
|
||||||
await expect(page.locator('#estimation-editor')).toHaveText(props.estimation)
|
await expect(page.locator('#estimation-editor')).toHaveText(convertEstimation(props.estimation))
|
||||||
}
|
}
|
||||||
|
|
||||||
if (props.dueDate !== undefined) {
|
if (props.dueDate !== undefined) {
|
||||||
@ -271,3 +271,19 @@ export async function performPanelTest (page: Page, statuses: string[], panel: s
|
|||||||
).toContainText(getIssueName(status), { timeout: 15000 })
|
).toContainText(getIssueName(status), { timeout: 15000 })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function convertEstimation (estimation: number | string): string {
|
||||||
|
const hoursInWorkingDay = 8
|
||||||
|
const value = typeof estimation === 'string' ? parseFloat(estimation) : estimation
|
||||||
|
|
||||||
|
const days = Math.floor(value / hoursInWorkingDay)
|
||||||
|
const hours = Math.floor(value % hoursInWorkingDay)
|
||||||
|
const minutes = Math.floor((value % 1) * 60)
|
||||||
|
const result = [
|
||||||
|
...(days === 0 ? [] : [`${days}d`]),
|
||||||
|
...(hours === 0 ? [] : [`${hours}h`]),
|
||||||
|
...(minutes === 0 ? [] : [`${minutes}m`])
|
||||||
|
].join(' ')
|
||||||
|
|
||||||
|
return result === '' ? '0h' : result
|
||||||
|
}
|
||||||
|
@ -30,6 +30,14 @@ export function generateTestData (): TestData {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getTimeForPlanner (): string {
|
||||||
|
let hour = new Date().getHours()
|
||||||
|
const ampm = hour < 13 ? 'am' : 'pm'
|
||||||
|
hour = hour < 1 ? 1 : hour >= 11 && hour < 13 ? 11 : hour >= 22 ? 10 : hour > 12 ? hour - 12 : hour
|
||||||
|
|
||||||
|
return `${hour}${ampm}`
|
||||||
|
}
|
||||||
|
|
||||||
// Consistent data
|
// Consistent data
|
||||||
export const workspaceName = faker.lorem.word()
|
export const workspaceName = faker.lorem.word()
|
||||||
export const userName = faker.internet.userName()
|
export const userName = faker.internet.userName()
|
||||||
|
@ -82,11 +82,7 @@ test.describe('Workspace tests', () => {
|
|||||||
await issuesPage.openIssueByName(newIssue.title)
|
await issuesPage.openIssueByName(newIssue.title)
|
||||||
|
|
||||||
const issuesDetailsPage = new IssuesDetailsPage(page)
|
const issuesDetailsPage = new IssuesDetailsPage(page)
|
||||||
await issuesDetailsPage.checkIssue({
|
await issuesDetailsPage.checkIssue(newIssue)
|
||||||
...newIssue,
|
|
||||||
milestone: 'Milestone',
|
|
||||||
estimation: '2h'
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|
||||||
test('Check validation steps description for the create flow', async ({ page }) => {
|
test('Check validation steps description for the create flow', async ({ page }) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user