From 189eb277633902fcd9e8a7c1e32a97a98360ad59 Mon Sep 17 00:00:00 2001 From: Alex Velichko Date: Mon, 4 Mar 2024 13:37:20 +0300 Subject: [PATCH] feat(tests): updated Created date filter test (#4868) Signed-off-by: Alex Velichko --- tests/sanity/tests/tracker/filter.spec.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/sanity/tests/tracker/filter.spec.ts b/tests/sanity/tests/tracker/filter.spec.ts index 8ee5a9ebea..ecf353e945 100644 --- a/tests/sanity/tests/tracker/filter.spec.ts +++ b/tests/sanity/tests/tracker/filter.spec.ts @@ -155,7 +155,13 @@ test.describe('Tracker filters tests', () => { await issuesPage.checkFilter('Created date', 'This week') await issuesPage.checkFilteredIssueExist(newIssue.title) - await issuesPage.checkFilteredIssueExist(yesterdayIssueTitle) + + // 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 test.step('Check Filter This month', async () => {