From dce9cb5ddfe3c55103071e2ef7a81859c13908a4 Mon Sep 17 00:00:00 2001 From: smail Date: Sun, 6 Sep 2026 13:07:26 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E9=85=8D=E7=BD=AE=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=AD=A5=E9=AA=A4=E6=8F=90=E7=A4=BA=E6=9D=A1=E5=B9=B6?= =?UTF-8?q?=E4=BF=9D=E7=95=99=E6=93=8D=E4=BD=9C=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ConfigEditor/ConfigEditor.vue | 6 --- .../ConfigSettings/ConfigSettings.css | 37 ------------------- test/frontend/config-settings.test.mjs | 16 ++++++++ 3 files changed, 16 insertions(+), 43 deletions(-) diff --git a/frontend/src/views/components/ConfigSettings/ConfigEditor/ConfigEditor.vue b/frontend/src/views/components/ConfigSettings/ConfigEditor/ConfigEditor.vue index b517a7a..78e8cf7 100644 --- a/frontend/src/views/components/ConfigSettings/ConfigEditor/ConfigEditor.vue +++ b/frontend/src/views/components/ConfigSettings/ConfigEditor/ConfigEditor.vue @@ -83,12 +83,6 @@ {{ currentSection.label }} -
    -
  1. 1验证配置
  2. -
  3. 2保存候选
  4. -
  5. 3应用生效
  6. -
- { + const root = new URL('../../frontend/src/views/components/ConfigSettings/', import.meta.url) + const template = readFileSync(new URL('ConfigEditor/ConfigEditor.vue', root), 'utf8') + const sharedCss = readFileSync(new URL('ConfigSettings.css', root), 'utf8') + const editorCss = readFileSync(new URL('ConfigEditor/ConfigEditor.css', root), 'utf8') + assert.doesNotMatch(template, /change-workflow|step-number|配置变更流程/) + assert.doesNotMatch(sharedCss + editorCss, /change-workflow|step-number/) + for (const action of ['validateConfig', 'saveConfig', 'applyConfig']) { + assert.match(template, new RegExp(`]*@click="${action}"[^>]*>`)) + } + assert.match(template, /v-if="canWrite" class="editor-footer"/) + assert.match(template, /]*v-model="confirmed"/) + assert.match(template, /@click="managePending\('resume'\)"/) + assert.match(template, /@click="managePending\('cancel'\)"/) +}) + test('离开、刷新和正在执行的变更受保护,取消时保留编辑内容', async () => { let cancel = true let prompts = 0