mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-23 16:56:07 +00:00
TESTS-71: feat(tests): updated allure parent suite (#4010)
Signed-off-by: Alex Velichko <nestor_007@mail.ru>
This commit is contained in:
parent
dc94123e2a
commit
db27efca58
@ -61,3 +61,10 @@ rushx dev-codegen # for local setup
|
||||
## Test authoring.
|
||||
|
||||
Please update all navigation with using PlatformURI for CI and dev environment compatible testing.
|
||||
|
||||
## Generate Allure
|
||||
|
||||
```bash
|
||||
allure generate allure-results -o allure-report --clean
|
||||
allure open allure-report
|
||||
```
|
@ -1,5 +1,6 @@
|
||||
import { expect, test } from '@playwright/test'
|
||||
import { PlatformSetting, PlatformURI } from './utils'
|
||||
import { allure } from 'allure-playwright'
|
||||
|
||||
test.use({
|
||||
storageState: PlatformSetting
|
||||
@ -7,9 +8,10 @@ test.use({
|
||||
|
||||
test.describe('actions tests', () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
// Create user and workspace
|
||||
await allure.parentSuite('Actions tests')
|
||||
await (await page.goto(`${PlatformURI}/workbench/sanity-ws/sanity-ws`))?.finished()
|
||||
})
|
||||
|
||||
test('action-new-candidate', async ({ page }) => {
|
||||
await page.click('[id="app-recruit\\:string\\:RecruitApplication"]')
|
||||
|
||||
|
@ -3,6 +3,7 @@ import { generateId, PlatformSetting, PlatformURI } from './utils'
|
||||
import { LeftSideMenuPage } from './model/left-side-menu-page'
|
||||
import { ChunterPage } from './model/chunter-page'
|
||||
import { ChannelPage } from './model/channel-page'
|
||||
import { allure } from 'allure-playwright'
|
||||
|
||||
test.use({
|
||||
storageState: PlatformSetting
|
||||
@ -10,6 +11,7 @@ test.use({
|
||||
|
||||
test.describe('channel tests', () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await allure.parentSuite('Channel tests')
|
||||
await (await page.goto(`${PlatformURI}/workbench/sanity-ws`))?.finished()
|
||||
})
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { test } from '@playwright/test'
|
||||
import { generateId, PlatformSetting, PlatformURI } from './utils'
|
||||
import { allure } from 'allure-playwright'
|
||||
|
||||
test.use({
|
||||
storageState: PlatformSetting
|
||||
@ -7,9 +8,10 @@ test.use({
|
||||
|
||||
test.describe('duplicate-org-test', () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
// Create user and workspace
|
||||
await allure.parentSuite('Duplicate Org test')
|
||||
await (await page.goto(`${PlatformURI}/workbench/sanity-ws`))?.finished()
|
||||
})
|
||||
|
||||
test('check-contact-exists', async ({ page }) => {
|
||||
await page.click('[id="app-lead\\:string\\:LeadApplication"]')
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { expect, test } from '@playwright/test'
|
||||
import { fillSearch, generateId, PlatformSetting, PlatformURI } from './utils'
|
||||
import { allure } from 'allure-playwright'
|
||||
|
||||
test.use({
|
||||
storageState: PlatformSetting
|
||||
@ -7,9 +8,10 @@ test.use({
|
||||
|
||||
test.describe('contact tests', () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
// Create user and workspace
|
||||
await allure.parentSuite('Contact test')
|
||||
await (await page.goto(`${PlatformURI}/workbench/sanity-ws`))?.finished()
|
||||
})
|
||||
|
||||
test('create-contact', async ({ page }) => {
|
||||
// Create a new context with the saved storage state.
|
||||
await page.locator('[id="app-contact\\:string\\:Contacts"]').click()
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { expect, Page, test } from '@playwright/test'
|
||||
import { Page, test } from '@playwright/test'
|
||||
import { PlatformSetting, PlatformURI } from './utils'
|
||||
import { allure } from 'allure-playwright'
|
||||
|
||||
test.use({
|
||||
storageState: PlatformSetting
|
||||
@ -16,61 +17,61 @@ export async function createDepartment (page: Page, departmentName: string): Pro
|
||||
|
||||
test.describe('hr tests', () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
// Create user and workspace
|
||||
await allure.parentSuite('HR test')
|
||||
await (await page.goto(`${PlatformURI}/workbench/sanity-ws`))?.finished()
|
||||
})
|
||||
|
||||
test.skip('test-pto-after-department-change', async ({ page }) => {
|
||||
await page.locator('[id="app-hr\\:string\\:HRApplication"]').click()
|
||||
await page.click('text="Structure"')
|
||||
const department1 = 'dep1'
|
||||
const department2 = 'dep2'
|
||||
await createDepartment(page, department1)
|
||||
await createDepartment(page, department2)
|
||||
|
||||
// Click .ml-8 > div > div > .flex-between >> nth=0
|
||||
await page.locator('.flex-col > div > .flex-between >> nth=0').click()
|
||||
|
||||
// Click [id="hr\:string\:AddEmployee"]
|
||||
await page.locator('[id="hr\\:string\\:AddEmployee"]').click()
|
||||
|
||||
// Click button:has-text("Appleseed John")
|
||||
await page.locator('button:has-text("Appleseed John")').click()
|
||||
|
||||
// Click text=Schedule
|
||||
await page.locator('text=Schedule').click()
|
||||
|
||||
// Click td:nth-child(15) > .h-full
|
||||
await page.locator('td:nth-child(15) > .h-full').click()
|
||||
|
||||
// Click button:has-text("Vacation")
|
||||
await page.locator('button:has-text("Vacation")').click()
|
||||
|
||||
// Click button:has-text("PTO") >> nth=0
|
||||
await page.locator('button:has-text("Remote")').first().click()
|
||||
|
||||
// Click button:has-text("Create")
|
||||
await page.locator('button:has-text("Create")').click()
|
||||
await page.waitForSelector('form.antiCard', { state: 'detached' })
|
||||
|
||||
// Click text=Structure
|
||||
await page.locator('text=Structure').click()
|
||||
|
||||
// Click div:nth-child(3) > div > .flex-between
|
||||
await page.locator('div:nth-child(2) > .flex-between').click()
|
||||
|
||||
// Click [id="hr\:string\:AddEmployee"]
|
||||
await page.locator('[id="hr\\:string\\:AddEmployee"]').click()
|
||||
|
||||
// Click button:has-text("Appleseed John")
|
||||
await page.locator('button:has-text("Appleseed John")').click()
|
||||
|
||||
// Click button:has-text("Ok")
|
||||
await page.locator('button:has-text("Ok")').click()
|
||||
await page.waitForSelector('form.antiCard', { state: 'detached' })
|
||||
|
||||
// Click text=Schedule
|
||||
await page.locator('text=Schedule').click()
|
||||
await expect(page.locator('td:nth-child(15) > .h-full .request')).toHaveCSS('opacity', '0.5')
|
||||
})
|
||||
// test.skip('test-pto-after-department-change', async ({ page }) => {
|
||||
// await page.locator('[id="app-hr\\:string\\:HRApplication"]').click()
|
||||
// await page.click('text="Structure"')
|
||||
// const department1 = 'dep1'
|
||||
// const department2 = 'dep2'
|
||||
// await createDepartment(page, department1)
|
||||
// await createDepartment(page, department2)
|
||||
//
|
||||
// // Click .ml-8 > div > div > .flex-between >> nth=0
|
||||
// await page.locator('.flex-col > div > .flex-between >> nth=0').click()
|
||||
//
|
||||
// // Click [id="hr\:string\:AddEmployee"]
|
||||
// await page.locator('[id="hr\\:string\\:AddEmployee"]').click()
|
||||
//
|
||||
// // Click button:has-text("Appleseed John")
|
||||
// await page.locator('button:has-text("Appleseed John")').click()
|
||||
//
|
||||
// // Click text=Schedule
|
||||
// await page.locator('text=Schedule').click()
|
||||
//
|
||||
// // Click td:nth-child(15) > .h-full
|
||||
// await page.locator('td:nth-child(15) > .h-full').click()
|
||||
//
|
||||
// // Click button:has-text("Vacation")
|
||||
// await page.locator('button:has-text("Vacation")').click()
|
||||
//
|
||||
// // Click button:has-text("PTO") >> nth=0
|
||||
// await page.locator('button:has-text("Remote")').first().click()
|
||||
//
|
||||
// // Click button:has-text("Create")
|
||||
// await page.locator('button:has-text("Create")').click()
|
||||
// await page.waitForSelector('form.antiCard', { state: 'detached' })
|
||||
//
|
||||
// // Click text=Structure
|
||||
// await page.locator('text=Structure').click()
|
||||
//
|
||||
// // Click div:nth-child(3) > div > .flex-between
|
||||
// await page.locator('div:nth-child(2) > .flex-between').click()
|
||||
//
|
||||
// // Click [id="hr\:string\:AddEmployee"]
|
||||
// await page.locator('[id="hr\\:string\\:AddEmployee"]').click()
|
||||
//
|
||||
// // Click button:has-text("Appleseed John")
|
||||
// await page.locator('button:has-text("Appleseed John")').click()
|
||||
//
|
||||
// // Click button:has-text("Ok")
|
||||
// await page.locator('button:has-text("Ok")').click()
|
||||
// await page.waitForSelector('form.antiCard', { state: 'detached' })
|
||||
//
|
||||
// // Click text=Schedule
|
||||
// await page.locator('text=Schedule').click()
|
||||
// await expect(await page.locator('td:nth-child(15) > .h-full .request')).toHaveCSS('opacity', '0.5')
|
||||
// })
|
||||
})
|
||||
|
@ -2,9 +2,12 @@ import { test } from '@playwright/test'
|
||||
import { PlatformUser } from './utils'
|
||||
import { LoginPage } from './model/login-page'
|
||||
import { SelectWorkspacePage } from './model/select-workspace-page'
|
||||
import { allure } from 'allure-playwright'
|
||||
|
||||
test.describe('login test', () => {
|
||||
test('check login', async ({ page }) => {
|
||||
await allure.parentSuite('Login test')
|
||||
|
||||
page.on('pageerror', (exception) => {
|
||||
console.log('Uncaught exception:')
|
||||
console.log(exception.message)
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { test } from '@playwright/test'
|
||||
import { generateId, PlatformSetting, PlatformURI } from './utils'
|
||||
import { allure } from 'allure-playwright'
|
||||
|
||||
test.use({
|
||||
storageState: PlatformSetting
|
||||
@ -7,7 +8,7 @@ test.use({
|
||||
|
||||
test.describe('recruit tests', () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
// Create user and workspace
|
||||
await allure.parentSuite('Recruit test')
|
||||
await (await page.goto(`${PlatformURI}/workbench/sanity-ws`))?.finished()
|
||||
})
|
||||
|
||||
|
@ -18,6 +18,14 @@ const config: PlaywrightTestConfig = {
|
||||
expect: {
|
||||
timeout: 15000
|
||||
},
|
||||
reporter: 'allure-playwright'
|
||||
reporter: [
|
||||
[
|
||||
'allure-playwright',
|
||||
{
|
||||
detail: true,
|
||||
suiteTitle: true
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
export default config
|
||||
|
@ -3,6 +3,7 @@ import { generateId, PlatformSetting, PlatformURI } from '../utils'
|
||||
import { NavigationMenuPage } from '../model/recruiting/navigation-menu-page'
|
||||
import { ApplicationsPage } from '../model/recruiting/applications-page'
|
||||
import { ApplicationsDetailsPage } from '../model/recruiting/applications-details-page'
|
||||
import { allure } from 'allure-playwright'
|
||||
|
||||
test.use({
|
||||
storageState: PlatformSetting
|
||||
@ -10,7 +11,7 @@ test.use({
|
||||
|
||||
test.describe('Application tests', () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
// Create user and workspace
|
||||
await allure.parentSuite('Application tests')
|
||||
await (await page.goto(`${PlatformURI}/workbench/sanity-ws/recruit`))?.finished()
|
||||
})
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { test } from '@playwright/test'
|
||||
import { generateId, PlatformSetting, PlatformURI } from '../utils'
|
||||
import { PlatformSetting, PlatformURI } from '../utils'
|
||||
import { allure } from 'allure-playwright'
|
||||
|
||||
test.use({
|
||||
storageState: PlatformSetting
|
||||
@ -7,32 +8,32 @@ test.use({
|
||||
|
||||
test.describe('interview tests', () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
// Create user and workspace
|
||||
await allure.parentSuite('Interview tests')
|
||||
await (await page.goto(`${PlatformURI}/workbench/sanity-ws/recruit`))?.finished()
|
||||
})
|
||||
|
||||
test.skip('create-interview', async ({ page }) => {
|
||||
await page.locator('[id="app-recruit\\:string\\:RecruitApplication"]').click()
|
||||
|
||||
const interviewId = 'My interview ' + generateId(4)
|
||||
|
||||
await page.locator('[id="app-recruit\\:string\\:RecruitApplication"]').click()
|
||||
|
||||
await page.click('text=Reviews')
|
||||
|
||||
await page.click('button:has-text("Review")')
|
||||
|
||||
await page.click('[placeholder="Title"]')
|
||||
|
||||
await page.fill('[placeholder="Title"]', `Meet Peterson ${interviewId}`)
|
||||
|
||||
await page.click('[placeholder="Location"]')
|
||||
|
||||
await page.fill('[placeholder="Location"]', 'NSK')
|
||||
await page.click('form button:has-text("Talent")')
|
||||
await page.click('button:has-text("P. Andrey")')
|
||||
await page.click('text=Create')
|
||||
await page.waitForSelector('form.antiCard', { state: 'detached' })
|
||||
await page.click('td:has-text("RVE-")')
|
||||
})
|
||||
// test.skip('create-interview', async ({ page }) => {
|
||||
// await page.locator('[id="app-recruit\\:string\\:RecruitApplication"]').click()
|
||||
//
|
||||
// const interviewId = 'My interview ' + generateId(4)
|
||||
//
|
||||
// await page.locator('[id="app-recruit\\:string\\:RecruitApplication"]').click()
|
||||
//
|
||||
// await page.click('text=Reviews')
|
||||
//
|
||||
// await page.click('button:has-text("Review")')
|
||||
//
|
||||
// await page.click('[placeholder="Title"]')
|
||||
//
|
||||
// await page.fill('[placeholder="Title"]', `Meet Peterson ${interviewId}`)
|
||||
//
|
||||
// await page.click('[placeholder="Location"]')
|
||||
//
|
||||
// await page.fill('[placeholder="Location"]', 'NSK')
|
||||
// await page.click('form button:has-text("Talent")')
|
||||
// await page.click('button:has-text("P. Andrey")')
|
||||
// await page.click('text=Create')
|
||||
// await page.waitForSelector('form.antiCard', { state: 'detached' })
|
||||
// await page.click('td:has-text("RVE-")')
|
||||
// })
|
||||
})
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { test } from '@playwright/test'
|
||||
import { generateId, PlatformSetting, PlatformURI } from '../utils'
|
||||
import { allure } from 'allure-playwright'
|
||||
|
||||
test.use({
|
||||
storageState: PlatformSetting
|
||||
@ -7,9 +8,10 @@ test.use({
|
||||
|
||||
test.describe('review tests', () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
// Create user and workspace
|
||||
await allure.parentSuite('Review tests')
|
||||
await (await page.goto(`${PlatformURI}/workbench/sanity-ws/recruit`))?.finished()
|
||||
})
|
||||
|
||||
test('create-review', async ({ page, context }) => {
|
||||
await page.click('[id="app-recruit\\:string\\:RecruitApplication"]')
|
||||
await page.click('text=Reviews')
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { test } from '@playwright/test'
|
||||
import { generateId, PlatformSetting, PlatformURI } from '../utils'
|
||||
import { PlatformSetting, PlatformURI } from '../utils'
|
||||
import { allure } from 'allure-playwright'
|
||||
|
||||
test.use({
|
||||
storageState: PlatformSetting
|
||||
@ -7,24 +8,24 @@ test.use({
|
||||
|
||||
test.describe('skill tests', () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
// Create user and workspace
|
||||
await allure.parentSuite('Skill tests')
|
||||
await (await page.goto(`${PlatformURI}/workbench/sanity-ws/recruit`))?.finished()
|
||||
})
|
||||
|
||||
test.skip('create skill', async ({ page }) => {
|
||||
await page.click('[id="app-recruit\\:string\\:RecruitApplication"]')
|
||||
await page.click('text=Skills')
|
||||
await page.click('button:has-text("Skill")')
|
||||
await page.click('[placeholder="Please\\ type\\ skill\\ title"]')
|
||||
const skillId = 'custom-skill-' + generateId()
|
||||
await page.fill('[placeholder="Please\\ type\\ skill\\ title"]', skillId)
|
||||
await page.click('button:has-text("Other")')
|
||||
await page.click('button:has-text("Design")')
|
||||
await page.click('button:has-text("Create")')
|
||||
await page.click(`text=${skillId}`)
|
||||
await page.click('[placeholder="Please\\ type\\ description\\ here"]')
|
||||
await page.fill('[placeholder="Please\\ type\\ description\\ here"]', 'description-' + skillId)
|
||||
await page.click('button:has-text("Save")')
|
||||
await page.click(`span:has-text("description-${skillId}")`)
|
||||
})
|
||||
// test.skip('create skill', async ({ page }) => {
|
||||
// await page.click('[id="app-recruit\\:string\\:RecruitApplication"]')
|
||||
// await page.click('text=Skills')
|
||||
// await page.click('button:has-text("Skill")')
|
||||
// await page.click('[placeholder="Please\\ type\\ skill\\ title"]')
|
||||
// const skillId = 'custom-skill-' + generateId()
|
||||
// await page.fill('[placeholder="Please\\ type\\ skill\\ title"]', skillId)
|
||||
// await page.click('button:has-text("Other")')
|
||||
// await page.click('button:has-text("Design")')
|
||||
// await page.click('button:has-text("Create")')
|
||||
// await page.click(`text=${skillId}`)
|
||||
// await page.click('[placeholder="Please\\ type\\ description\\ here"]')
|
||||
// await page.fill('[placeholder="Please\\ type\\ description\\ here"]', 'description-' + skillId)
|
||||
// await page.click('button:has-text("Save")')
|
||||
// await page.click(`span:has-text("description-${skillId}")`)
|
||||
// })
|
||||
})
|
||||
|
@ -3,6 +3,7 @@ import { generateId, PlatformSetting, PlatformURI } from '../utils'
|
||||
import { NavigationMenuPage } from '../model/recruiting/navigation-menu-page'
|
||||
import { TalentsPage } from '../model/recruiting/talents-page'
|
||||
import { TalentDetailsPage } from '../model/recruiting/talent-details-page'
|
||||
import { allure } from 'allure-playwright'
|
||||
|
||||
test.use({
|
||||
storageState: PlatformSetting
|
||||
@ -10,7 +11,7 @@ test.use({
|
||||
|
||||
test.describe('candidate/talents tests', () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
// Create user and workspace
|
||||
await allure.parentSuite('Talents tests')
|
||||
await (await page.goto(`${PlatformURI}/workbench/sanity-ws/recruit`))?.finished()
|
||||
})
|
||||
|
||||
|
@ -3,14 +3,15 @@ import { generateId, PlatformSetting, PlatformURI } from '../utils'
|
||||
import { NavigationMenuPage } from '../model/recruiting/navigation-menu-page'
|
||||
import { VacanciesPage } from '../model/recruiting/vacancies-page'
|
||||
import { VacancyDetailsPage } from '../model/recruiting/vacancy-details-page'
|
||||
import { allure } from 'allure-playwright'
|
||||
|
||||
test.use({
|
||||
storageState: PlatformSetting
|
||||
})
|
||||
|
||||
test.describe('recruit tests', () => {
|
||||
test.describe('Vacancy tests', () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
// Create user and workspace
|
||||
await allure.parentSuite('Vacancy tests')
|
||||
await (await page.goto(`${PlatformURI}/workbench/sanity-ws/recruit`))?.finished()
|
||||
})
|
||||
|
||||
|
@ -1,14 +1,16 @@
|
||||
import { expect, test } from '@playwright/test'
|
||||
import { generateId, PlatformSetting, PlatformURI } from './utils'
|
||||
import { allure } from 'allure-playwright'
|
||||
|
||||
test.use({
|
||||
storageState: PlatformSetting
|
||||
})
|
||||
test.describe('contact tests', () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
// Create user and workspace
|
||||
await allure.parentSuite('Contact test')
|
||||
await (await page.goto(`${PlatformURI}/workbench/sanity-ws`))?.finished()
|
||||
})
|
||||
|
||||
test('update-profile', async ({ page, context }) => {
|
||||
// Go to http://localhost:8083/workbench/sanity-ws
|
||||
await (await page.goto(`${PlatformURI}/workbench/sanity-ws`))?.finished()
|
||||
@ -36,6 +38,7 @@ test.describe('contact tests', () => {
|
||||
// Click text=Apply
|
||||
await page.click('.editor-container button:nth-child(3)')
|
||||
})
|
||||
|
||||
test('create-template', async ({ page }) => {
|
||||
// Go to http://localhost:8083/workbench/sanity-ws
|
||||
await (await page.goto(`${PlatformURI}/workbench/sanity-ws`))?.finished()
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { expect, test } from '@playwright/test'
|
||||
import { generateId, PlatformSetting, PlatformURI } from './utils'
|
||||
import { allure } from 'allure-playwright'
|
||||
|
||||
test.use({
|
||||
storageState: PlatformSetting
|
||||
@ -7,9 +8,10 @@ test.use({
|
||||
|
||||
test.describe('recruit tests', () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
// Create user and workspace
|
||||
await allure.parentSuite('Recruit test')
|
||||
await (await page.goto(`${PlatformURI}/workbench/sanity-ws`))?.finished()
|
||||
})
|
||||
|
||||
test('create-skill-candidate-with-skill', async ({ page }) => {
|
||||
// Go to http://localhost:8083/workbench/sanity-ws
|
||||
await (await page.goto(`${PlatformURI}/workbench/sanity-ws`))?.finished()
|
||||
|
@ -4,13 +4,15 @@ import { LeftSideMenuPage } from '../model/left-side-menu-page'
|
||||
import { IssuesPage } from '../model/tracker/issues-page'
|
||||
import { IssuesDetailsPage } from '../model/tracker/issues-details-page'
|
||||
import { Issue, NewIssue } from '../model/tracker/types'
|
||||
import { allure } from 'allure-playwright'
|
||||
|
||||
test.use({
|
||||
storageState: PlatformSetting
|
||||
})
|
||||
|
||||
test.describe('tracker issue tests', () => {
|
||||
test.describe('Tracker issue tests', () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await allure.parentSuite('Tracker tests')
|
||||
await (await page.goto(`${PlatformURI}/workbench/sanity-ws`))?.finished()
|
||||
})
|
||||
|
||||
|
@ -14,7 +14,9 @@ import {
|
||||
ViewletSelectors
|
||||
} from './tracker.utils'
|
||||
import { fillSearch, generateId, PlatformSetting } from '../utils'
|
||||
import { allure } from 'allure-playwright'
|
||||
import { IssuesPage } from '../model/tracker/issues-page'
|
||||
|
||||
test.use({
|
||||
storageState: PlatformSetting
|
||||
})
|
||||
@ -93,6 +95,7 @@ test.describe('tracker layout tests', () => {
|
||||
let issuesPropsP: Promise<IssueProps[]>
|
||||
let issuesProps: IssueProps[] = []
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await allure.parentSuite('Tracker tests')
|
||||
test.setTimeout(60000)
|
||||
await navigate(page)
|
||||
if (issuesPropsP === undefined) {
|
@ -1,11 +1,13 @@
|
||||
import { test } from '@playwright/test'
|
||||
import { IssuesPage } from '../model/tracker/issues-page'
|
||||
import { PlatformSetting, PlatformURI } from '../utils'
|
||||
import { allure } from 'allure-playwright'
|
||||
test.use({
|
||||
storageState: PlatformSetting
|
||||
})
|
||||
|
||||
test('check-status-loading', async ({ page }) => {
|
||||
await allure.parentSuite('Tracker tests')
|
||||
await (
|
||||
await page.goto(`${PlatformURI}/workbench/sanity-ws/tracker/tracker%3Aproject%3ADefaultProject/issues`)
|
||||
)?.finished()
|
@ -1,6 +1,7 @@
|
||||
import { expect, test } from '@playwright/test'
|
||||
import { navigate } from './tracker.utils'
|
||||
import { generateId, PlatformSetting, PlatformURI, fillSearch } from '../utils'
|
||||
import { allure } from 'allure-playwright'
|
||||
|
||||
test.use({
|
||||
storageState: PlatformSetting
|
||||
@ -8,9 +9,10 @@ test.use({
|
||||
|
||||
test.describe('component tests', () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
// Create user and workspace
|
||||
await allure.parentSuite('Tracker tests')
|
||||
await (await page.goto(`${PlatformURI}/workbench/sanity-ws`))?.finished()
|
||||
})
|
||||
|
||||
test('create-component-issue', async ({ page }) => {
|
||||
await page.click('[id="app-tracker\\:string\\:TrackerApplication"]')
|
||||
|
@ -12,37 +12,13 @@ import {
|
||||
toTime
|
||||
} from './tracker.utils'
|
||||
import { PlatformSetting, fillSearch, generateId } from '../utils'
|
||||
import { allure } from 'allure-playwright'
|
||||
import { IssuesPage } from '../model/tracker/issues-page'
|
||||
|
||||
test.use({
|
||||
storageState: PlatformSetting
|
||||
})
|
||||
|
||||
// test('create-issue-and-sub-issue', async ({ page }) => {
|
||||
// const props = {
|
||||
// name: getIssueName(),
|
||||
// description: 'description',
|
||||
// labels: ['label', 'another-label'],
|
||||
// status: DEFAULT_STATUSES[0],
|
||||
// priority: 'Urgent',
|
||||
// assignee: DEFAULT_USER
|
||||
// }
|
||||
// await navigate(page)
|
||||
// for (const label of props.labels) {
|
||||
// await createLabel(page, label)
|
||||
// }
|
||||
// await createIssue(page, props)
|
||||
// await page.click('text="Issues"')
|
||||
|
||||
// await fillSearch(page, props.name)
|
||||
|
||||
// await openIssue(page, props.name)
|
||||
// await checkIssue(page, props)
|
||||
// props.name = `sub${props.name}`
|
||||
// await createSubissue(page, props)
|
||||
// await openIssue(page, props.name)
|
||||
// await checkIssue(page, props)
|
||||
// })
|
||||
|
||||
const getIssueName = (postfix: string = generateId(5)): string => `issue-${postfix}`
|
||||
|
||||
const panelStatusMap = new Map([
|
||||
@ -51,6 +27,11 @@ const panelStatusMap = new Map([
|
||||
['Issues/Backlog', ['Backlog']]
|
||||
])
|
||||
|
||||
test.describe('Tracker tests', () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await allure.parentSuite('Tracker tests')
|
||||
})
|
||||
|
||||
test('issues-status-display', async ({ page }) => {
|
||||
const locator = page.locator('.list-container')
|
||||
await navigate(page)
|
||||
@ -207,8 +188,6 @@ test('report-time-from-main-view', async ({ page }) => {
|
||||
await navigate(page)
|
||||
|
||||
await page.click('text="Issues"')
|
||||
const issuesPage = new IssuesPage(page)
|
||||
await issuesPage.modelSelectorAll.click()
|
||||
await page.click('button:has-text("View")')
|
||||
await page.click('.ordering >> nth=0')
|
||||
await page.click('text="Modified date"')
|
||||
@ -218,8 +197,19 @@ test('report-time-from-main-view', async ({ page }) => {
|
||||
const assignee = 'Chen Rosamund'
|
||||
const status = 'In Progress'
|
||||
const name = getIssueName()
|
||||
|
||||
try {
|
||||
await page.evaluate(() => {
|
||||
localStorage.setItem('#platform.notification.timeout', '5000')
|
||||
})
|
||||
await createIssue(page, { name, assignee, status })
|
||||
await page.waitForSelector(`text="${name}"`)
|
||||
await page.waitForSelector('text="View issue"')
|
||||
await page.click('text="View issue"')
|
||||
} finally {
|
||||
await page.evaluate(() => {
|
||||
localStorage.setItem('#platform.notification.timeout', '0')
|
||||
})
|
||||
}
|
||||
|
||||
// await page.click('.close-button > .antiButton')
|
||||
|
||||
@ -233,6 +223,13 @@ test('report-time-from-main-view', async ({ page }) => {
|
||||
const random = Math.floor(Math.random() * values.length)
|
||||
const time = values[random]
|
||||
count += time
|
||||
await page.click('text="Issues"')
|
||||
const issuesPage = new IssuesPage(page)
|
||||
await issuesPage.modelSelectorAll.click()
|
||||
await page.click('button:has-text("View")')
|
||||
await page.click('.ordering >> nth=0')
|
||||
await page.locator('button.menu-item', { hasText: 'Modified date' }).click()
|
||||
await page.keyboard.press('Escape')
|
||||
|
||||
await page.locator('.estimation-container').first().click()
|
||||
await page.waitForSelector('text="Estimation"')
|
||||
@ -324,8 +321,6 @@ test('sub-issue-draft', async ({ page }) => {
|
||||
await navigate(page)
|
||||
await createIssue(page, props)
|
||||
await page.click('text="Issues"')
|
||||
const issuesPage = new IssuesPage(page)
|
||||
await issuesPage.modelSelectorAll.click()
|
||||
|
||||
await fillSearch(page, props.name)
|
||||
|
||||
@ -340,3 +335,4 @@ test('sub-issue-draft', async ({ page }) => {
|
||||
await page.locator('#new-issue').click()
|
||||
await checkIssueDraft(page, props)
|
||||
})
|
||||
})
|
||||
|
@ -1,14 +1,16 @@
|
||||
import { expect, test } from '@playwright/test'
|
||||
import { PlatformSetting, PlatformURI } from './utils'
|
||||
import { allure } from 'allure-playwright'
|
||||
|
||||
test.use({
|
||||
storageState: PlatformSetting
|
||||
})
|
||||
test.describe('workbench tests', () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
// Create user and workspace
|
||||
await allure.parentSuite('Workbench test')
|
||||
await (await page.goto(`${PlatformURI}/workbench/sanity-ws`))?.finished()
|
||||
})
|
||||
|
||||
test('navigator', async ({ page }) => {
|
||||
// Click [id="app-recruit\:string\:RecruitApplication"]
|
||||
await page.click('[id="app-recruit\\:string\\:RecruitApplication"]')
|
||||
|
Loading…
Reference in New Issue
Block a user