|
|
|
@ -668,7 +668,7 @@ test.describe('Filter Tests: Date based', () => {
|
|
|
|
|
const oneYearAgo = new Date(new Date().setFullYear(new Date().getFullYear() - 1)).setHours(0, 0, 0, 0); |
|
|
|
|
const oneYearFromNow = new Date(new Date().setFullYear(new Date().getFullYear() + 1)).setHours(0, 0, 0, 0); |
|
|
|
|
|
|
|
|
|
async function dateTimeBasedFilterTest(dataType) { |
|
|
|
|
async function dateTimeBasedFilterTest(dataType, setCount) { |
|
|
|
|
await dashboard.closeTab({ title: 'Team & Auth' }); |
|
|
|
|
await dashboard.treeView.openTable({ title: 'dateTimeBased' }); |
|
|
|
|
|
|
|
|
@ -829,6 +829,7 @@ test.describe('Filter Tests: Date based', () => {
|
|
|
|
|
await toolbar.clickFilter(); |
|
|
|
|
await toolbar.filter.clickAddFilter(); |
|
|
|
|
|
|
|
|
|
if (setCount === 0) { |
|
|
|
|
// "is" filter list
|
|
|
|
|
for (let i = 0; i < isFilterList.length; i++) { |
|
|
|
|
await verifyFilter_withFixedModal({ |
|
|
|
@ -864,7 +865,7 @@ test.describe('Filter Tests: Date based', () => {
|
|
|
|
|
dataType: dataType, |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
// "is on or before" filter list
|
|
|
|
|
for (let i = 0; i < isAfterFilterList.length; i++) { |
|
|
|
|
await verifyFilter_withFixedModal({ |
|
|
|
@ -925,10 +926,7 @@ test.describe('Filter Tests: Date based', () => {
|
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
test.beforeAll(async () => { |
|
|
|
|
// Set timeout for this hook.
|
|
|
|
|
test.setTimeout(180000); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
test.beforeEach(async ({ page }) => { |
|
|
|
|
context = await setup({ page }); |
|
|
|
@ -978,8 +976,12 @@ test.describe('Filter Tests: Date based', () => {
|
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
test('Date : filters', async () => { |
|
|
|
|
await dateTimeBasedFilterTest('Date'); |
|
|
|
|
test('Date : filters-1', async () => { |
|
|
|
|
await dateTimeBasedFilterTest('Date', 1); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
test('Date : filters-2', async () => { |
|
|
|
|
await dateTimeBasedFilterTest('Date', 2); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|