From 3c68ef4ddff30c343eb6fb9b072a2a73240c0b31 Mon Sep 17 00:00:00 2001 From: ouyangxq <775153912@qq.com> Date: Thu, 3 Sep 2026 10:27:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/SmartLoadingDialog.test.ts | 30 ++++++ .../components/SmartLoadingDialog.vue | 45 ++++++++- .../pages/GlobalSmartLoadingView.test.ts | 58 +++++++++++- .../pages/GlobalSmartLoadingView.vue | 75 +++++++++++---- .../smartLoadingChannelGroups.test.ts | 42 +++++++++ .../smartLoadingChannelGroups.ts | 91 +++++++++++++++++++ 6 files changed, 316 insertions(+), 25 deletions(-) create mode 100644 src/modules/container-loading/components/SmartLoadingDialog.test.ts create mode 100644 src/modules/container-loading/smartLoadingChannelGroups.test.ts create mode 100644 src/modules/container-loading/smartLoadingChannelGroups.ts diff --git a/src/modules/container-loading/components/SmartLoadingDialog.test.ts b/src/modules/container-loading/components/SmartLoadingDialog.test.ts new file mode 100644 index 00000000..9090f471 --- /dev/null +++ b/src/modules/container-loading/components/SmartLoadingDialog.test.ts @@ -0,0 +1,30 @@ +import ElementPlus from 'element-plus' +import { flushPromises, mount } from '@vue/test-utils' +import { afterEach, describe, expect, it } from 'vitest' +import SmartLoadingDialog from './SmartLoadingDialog.vue' + +describe('SmartLoadingDialog', () => { + afterEach(() => { document.body.innerHTML = '' }) + + it('expands to the viewport and can return to the normal dialog size', async () => { + const wrapper = mount(SmartLoadingDialog, { + attachTo: document.body, + props: { modelValue: true }, + global: { + plugins: [ElementPlus], + stubs: { GlobalSmartLoadingView: { template: '