Browse Source

cypress: fix percent & duration tests

test/percent
Wing-Kam Wong 2 years ago
parent
commit
9cc8ca2873
  1. 2
      packages/nc-gui/components/project/spreadsheet/components/cell/DurationCell.vue
  2. 2
      packages/nc-gui/components/project/spreadsheet/components/cell/PercentCell.vue
  3. 7
      scripts/cypress/integration/common/9a_QuickTest.js

2
packages/nc-gui/components/project/spreadsheet/components/cell/DurationCell.vue

@ -1,5 +1,5 @@
<template>
<span>{{ localValue }}</span>
<input v-model="localValue" :placeholder="durationPlaceholder" readonly />
</template>
<script>

2
packages/nc-gui/components/project/spreadsheet/components/cell/PercentCell.vue

@ -1,5 +1,5 @@
<template>
<span>{{ localValue }}</span>
<input v-model="localValue" readonly />
</template>
<script>

7
scripts/cypress/integration/common/9a_QuickTest.js

@ -16,12 +16,12 @@ let records = {
URL: "www.a.com",
Number: "1",
Value: "$1.00",
Percent: "1%", // 0.01 in AT
};
// links/ computed fields
let records2 = {
Duration: "00:01",
Percent: "1%", // 0.01 in AT
Done: true,
Date: "2022-05-31",
Rating: "1",
@ -118,6 +118,11 @@ export const genTest = (apiType, dbType, testMode) => {
// date
// percent
mainPage.getCell("Percent", cellIdx).find('input').then(($e) => {
expect($e[0].value).to.equal(records2.Percent)
})
// duration
mainPage.getCell("Duration", cellIdx).find('input').then(($e) => {
expect($e[0].value).to.equal(records2.Duration)

Loading…
Cancel
Save