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> <template>
<span>{{ localValue }}</span> <input v-model="localValue" :placeholder="durationPlaceholder" readonly />
</template> </template>
<script> <script>

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

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

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

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

Loading…
Cancel
Save