feat: expand EasyCode software factory workflows

This commit is contained in:
王鹏
2026-07-15 12:48:50 +08:00
parent fcfa4374d7
commit 79dea897bc
1108 changed files with 163774 additions and 21593 deletions

View File

@@ -0,0 +1,24 @@
import test from 'node:test'
import assert from 'node:assert/strict'
import { readFileSync } from 'node:fs'
import { fileURLToPath } from 'node:url'
import { dirname, resolve } from 'node:path'
const currentDir = dirname(fileURLToPath(import.meta.url))
const source = readFileSync(resolve(currentDir, '../src/views/generator/pageTheme/index.vue'), 'utf8')
test('page theme admin edits frontend and admin navigation independently', () => {
assert.match(source, /label="前台菜单"/)
assert.match(source, /v-model="shellForm\.frontendNavigation"/)
assert.match(source, /label="后台菜单"/)
assert.match(source, /v-model="shellForm\.adminNavigation"/)
assert.doesNotMatch(source, /v-model="shellForm\.navigation"/)
})
test('page theme admin migrates legacy shared navigation on edit', () => {
assert.match(source, /parseShell\(json\)/)
assert.match(source, /raw\.frontendNavigation \|\| legacyNavigation/)
assert.match(source, /raw\.adminNavigation \|\| legacyNavigation/)
assert.match(source, /delete result\.navigation/)
assert.match(source, /delete shell\.navigation/)
})