Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TESTS-87: feat(tests): done Issues status can be changed by another users test #4036

Merged
merged 10 commits into from
Nov 23, 2023
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added tests/sanity-ws/000004/space-1700599601484-0.snp.gz
Binary file not shown.
Binary file not shown.
Binary file added tests/sanity-ws/000004/status-1700599601484-0.snp.gz
Binary file not shown.
Binary file not shown.
Binary file added tests/sanity-ws/000004/task-1700599601484-0.snp.gz
Binary file not shown.
Binary file not shown.
Binary file added tests/sanity-ws/000004/tx-1700599601484-0.snp.gz
Binary file not shown.
Binary file not shown.
Binary file modified tests/sanity-ws/backup.json.gz
Binary file not shown.
46 changes: 45 additions & 1 deletion tests/sanity/tests/collaborative/issues.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ test.describe('Collaborative test for issue', () => {

test('Issues can be assigned to another users', async ({ page, browser }) => {
const newIssue: NewIssue = {
title: `Collaborative test for issue-${generateId()}`,
title: 'Collaborative test for issue',
description: 'Collaborative test for issue',
status: 'Backlog',
priority: 'Urgent',
Expand All @@ -37,6 +37,7 @@ test.describe('Collaborative test for issue', () => {
await (await userSecondPage.goto(`${PlatformURI}/workbench/sanity-ws/tracker/`))?.finished()
const leftSideMenuPageSecond = new LeftSideMenuPage(userSecondPage)
await leftSideMenuPageSecond.buttonTracker.click()

const issuesPageSecond = new IssuesPage(userSecondPage)
await issuesPageSecond.linkSidebarAll.click()
await issuesPageSecond.modelSelectorAll.click()
Expand Down Expand Up @@ -64,4 +65,47 @@ test.describe('Collaborative test for issue', () => {
estimation: '2h'
})
})

test('Issues status can be changed by another users', async ({ page, browser }) => {
const issue: NewIssue = {
title: 'Issues status can be changed by another users',
description: 'Collaborative test for issue'
}

// open second page
const userSecondPage = await getSecondPage(browser)
await (await userSecondPage.goto(`${PlatformURI}/workbench/sanity-ws/tracker/`))?.finished()
const leftSideMenuPageSecond = new LeftSideMenuPage(userSecondPage)
await leftSideMenuPageSecond.buttonTracker.click()

const issuesPageSecond = new IssuesPage(userSecondPage)
await issuesPageSecond.linkSidebarAll.click()
await issuesPageSecond.modelSelectorAll.click()

// change status
await (await page.goto(`${PlatformURI}/workbench/sanity-ws/tracker/`))?.finished()
const issuesPage = new IssuesPage(page)
await issuesPage.linkSidebarAll.click()
await issuesPage.modelSelectorBacklog.click()
await issuesPage.searchIssueByName(issue.title)
await issuesPage.openIssueByName(issue.title)

const issuesDetailsPage = new IssuesDetailsPage(page)
await issuesDetailsPage.editIssue({ status: 'In Progress' })

// check by another user
await issuesPageSecond.modelSelectorBacklog.click()
// not active for another user
await issuesPageSecond.checkIssueNotExist(issue.title)

await issuesPageSecond.modelSelectorActive.click()
await issuesPageSecond.searchIssueByName(issue.title)
await issuesPageSecond.openIssueByName(issue.title)

const issuesDetailsPageSecond = new IssuesDetailsPage(userSecondPage)
await issuesDetailsPageSecond.checkIssue({
...issue,
status: 'In Progress'
})
})
})