diff --git a/tests/sanity/tests/tracker/issues.spec.ts b/tests/sanity/tests/tracker/issues.spec.ts index cc5d1cafbc..05c048f646 100644 --- a/tests/sanity/tests/tracker/issues.spec.ts +++ b/tests/sanity/tests/tracker/issues.spec.ts @@ -226,4 +226,33 @@ test.describe('Tracker issue tests', () => { // await issuesDetailsPage.checkActivityExist('changed project in') // await issuesDetailsPage.checkActivityExist('changed number in') }) + + test('Comment stored after reload the page', async ({ page }) => { + const commentText = `Comment should be stored after reload-${generateId()}` + const commentIssue: NewIssue = { + title: `Issue for stored comment-${generateId()}`, + description: 'Issue for comment stored after reload the page' + } + + const leftSideMenuPage = new LeftSideMenuPage(page) + await leftSideMenuPage.buttonTracker.click() + + const trackerNavigationMenuPage = new TrackerNavigationMenuPage(page) + await trackerNavigationMenuPage.openIssuesForProject('Default') + + const issuesPage = new IssuesPage(page) + await issuesPage.modelSelectorAll.click() + await issuesPage.createNewIssue(commentIssue) + await issuesPage.searchIssueByName(commentIssue.title) + await issuesPage.openIssueByName(commentIssue.title) + + const issuesDetailsPage = new IssuesDetailsPage(page) + await issuesDetailsPage.waitDetailsOpened(commentIssue.title) + await issuesDetailsPage.addComment(commentText) + await issuesDetailsPage.checkCommentExist(commentText) + + await page.reload() + await issuesDetailsPage.waitDetailsOpened(commentIssue.title) + await issuesDetailsPage.checkCommentExist(commentText) + }) })