feat: expand EasyCode software factory workflows
This commit is contained in:
23
RuoYi-Vue/ruoyi-ui/test/templateBundleView.test.mjs
Normal file
23
RuoYi-Vue/ruoyi-ui/test/templateBundleView.test.mjs
Normal 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/)
|
||||
})
|
||||
Reference in New Issue
Block a user