Browse Source

Merge pull request #5480 from nocodb/test/formulas

test: formula verification for OR, AND, IF, SEARCH
pull/5481/head
Raju Udava 1 year ago committed by GitHub
parent
commit
a136adf18f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      tests/playwright/tests/columnFormula.spec.ts

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

@ -122,6 +122,18 @@ const formulaDataByDbType = (context: NcContext) => [
formula: `NOW()`,
result: ['1', '1', '1', '1', '1'],
},
{
formula: `OR(true, false)`,
result: isPg(context) ? ['true', 'true', 'true', 'true', 'true'] : ['1', '1', '1', '1', '1'],
},
{
formula: `AND(false, false)`,
result: isPg(context) ? ['false', 'false', 'false', 'false', 'false'] : ['0', '0', '0', '0', '0'],
},
{
formula: `IF((SEARCH({Address List}, "Parkway") != 0), "2.0","WRONG")`,
result: ['WRONG', 'WRONG', 'WRONG', '2.0', '2.0'],
},
];
test.describe('Virtual Columns', () => {

Loading…
Cancel
Save