Browse Source

feat(playwright): formula DATETIME_DIFF tests

pull/4629/head
Wing-Kam Wong 2 years ago
parent
commit
40c2aada15
  1. 40
      tests/playwright/tests/columnFormula.spec.ts

40
tests/playwright/tests/columnFormula.spec.ts

@ -30,6 +30,46 @@ const formulaDataByDbType = (context: NcContext) => [
formula: `WEEKDAY("2022-07-19", "sunday")`,
result: ['2', '2', '2', '2', '2'],
},
{
formula: `DATETIME_DIFF("2022/10/14", "2022/10/15")`,
result: ['-86400', '-86400', '-86400', '-86400', '-86400'],
},
{
formula: `DATETIME_DIFF("2022/10/14", "2022/10/15", "minutes")`,
result: ['-1440', '-1440', '-1440', '-1440', '-1440'],
},
{
formula: `DATETIME_DIFF("2022/10/14", "2022/10/15", "seconds")`,
result: ['-86400', '-86400', '-86400', '-86400', '-86400'],
},
{
formula: `DATETIME_DIFF("2022/10/14", "2022/10/15", "milliseconds")`,
result: ['-86400000', '-86400000', '-86400000', '-86400000', '-86400000'],
},
{
formula: `DATETIME_DIFF("2022/10/14", "2022/10/15", "hours")`,
result: ['-24', '-24', '-24', '-24', '-24'],
},
{
formula: `DATETIME_DIFF("2022/10/14", "2022/10/15", "weeks")`,
result: ['-52', '-52', '-52', '-52', '-52'],
},
{
formula: `DATETIME_DIFF("2022/10/14", "2022/10/15", "months")`,
result: ['-12', '-12', '-12', '-12', '-12'],
},
{
formula: `DATETIME_DIFF("2022/10/14", "2022/10/15", "Q")`,
result: ['-4', '-4', '-4', '-4', '-4'],
},
{
formula: `DATETIME_DIFF("2022/10/14", "2022/10/15", "y")`,
result: ['-1', '-1', '-1', '-1', '-1'],
},
{
formula: `DATETIME_DIFF("2022/10/14", "2022/10/15", "d")`,
result: ['-365', '-365', '-365', '-365', '-365'],
},
{
formula: `CONCAT(UPPER({City}), LOWER({City}), TRIM(' trimmed '))`,
result: [

Loading…
Cancel
Save