From 3c2270a5ad7b2b1d41d1bf73f02df1f320313c85 Mon Sep 17 00:00:00 2001 From: neverland Date: Thu, 25 Jul 2019 19:03:16 +0800 Subject: [PATCH] [bugfix] Tabs: incorrect line position in some cases (#3961) --- src/address-edit/test/index.spec.js | 4 +- src/dialog/test/index.spec.js | 4 +- .../test/__snapshots__/index.spec.js.snap | 14 +-- src/image-preview/test/index.spec.js | 4 +- src/list/index.js | 9 +- src/list/test/__snapshots__/demo.spec.js.snap | 5 +- src/list/test/index.spec.js | 17 --- src/notify/test/index.spec.js | 4 +- src/popup/test/index.spec.js | 4 +- src/sticky/test/demo.spec.js | 2 - src/sticky/test/index.spec.js | 5 +- src/tabs/index.js | 3 +- src/toast/test/index.spec.js | 4 +- .../test/__snapshots__/index.spec.js.snap | 1 + src/utils/dom/style.ts | 5 + test/utils.ts | 112 ------------------ test/utils/dom.ts | 48 ++++++++ test/utils/event.ts | 56 +++++++++ test/utils/index.ts | 17 +++ test/utils/transition.ts | 4 + 20 files changed, 154 insertions(+), 168 deletions(-) create mode 100644 src/utils/dom/style.ts delete mode 100644 test/utils.ts create mode 100644 test/utils/dom.ts create mode 100644 test/utils/event.ts create mode 100644 test/utils/index.ts create mode 100644 test/utils/transition.ts diff --git a/src/address-edit/test/index.spec.js b/src/address-edit/test/index.spec.js index 83a754da8..079c84e4d 100644 --- a/src/address-edit/test/index.spec.js +++ b/src/address-edit/test/index.spec.js @@ -1,9 +1,7 @@ /* eslint-disable camelcase */ import AddressEdit from '..'; import areaList from '../../area/demo/area.simple'; -import { mount, later, transitionStub } from '../../../test/utils'; - -transitionStub(); +import { mount, later } from '../../../test/utils'; const addressInfo = { name: '测试', diff --git a/src/dialog/test/index.spec.js b/src/dialog/test/index.spec.js index 523558acc..8ad8d3a7a 100644 --- a/src/dialog/test/index.spec.js +++ b/src/dialog/test/index.spec.js @@ -1,9 +1,7 @@ import Vue from 'vue'; import Dialog from '..'; import DialogVue from '../Dialog'; -import { mount, later, trigger, transitionStub } from '../../../test/utils'; - -transitionStub(); +import { mount, later, trigger } from '../../../test/utils'; test('Dialog function call', async () => { Dialog.close(); diff --git a/src/dropdown-menu/test/__snapshots__/index.spec.js.snap b/src/dropdown-menu/test/__snapshots__/index.spec.js.snap index e1cfef488..a56c2a76d 100644 --- a/src/dropdown-menu/test/__snapshots__/index.spec.js.snap +++ b/src/dropdown-menu/test/__snapshots__/index.spec.js.snap @@ -27,7 +27,7 @@ exports[`close-on-click-outside 1`] = `
A
A
-
+