Browse Source

feat(playwright): add NOW() tests for datetime diff formula

pull/4809/head
Wing-Kam Wong 2 years ago
parent
commit
b65789da77
  1. 12
      tests/playwright/tests/columnFormula.spec.ts

12
tests/playwright/tests/columnFormula.spec.ts

@ -66,10 +66,22 @@ const formulaDataByDbType = (context: NcContext) => [
formula: `DATETIME_DIFF("2022/10/14", "2023/10/14", "y")`,
result: ['-1', '-1', '-1', '-1', '-1'],
},
{
formula: `DATETIME_DIFF(NOW(), "2023/10/14", "y")`,
result: ['-1', '-1', '-1', '-1', '-1'],
},
{
formula: `DATETIME_DIFF("2022/10/14", NOW(), "y")`,
result: ['0', '0', '0', '0', '0'],
},
{
formula: `DATETIME_DIFF("2022/10/14", "2023/10/14", "d")`,
result: ['-365', '-365', '-365', '-365', '-365'],
},
{
formula: `DATETIME_DIFF("2022/10/14", NOW(), "d")`,
result: ['-90', '-90', '-90', '-90', '-90'],
},
{
formula: `CONCAT(UPPER({City}), LOWER({City}), TRIM(' trimmed '))`,
result: [

Loading…
Cancel
Save