Skip to content

Commit

Permalink
feat(tests): TESTS-93 updated Created date filter test (hcengineering…
Browse files Browse the repository at this point in the history
…#4862)

Signed-off-by: Alex Velichko <alex@hardcoreeng.com>
Signed-off-by: Tiago Cruz <tcruz@netic.io>
  • Loading branch information
nestoragent authored and tjaoc committed Mar 5, 2024
1 parent 7008c17 commit 79bac82
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 35 deletions.
Binary file modified tests/sanity-ws/backup.json.gz
Binary file not shown.
36 changes: 1 addition & 35 deletions tests/sanity/tests/tracker/filter.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,7 @@ test.describe('Tracker filters tests', () => {
await issuesPage.checkFilter('Created date', 'This week')

await issuesPage.checkFilteredIssueExist(newIssue.title)
// this week filter started on Monday, the yesterday created issue on Sunday
if (new Date().getDay() !== 1) {
await issuesPage.checkFilteredIssueExist(yesterdayIssueTitle)
} else {
await issuesPage.checkFilteredIssueNotExist(yesterdayIssueTitle)
}
await issuesPage.checkFilteredIssueExist(yesterdayIssueTitle)
})

await test.step('Check Filter This month', async () => {
Expand Down Expand Up @@ -308,33 +303,4 @@ test.describe('Tracker filters tests', () => {
await issuesDetailsPage.buttonCloseIssue.click()
}
})

test('Title filter', async ({ page }) => {
const firstSearch = 'issue'
const secondSearch = 'done'
const leftSideMenuPage = new LeftSideMenuPage(page)
await leftSideMenuPage.buttonTracker.click()

const issuesPage = new IssuesPage(page)
await issuesPage.modelSelectorAll.click()

await test.step(`Check Title filter for ${firstSearch}`, async () => {
await issuesPage.selectFilter('Title', firstSearch)
await issuesPage.checkFilter('Title', 'contains', firstSearch)

for await (const issue of iterateLocator(issuesPage.issuesList)) {
await expect(issue.locator('span.presenter-label > a')).toContainText(firstSearch, { ignoreCase: true })
}
})

await test.step(`Check Title filter for ${secondSearch}`, async () => {
await issuesPage.buttonClearFilters.click()
await issuesPage.selectFilter('Title', secondSearch)
await issuesPage.checkFilter('Title', 'contains', secondSearch)

for await (const issue of iterateLocator(issuesPage.issuesList)) {
await expect(issue.locator('span.presenter-label > a')).toContainText(secondSearch, { ignoreCase: true })
}
})
})
})

0 comments on commit 79bac82

Please sign in to comment.