Browse Source

test: enable datetime diff for sqlite

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/5719/head
Raju Udava 1 year ago
parent
commit
05f26beda6
  1. 31
      tests/playwright/tests/db/timezone.spec.ts

31
tests/playwright/tests/db/timezone.spec.ts

@ -657,24 +657,21 @@ test.describe.serial('External DB - DateTime column', async () => {
dateTime: '2024-04-27 10:00:00',
});
if (!isSqlite(context)) {
// SQLite : output is in decimal format; MySQL & Postgres : output is in integer format
await verifyFormula({
formula: [
'DATETIME_DIFF({DatetimeWithoutTz}, {DatetimeWithTz}, "days")',
'DATETIME_DIFF({DatetimeWithTz}, {DatetimeWithoutTz}, "days")',
],
expectedDisplayValue: ['-366', '366'],
});
await verifyFormula({
formula: [
'DATETIME_DIFF({DatetimeWithoutTz}, {DatetimeWithTz}, "days")',
'DATETIME_DIFF({DatetimeWithTz}, {DatetimeWithoutTz}, "days")',
],
expectedDisplayValue: ['-366', '366'],
});
await verifyFormula({
formula: [
'DATETIME_DIFF({DatetimeWithoutTz}, {DatetimeWithTz}, "months")',
'DATETIME_DIFF({DatetimeWithTz}, {DatetimeWithoutTz}, "months")',
],
expectedDisplayValue: ['-12', '12'],
});
}
await verifyFormula({
formula: [
'DATETIME_DIFF({DatetimeWithoutTz}, {DatetimeWithTz}, "months")',
'DATETIME_DIFF({DatetimeWithTz}, {DatetimeWithoutTz}, "months")',
],
expectedDisplayValue: ['-12', '12'],
});
});
test('Verify display value, UI insert, API response', async () => {

Loading…
Cancel
Save