Skip to content

Commit

Permalink
feat(tests): updated move to project tests (#4214)
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Velichko <nestor_007@mail.ru>
  • Loading branch information
nestoragent authored Dec 18, 2023
1 parent 6ebb496 commit 89706eb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/sanity/tests/model/tracker/common-tracker-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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> {
Expand Down Expand Up @@ -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 })
}
}
3 changes: 3 additions & 0 deletions tests/sanity/tests/tracker/tracker.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"]')
Expand Down

0 comments on commit 89706eb

Please sign in to comment.