From e3039037196d4c9d73005d554e34b3987399a6fd Mon Sep 17 00:00:00 2001 From: TDesign bot <93915689+tdesign-bot@users.noreply.github.com> Date: Wed, 15 Jan 2025 11:09:20 +0800 Subject: [PATCH 1/2] chore(submodule): update common (#1722) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(submodule): update common * chore: fix test --------- Co-authored-by: tdesign-bot Co-authored-by: 黎伟杰 <674416404@qq.com> --- src/_common | 2 +- src/tabs/__test__/demo.test.jsx | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/_common b/src/_common index 53786c587..c569a218e 160000 --- a/src/_common +++ b/src/_common @@ -1 +1 @@ -Subproject commit 53786c58752401e648cc45918f2a4dbb9e8cecfa +Subproject commit c569a218ec1547b4924c429337237ebdcf3b23d3 diff --git a/src/tabs/__test__/demo.test.jsx b/src/tabs/__test__/demo.test.jsx index dc01f9130..73f996aef 100644 --- a/src/tabs/__test__/demo.test.jsx +++ b/src/tabs/__test__/demo.test.jsx @@ -13,6 +13,9 @@ import sizeVue from '@/tabs/demos/size.vue'; import statusVue from '@/tabs/demos/status.vue'; import themeVue from '@/tabs/demos/theme.vue'; +// scrollTo isn't implemented in JSDOM,see: https://github.com/vuejs/vue-test-utils/issues/319 +Element.prototype.scrollTo = () => {}; + const mapper = { badgeVue, contentVue, From e1dd8bdb45df61e431cc73cc6c3211ada336b11d Mon Sep 17 00:00:00 2001 From: "Y." Date: Wed, 15 Jan 2025 11:44:19 +0800 Subject: [PATCH 2/2] test: update (#1723) --- src/tabs/__test__/index.test.jsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tabs/__test__/index.test.jsx b/src/tabs/__test__/index.test.jsx index 586cd1b50..17a3b5180 100644 --- a/src/tabs/__test__/index.test.jsx +++ b/src/tabs/__test__/index.test.jsx @@ -69,6 +69,8 @@ describe('Tabs', () => { const navWrap = wrapper.find(`.${name}__wrapper`); const $tabNavItems = navWrap.findAllComponents(TTabNav); + const $tabs = wrapper.findComponent(Tabs); + theme = 'line'; await wrapper.setProps({ theme,