Browse Source

fix(test): percent field pw test fail issue

nc-feat/percent-field-v2
Ramesh Mane 10 months ago
parent
commit
66b33fa6b5
  1. 2
      tests/playwright/quickTests/commonTest.ts
  2. 5
      tests/playwright/setup/demoTable.ts

2
tests/playwright/quickTests/commonTest.ts

@ -13,7 +13,7 @@ const recordCells = {
URL: 'www.a.com',
Number: '1',
Value: '$1.00',
Percent: '0.01',
Percent: '1.00%',
};
// links/ computed fields

5
tests/playwright/setup/demoTable.ts

@ -228,6 +228,11 @@ async function createDemoTable({
Year: rowMixedValue(columns.numberBased[7], i),
Time: rowMixedValue(columns.numberBased[8], i, context.dbType),
};
// For percent field user will type `cellValue=33` but while storing it in backend we convert it to `cellValue/100`
if (row.Percent !== null) {
row.Percent = (row.Percent as number) / 100;
}
rowAttributes.push(row);
}
break;

Loading…
Cancel
Save