From ee9ba197ba7925853291d49f43f279fc17537d91 Mon Sep 17 00:00:00 2001 From: tanjinzhou <415800467@qq.com> Date: Mon, 26 Oct 2020 18:31:50 +0800 Subject: [PATCH] test: update snap --- components/_util/transition.tsx | 13 +- .../__tests__/__snapshots__/demo.test.js.snap | 2 +- .../__tests__/__snapshots__/demo.test.js.snap | 64 +- .../__tests__/__snapshots__/demo.test.js.snap | 130 +- .../__tests__/__snapshots__/demo.test.js.snap | 214 +- .../__snapshots__/index.test.js.snap | 16 +- components/select/__tests__/index.test.js | 45 +- .../__tests__/__snapshots__/demo.test.js.snap | 6 +- .../__snapshots__/index.test.js.snap | 4 +- components/steps/index.tsx | 3 +- .../Table.rowSelection.test.js.snap | 7 + .../__snapshots__/Table.test.js.snap | 7 + .../__tests__/__snapshots__/demo.test.js.snap | 8 +- components/table/interface.ts | 16 +- components/tooltip/abstractTooltipProps.ts | 1 + .../__tests__/__snapshots__/demo.test.js.snap | 12619 ++++++++-------- .../__tests__/__snapshots__/demo.test.js.snap | 53 +- .../__tests__/__snapshots__/demo.test.js.snap | 2 +- .../__tests__/__snapshots__/demo.test.js.snap | 26 +- .../vc-select/Selector/MultipleSelector.tsx | 2 +- 20 files changed, 6638 insertions(+), 6600 deletions(-) diff --git a/components/_util/transition.tsx b/components/_util/transition.tsx index c762203de..d3534fd0f 100644 --- a/components/_util/transition.tsx +++ b/components/_util/transition.tsx @@ -1,4 +1,4 @@ -import { defineComponent, Fragment, nextTick, Transition as T, TransitionGroup as TG } from 'vue'; +import { defineComponent, nextTick, Transition as T, TransitionGroup as TG } from 'vue'; import { findDOMNode } from './props-util'; export const getTransitionProps = (transitionName: string, opt: object = {}) => { @@ -60,14 +60,21 @@ if (process.env.NODE_ENV === 'test') { } return slots.default?.(); }; + Transition.displayName = 'TransitionForTest' Transition.inheritAttrs = false; TransitionGroup = defineComponent({ + name: 'TransitionGroupForTest', inheritAttrs: false, props: ['tag', 'class'], setup(props, { slots }) { - const { tag: Tag = Fragment, ...rest } = props; + const { tag: Tag, ...rest } = props; return () => { - return {slots.default?.()}; + const children = slots.default?.() || []; + if(Tag) { + return {children} + } else { + return children; + } }; }, }); diff --git a/components/page-header/__tests__/__snapshots__/demo.test.js.snap b/components/page-header/__tests__/__snapshots__/demo.test.js.snap index 2710fb58b..b74299d1e 100644 --- a/components/page-header/__tests__/__snapshots__/demo.test.js.snap +++ b/components/page-header/__tests__/__snapshots__/demo.test.js.snap @@ -327,7 +327,7 @@ exports[`renders ./antdv-demo/docs/page-header/demo/actions.md correctly 1`] = `
25
  • - -
    - +
    + + +
    20 / page + +
    +
  • @@ -58,15 +56,13 @@ exports[`renders ./antdv-demo/docs/pagination/demo/changer.md correctly 1`] = `
  • 50
  • - -
    - +
    + + +
    10 / page + +
    +
  • @@ -99,15 +95,13 @@ exports[`renders ./antdv-demo/docs/pagination/demo/custom-changer.md correctly 1
  • 5
  • - -
    - +
    + + +
    10条/页 + +
    +
  • @@ -198,15 +192,13 @@ exports[`renders ./antdv-demo/docs/pagination/demo/mini.md correctly 1`] = `
  • 5
  • - -
    - +
    + + +
    10 / page + +
    +
    Go to diff --git a/components/result/__tests__/__snapshots__/demo.test.js.snap b/components/result/__tests__/__snapshots__/demo.test.js.snap index f382fd981..393ab8c3d 100644 --- a/components/result/__tests__/__snapshots__/demo.test.js.snap +++ b/components/result/__tests__/__snapshots__/demo.test.js.snap @@ -3,16 +3,16 @@ exports[`renders ./antdv-demo/docs/result/demo/403.md correctly 1`] = `
    - + - + - + - - + + @@ -24,26 +24,26 @@ exports[`renders ./antdv-demo/docs/result/demo/403.md correctly 1`] = ` - - + + - + - + - - - - - - + + + + + + - - - + + + @@ -51,13 +51,13 @@ exports[`renders ./antdv-demo/docs/result/demo/403.md correctly 1`] = ` - - - + + + - +
    403
    @@ -75,19 +75,19 @@ exports[`renders ./antdv-demo/docs/result/demo/404.md correctly 1`] = ` - + - + - + - - + + @@ -101,25 +101,25 @@ exports[`renders ./antdv-demo/docs/result/demo/404.md correctly 1`] = ` - - - + + + - + - - - - - - - - + + + + + + + + @@ -128,13 +128,13 @@ exports[`renders ./antdv-demo/docs/result/demo/404.md correctly 1`] = ` - - - + + + - +
    404
    @@ -153,13 +153,13 @@ exports[`renders ./antdv-demo/docs/result/demo/500.md correctly 1`] = ` - + - + @@ -170,16 +170,16 @@ exports[`renders ./antdv-demo/docs/result/demo/500.md correctly 1`] = ` - - - - - - + + + + + + - + @@ -189,22 +189,22 @@ exports[`renders ./antdv-demo/docs/result/demo/500.md correctly 1`] = ` - - - + + + - - + + - - + + - - - - + + + + @@ -212,10 +212,10 @@ exports[`renders ./antdv-demo/docs/result/demo/500.md correctly 1`] = ` - + - + diff --git a/components/select/__tests__/__snapshots__/demo.test.js.snap b/components/select/__tests__/__snapshots__/demo.test.js.snap index c3babc8ed..879fadb8a 100644 --- a/components/select/__tests__/__snapshots__/demo.test.js.snap +++ b/components/select/__tests__/__snapshots__/demo.test.js.snap @@ -20,74 +20,62 @@ exports[`renders ./antdv-demo/docs/select/demo/automatic-tokenization.md correct exports[`renders ./antdv-demo/docs/select/demo/basic.md correctly 1`] = `
    - -
    - +
    + + +
    Lucy + +
    +
    - -
    - +
    + + +
    Lucy + +
    +
    - -
    - +
    + + +
    Lucy + +
    +
    `; exports[`renders ./antdv-demo/docs/select/demo/coordinate.md correctly 1`] = `
    - -
    - +
    + + +
    Zhejiang + +
    +
    - -
    - +
    + + +
    Hangzhou + +
    +
    `; exports[`renders ./antdv-demo/docs/select/demo/custom-dropdown-menu.md correctly 1`] = ` - -
    - +
    + + +
    lucy + +
    +
    `; @@ -110,15 +98,13 @@ exports[`renders ./antdv-demo/docs/select/demo/hide-selected.md correctly 1`] = `; exports[`renders ./antdv-demo/docs/select/demo/label-in-value.md correctly 1`] = ` - -
    - +
    + + +
    Lucy (101) + +
    +
    `; @@ -147,15 +133,13 @@ exports[`renders ./antdv-demo/docs/select/demo/multiple.md correctly 1`] = ` `; exports[`renders ./antdv-demo/docs/select/demo/optgroup.md correctly 1`] = ` - -
    - +
    + + +
    Lucy + +
    +
    `; @@ -181,48 +165,36 @@ exports[`renders ./antdv-demo/docs/select/demo/option-label-prop.md correctly 1` `; exports[`renders ./antdv-demo/docs/select/demo/options.md correctly 1`] = ` - -
    - +
    + + +
    北京 + +
    +
    `; exports[`renders ./antdv-demo/docs/select/demo/search.md correctly 1`] = ` - -
    - + `; exports[`renders ./antdv-demo/docs/select/demo/search-box.md correctly 1`] = ` - -
    -