feat(tests): updated move to project tests (#4214)

Signed-off-by: Alex Velichko <nestor_007@mail.ru>
This commit is contained in:
Alex Velichko 2023-12-18 12:45:55 +03:00 committed by GitHub
parent 6ebb496d63
commit 89706eb350
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -11,6 +11,7 @@ export class CommonTrackerPage extends CalendarPage {
readonly buttonSpaceSelectorMoveIssuesModal: Locator
readonly buttonMoveIssuesModal: Locator
readonly buttonKeepOriginalMoveIssuesModal: Locator
readonly inputKeepOriginalMoveIssuesModal: Locator
constructor (page: 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.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> {
@ -91,9 +93,11 @@ export class CommonTrackerPage extends CalendarPage {
async fillMoveIssuesModal (newProjectName: string, keepOriginalAttributes: boolean = false): Promise<void> {
await this.buttonSpaceSelectorMoveIssuesModal.click()
await this.selectMenuItem(this.page, newProjectName)
if (keepOriginalAttributes) {
await this.buttonKeepOriginalMoveIssuesModal.click()
}
await this.buttonMoveIssuesModal.click({ timeout: 100 })
await this.buttonMoveIssuesModal.click({ delay: 1000 })
}
}

View File

@ -94,6 +94,9 @@ test.describe('Tracker tests', () => {
await navigate(page)
await createIssue(page, { name })
await page.click('text="My issues"')
const issuesPage = new IssuesPage(page)
await issuesPage.searchIssueByName(name)
await page.click('[data-id="tab-assigned"]')
await expect(page.locator('.antiPanel-component')).not.toContainText(name)
await page.click('[data-id="tab-created"]')