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', dateTime: '2024-04-27 10:00:00',
}); });
if (!isSqlite(context)) { await verifyFormula({
// SQLite : output is in decimal format; MySQL & Postgres : output is in integer format formula: [
await verifyFormula({ 'DATETIME_DIFF({DatetimeWithoutTz}, {DatetimeWithTz}, "days")',
formula: [ 'DATETIME_DIFF({DatetimeWithTz}, {DatetimeWithoutTz}, "days")',
'DATETIME_DIFF({DatetimeWithoutTz}, {DatetimeWithTz}, "days")', ],
'DATETIME_DIFF({DatetimeWithTz}, {DatetimeWithoutTz}, "days")', expectedDisplayValue: ['-366', '366'],
], });
expectedDisplayValue: ['-366', '366'],
});
await verifyFormula({ await verifyFormula({
formula: [ formula: [
'DATETIME_DIFF({DatetimeWithoutTz}, {DatetimeWithTz}, "months")', 'DATETIME_DIFF({DatetimeWithoutTz}, {DatetimeWithTz}, "months")',
'DATETIME_DIFF({DatetimeWithTz}, {DatetimeWithoutTz}, "months")', 'DATETIME_DIFF({DatetimeWithTz}, {DatetimeWithoutTz}, "months")',
], ],
expectedDisplayValue: ['-12', '12'], expectedDisplayValue: ['-12', '12'],
}); });
}
}); });
test('Verify display value, UI insert, API response', async () => { test('Verify display value, UI insert, API response', async () => {

Loading…
Cancel
Save