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