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,23 @@
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/templateBundle/index.vue'), 'utf8')
test('template bundle admin page edits preview image with image upload', () => {
assert.match(source, /prop="previewImage"/)
assert.match(source, /<ImageUpload/)
assert.match(source, /v-model="form\.previewImage"/)
assert.match(source, /:limit="1"/)
assert.match(source, /previewImage:\s*null/)
})
test('template bundle admin page lists preview image thumbnail', () => {
assert.match(source, /prop="previewImage"/)
assert.match(source, /<el-image/)
assert.match(source, /scope\.row\.previewImage/)
assert.match(source, /templateBundleImageUrl/)
})