mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-26 13:47:26 +03:00
feat(tests): updated move to project tests (#4214)
Signed-off-by: Alex Velichko <nestor_007@mail.ru>
This commit is contained in:
parent
6ebb496d63
commit
89706eb350
@ -11,6 +11,7 @@ export class CommonTrackerPage extends CalendarPage {
|
|||||||
readonly buttonSpaceSelectorMoveIssuesModal: Locator
|
readonly buttonSpaceSelectorMoveIssuesModal: Locator
|
||||||
readonly buttonMoveIssuesModal: Locator
|
readonly buttonMoveIssuesModal: Locator
|
||||||
readonly buttonKeepOriginalMoveIssuesModal: Locator
|
readonly buttonKeepOriginalMoveIssuesModal: Locator
|
||||||
|
readonly inputKeepOriginalMoveIssuesModal: Locator
|
||||||
|
|
||||||
constructor (page: Page) {
|
constructor (page: Page) {
|
||||||
super(page)
|
super(page)
|
||||||
@ -25,6 +26,7 @@ export class CommonTrackerPage extends CalendarPage {
|
|||||||
)
|
)
|
||||||
this.buttonMoveIssuesModal = page.locator('form[id="tracker:string:MoveIssues"] button[type="submit"]')
|
this.buttonMoveIssuesModal = page.locator('form[id="tracker:string:MoveIssues"] button[type="submit"]')
|
||||||
this.buttonKeepOriginalMoveIssuesModal = page.locator('form[id="tracker:string:MoveIssues"] span.toggle-switch')
|
this.buttonKeepOriginalMoveIssuesModal = page.locator('form[id="tracker:string:MoveIssues"] span.toggle-switch')
|
||||||
|
this.inputKeepOriginalMoveIssuesModal = page.locator('form[id="tracker:string:MoveIssues"] input[type="checkbox"]')
|
||||||
}
|
}
|
||||||
|
|
||||||
async selectFilter (filter: string, filterSecondLevel?: string): Promise<void> {
|
async selectFilter (filter: string, filterSecondLevel?: string): Promise<void> {
|
||||||
@ -91,9 +93,11 @@ export class CommonTrackerPage extends CalendarPage {
|
|||||||
async fillMoveIssuesModal (newProjectName: string, keepOriginalAttributes: boolean = false): Promise<void> {
|
async fillMoveIssuesModal (newProjectName: string, keepOriginalAttributes: boolean = false): Promise<void> {
|
||||||
await this.buttonSpaceSelectorMoveIssuesModal.click()
|
await this.buttonSpaceSelectorMoveIssuesModal.click()
|
||||||
await this.selectMenuItem(this.page, newProjectName)
|
await this.selectMenuItem(this.page, newProjectName)
|
||||||
|
|
||||||
if (keepOriginalAttributes) {
|
if (keepOriginalAttributes) {
|
||||||
await this.buttonKeepOriginalMoveIssuesModal.click()
|
await this.buttonKeepOriginalMoveIssuesModal.click()
|
||||||
}
|
}
|
||||||
await this.buttonMoveIssuesModal.click({ timeout: 100 })
|
|
||||||
|
await this.buttonMoveIssuesModal.click({ delay: 1000 })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -94,6 +94,9 @@ test.describe('Tracker tests', () => {
|
|||||||
await navigate(page)
|
await navigate(page)
|
||||||
await createIssue(page, { name })
|
await createIssue(page, { name })
|
||||||
await page.click('text="My issues"')
|
await page.click('text="My issues"')
|
||||||
|
const issuesPage = new IssuesPage(page)
|
||||||
|
await issuesPage.searchIssueByName(name)
|
||||||
|
|
||||||
await page.click('[data-id="tab-assigned"]')
|
await page.click('[data-id="tab-assigned"]')
|
||||||
await expect(page.locator('.antiPanel-component')).not.toContainText(name)
|
await expect(page.locator('.antiPanel-component')).not.toContainText(name)
|
||||||
await page.click('[data-id="tab-created"]')
|
await page.click('[data-id="tab-created"]')
|
||||||
|
Loading…
Reference in New Issue
Block a user