From 3b1d48b4b4e16b46438cc2e079c69e3b8086f61a Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Sun, 22 May 2022 21:45:48 +0800 Subject: [PATCH] test: update test --- .../__tests__/__snapshots__/demo.test.js.snap | 745 +++++++++++------- .../__snapshots__/index.test.js.snap | 4 +- .../__tests__/__snapshots__/demo.test.js.snap | 32 +- .../Table.rowSelection.test.js.snap | 98 ++- .../__snapshots__/Table.sorter.test.js.snap | 2 +- .../__tests__/__snapshots__/demo.test.js.snap | 157 +++- .../__snapshots__/empty.test.js.snap | 2 +- components/table/demo/index.vue | 3 + .../__tests__/__snapshots__/demo.test.js.snap | 147 +++- .../__snapshots__/index.test.js.snap | 3 +- .../__tests__/__snapshots__/demo.test.js.snap | 133 +++- .../__snapshots__/search.test.js.snap | 4 +- .../__tests__/__snapshots__/demo.test.js.snap | 71 +- 13 files changed, 983 insertions(+), 418 deletions(-) diff --git a/components/page-header/__tests__/__snapshots__/demo.test.js.snap b/components/page-header/__tests__/__snapshots__/demo.test.js.snap index 7ef6e476f..0ef86f0f9 100644 --- a/components/page-header/__tests__/__snapshots__/demo.test.js.snap +++ b/components/page-header/__tests__/__snapshots__/demo.test.js.snap @@ -65,47 +65,74 @@ exports[`renders ./components/page-header/demo/actions.vue correctly 1`] = ` - - + - - Operation - - - - + - - Operation - - - - + - - Primary - - - - +
- - +
- - Operation - - - - + - - Operation - - - - + - - Primary - - - - +
@@ -559,64 +614,66 @@ exports[`renders ./components/page-header/demo/breadcrumb.vue correctly 1`] = ` class="ant-page-header has-breadcrumb ant-page-header-ghost" style="border: 1px solid rgb(235, 237, 240);" > -
- - - - - + +
  • + - First-level Menu - - - - - / - - - - - - - Second-level Menu - - - - - / - - - - - - - Third-level Menu + + + First-level Menu + + - - - - / - - - -
  • + + / + + +
  • + + + + Second-level Menu + + + + + / + +
  • +
  • + + + + Third-level Menu + + + + + / + +
  • + + +
    @@ -653,64 +710,66 @@ exports[`renders ./components/page-header/demo/content.vue correctly 1`] = `
    -
    - - - - - + +
  • + - First-level Menu - - - - - / - - - - - - - Second-level Menu - - - - - / - - - - - - - Third-level Menu + + + First-level Menu + + - - - - / - - - -
  • + + / + + +
  • + + + + Second-level Menu + + + + + / + +
  • +
  • + + + + Third-level Menu + + + + + / + +
  • + + +
    @@ -755,82 +814,117 @@ exports[`renders ./components/page-header/demo/content.vue correctly 1`] = ` - - - - - - - +
    + - - - + +
    + +
    + + + +
    + +
    + + + +
    + + + + +
    + + + +
    - - +
    - - Operation - - - - +
    - - Operation - - - - +
    - - Primary - - - - +
    - - +
    - - Operation - - - - + - - Operation - - - - + - - Primary - - - - +
    xx 1`] = `
    -
    +
    @@ -14,7 +14,7 @@ exports[`Spin should only affect the spin element when set style to a nested +
    diff --git a/components/statistic/__tests__/__snapshots__/demo.test.js.snap b/components/statistic/__tests__/__snapshots__/demo.test.js.snap index 89c18d055..096944f43 100644 --- a/components/statistic/__tests__/__snapshots__/demo.test.js.snap +++ b/components/statistic/__tests__/__snapshots__/demo.test.js.snap @@ -1,8 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`renders ./components/statistic/demo/basic.vue correctly 1`] = ` -
    -
    +
    +
    Active Users
    @@ -11,7 +11,7 @@ exports[`renders ./components/statistic/demo/basic.vue correctly 1`] = `
    -
    +
    Account Balance (CNY)
    @@ -25,8 +25,8 @@ exports[`renders ./components/statistic/demo/basic.vue correctly 1`] = ` exports[`renders ./components/statistic/demo/card.vue correctly 1`] = `
    -
    -
    +
    +
    @@ -39,7 +39,7 @@ exports[`renders ./components/statistic/demo/card.vue correctly 1`] = `
    -
    +
    @@ -57,8 +57,8 @@ exports[`renders ./components/statistic/demo/card.vue correctly 1`] = ` `; exports[`renders ./components/statistic/demo/countdown.vue correctly 1`] = ` -
    -
    +
    +
    Countdown
    @@ -67,7 +67,7 @@ exports[`renders ./components/statistic/demo/countdown.vue correctly 1`] = `
    -
    +
    Million Seconds
    @@ -76,7 +76,7 @@ exports[`renders ./components/statistic/demo/countdown.vue correctly 1`] = `
    -
    +
    Day Level
    @@ -89,8 +89,8 @@ exports[`renders ./components/statistic/demo/countdown.vue correctly 1`] = ` `; exports[`renders ./components/statistic/demo/countdown-slot.vue correctly 1`] = ` -
    -
    +
    +
    Countdown @@ -101,7 +101,7 @@ exports[`renders ./components/statistic/demo/countdown-slot.vue correctly 1`] =
    -
    +
    Million Seconds countdown
    There's only40:00:00:000left for the end.
    @@ -111,8 +111,8 @@ exports[`renders ./components/statistic/demo/countdown-slot.vue correctly 1`] = `; exports[`renders ./components/statistic/demo/unit.vue correctly 1`] = ` -
    -
    +
    +
    Feedback
    @@ -120,7 +120,7 @@ exports[`renders ./components/statistic/demo/unit.vue correctly 1`] = `
    -
    +
    Unmerged
    diff --git a/components/table/__tests__/__snapshots__/Table.rowSelection.test.js.snap b/components/table/__tests__/__snapshots__/Table.rowSelection.test.js.snap index 392d7f744..e08fd7359 100644 --- a/components/table/__tests__/__snapshots__/Table.rowSelection.test.js.snap +++ b/components/table/__tests__/__snapshots__/Table.rowSelection.test.js.snap @@ -107,57 +107,55 @@ exports[`Table.rowSelection render with default selection correctly 1`] = `
    `; diff --git a/components/table/__tests__/__snapshots__/Table.sorter.test.js.snap b/components/table/__tests__/__snapshots__/Table.sorter.test.js.snap index e478e7776..0c7552317 100644 --- a/components/table/__tests__/__snapshots__/Table.sorter.test.js.snap +++ b/components/table/__tests__/__snapshots__/Table.sorter.test.js.snap @@ -3,7 +3,7 @@ exports[`Table.sorter renders sorter icon correctly 1`] = ` - +
    Name
    diff --git a/components/table/__tests__/__snapshots__/demo.test.js.snap b/components/table/__tests__/__snapshots__/demo.test.js.snap index f5d882d7c..b3df7eba0 100644 --- a/components/table/__tests__/__snapshots__/demo.test.js.snap +++ b/components/table/__tests__/__snapshots__/demo.test.js.snap @@ -886,7 +886,8 @@ exports[`renders ./components/table/demo/edit-row.vue correctly 1`] = `
    10 / page -
    +
    @@ -1320,7 +1321,127 @@ exports[`renders ./components/table/demo/filter-in-tree.vue correctly 1`] = `
    - + + + +
    Age
    + + + + +
    Address + +
    + + + + + + + + + John Brown + + + + 32 + + + + New York No. 1 Lake Park + + + + + + + Jim Green + + + + 42 + + + + London No. 1 Lake Park + + + + + + + Joe Black + + + + 32 + + + + Sidney No. 1 Lake Park + + + + + + + Jim Red + + + + 32 + + + + London No. 2 Lake Park + + + + + + + +
    +
    + +
    +
      + +
    • +
    • 1
    • +
    • + +
    +
    +
    +
    +`; + +exports[`renders ./components/table/demo/filter-search.vue correctly 1`] = ` +
    +
    + +
    +
    + +
    +
    + + + + + + + + + + - - - - - - - - - -
    + +
    Name + +
    + +
    Age
    @@ -2255,7 +2376,8 @@ exports[`renders ./components/table/demo/fixed-columns-header.vue correctly 1`]
    10 / page -
    + @@ -3085,7 +3207,8 @@ exports[`renders ./components/table/demo/fixed-header.vue correctly 1`] = `
    50 / page -
    + @@ -3130,7 +3253,7 @@ exports[`renders ./components/table/demo/grouping-columns.vue correctly 1`] = `
    +
    Age
    @@ -3590,7 +3713,8 @@ exports[`renders ./components/table/demo/grouping-columns.vue correctly 1`] = `
    10 / page -
    + @@ -3614,20 +3738,20 @@ exports[`renders ./components/table/demo/head.vue correctly 1`] = `
    +
    Name
    +
    Age
    +
    Address
    @@ -3734,19 +3858,19 @@ exports[`renders ./components/table/demo/multiple-sorter.vue correctly 1`] = ` Name
    +
    Chinese Score
    +
    Math Score
    +
    English Score
    @@ -4213,20 +4337,20 @@ exports[`renders ./components/table/demo/reset-filter.vue correctly 1`] = `
    +
    Name
    +
    Age
    +
    Address
    @@ -6013,7 +6137,8 @@ exports[`renders ./components/table/demo/sticky.vue correctly 1`] = `
    10 / page -
    +
    diff --git a/components/table/__tests__/__snapshots__/empty.test.js.snap b/components/table/__tests__/__snapshots__/empty.test.js.snap index 5498413d3..495bf5541 100644 --- a/components/table/__tests__/__snapshots__/empty.test.js.snap +++ b/components/table/__tests__/__snapshots__/empty.test.js.snap @@ -255,7 +255,7 @@ exports[`Table renders empty table without emptyText when loading 1`] = `
    -
    +
    diff --git a/components/table/demo/index.vue b/components/table/demo/index.vue index 8c7efd643..2564b5527 100644 --- a/components/table/demo/index.vue +++ b/components/table/demo/index.vue @@ -19,6 +19,7 @@ + @@ -63,6 +64,7 @@ import Sticky from './sticky.vue'; import ResizableColumn from './resizable-column.vue'; import Responsive from './responsive.vue'; import filterSearchVue from './filter-search.vue'; +import filterInTreeVue from './filter-in-tree.vue'; import CN from '../index.zh-CN.md'; import US from '../index.en-US.md'; import { defineComponent } from 'vue'; @@ -71,6 +73,7 @@ export default defineComponent({ CN, US, components: { + filterInTreeVue, filterSearchVue, Basic, Ellipsis, diff --git a/components/time-picker/__tests__/__snapshots__/demo.test.js.snap b/components/time-picker/__tests__/__snapshots__/demo.test.js.snap index 4c850a5b5..c2d612cad 100644 --- a/components/time-picker/__tests__/__snapshots__/demo.test.js.snap +++ b/components/time-picker/__tests__/__snapshots__/demo.test.js.snap @@ -4,7 +4,8 @@ exports[`renders ./components/time-picker/demo/12hours.vue correctly 1`] = `
    -
    +
    +
    @@ -13,7 +14,8 @@ exports[`renders ./components/time-picker/demo/12hours.vue correctly 1`] = `
    -
    +
    +
    @@ -22,7 +24,8 @@ exports[`renders ./components/time-picker/demo/12hours.vue correctly 1`] = `
    -
    +
    +
    @@ -36,7 +39,8 @@ exports[`renders ./components/time-picker/demo/addon.vue correctly 1`] = `
    -
    +
    +
    @@ -45,7 +49,8 @@ exports[`renders ./components/time-picker/demo/addon.vue correctly 1`] = `
    -
    +
    +
    @@ -59,14 +64,18 @@ exports[`renders ./components/time-picker/demo/basic.vue correctly 1`] = `
    -
    +
    + +
    -
    +
    + +
    @@ -78,7 +87,8 @@ exports[`renders ./components/time-picker/demo/bordered.vue correctly 1`] = `
    -
    +
    +
    @@ -90,7 +100,8 @@ exports[`renders ./components/time-picker/demo/bordered.vue correctly 1`] = `
    -
    +
    +
    @@ -101,7 +112,8 @@ exports[`renders ./components/time-picker/demo/bordered.vue correctly 1`] = ` exports[`renders ./components/time-picker/demo/disabled.vue correctly 1`] = `
    -
    +
    +
    @@ -110,26 +122,60 @@ exports[`renders ./components/time-picker/demo/disabled.vue correctly 1`] = ` exports[`renders ./components/time-picker/demo/hide-column.vue correctly 1`] = `
    -
    +
    + +
    `; exports[`renders ./components/time-picker/demo/interval-options.vue correctly 1`] = `
    -
    +
    +
    `; +exports[`renders ./components/time-picker/demo/placement.vue correctly 1`] = ` +
    +
    +
    +
    +
    +
    +
    + + +
    + +
    +
    + +
    +
    +
    +
    +
    +
    + + + +
    +
    + +
    +`; + exports[`renders ./components/time-picker/demo/range-picker.vue correctly 1`] = `
    -
    +
    +
    @@ -139,21 +185,76 @@ exports[`renders ./components/time-picker/demo/size.vue correctly 1`] = `
    -
    +
    + +
    -
    +
    + +
    -
    +
    + +
    + +
    +
    + +
    +`; + +exports[`renders ./components/time-picker/demo/status.vue correctly 1`] = ` +
    +
    +
    +
    + + +
    + +
    +
    + +
    +
    +
    + + +
    + +
    +
    + +
    +
    +
    +
    +
    +
    + + + +
    +
    + +
    +
    +
    +
    +
    +
    + +
    @@ -163,7 +264,9 @@ exports[`renders ./components/time-picker/demo/size.vue correctly 1`] = ` exports[`renders ./components/time-picker/demo/suffix.vue correctly 1`] = `
    -
    +
    + +
    `; @@ -176,7 +279,8 @@ exports[`renders ./components/time-picker/demo/value.vue correctly 1`] = `
    -
    +
    +
    @@ -189,7 +293,8 @@ exports[`renders ./components/time-picker/demo/value.vue correctly 1`] = `
    -
    +
    +
    @@ -202,7 +307,9 @@ exports[`renders ./components/time-picker/demo/value.vue correctly 1`] = `
    -
    +
    + +
    diff --git a/components/time-picker/__tests__/__snapshots__/index.test.js.snap b/components/time-picker/__tests__/__snapshots__/index.test.js.snap index daf058ef6..69a64e2c9 100644 --- a/components/time-picker/__tests__/__snapshots__/index.test.js.snap +++ b/components/time-picker/__tests__/__snapshots__/index.test.js.snap @@ -2,7 +2,8 @@ exports[`TimePicker not render clean icon when allowClear is false 1`] = `
    -
    +
    +
    diff --git a/components/transfer/__tests__/__snapshots__/demo.test.js.snap b/components/transfer/__tests__/__snapshots__/demo.test.js.snap index 36b401be3..cc26180df 100644 --- a/components/transfer/__tests__/__snapshots__/demo.test.js.snap +++ b/components/transfer/__tests__/__snapshots__/demo.test.js.snap @@ -9,7 +9,7 @@ exports[`renders ./components/transfer/demo/advanced.vue correctly 1`] = ` 20 items
    `; +exports[`renders ./components/tree-select/demo/placement.vue correctly 1`] = ` +
    +
    +
    + +`; + exports[`renders ./components/tree-select/demo/replaceFields.vue correctly 1`] = ` + +
    +`; + +exports[`renders ./components/tree-select/demo/status.vue correctly 1`] = ` +
    +
    +
    + + +
    + Error +
    + +
    +
    + +
    + +
    `; @@ -110,7 +164,8 @@ exports[`renders ./components/tree-select/demo/suffix.vue correctly 1`] = `
    Please select -
    +
    @@ -127,7 +182,8 @@ exports[`renders ./components/tree-select/demo/suffix.vue correctly 1`] = `
    Please select -
    +
    @@ -155,7 +211,8 @@ exports[`renders ./components/tree-select/demo/tree-line.vue correctly 1`] = `
    Please select -
    +