| 123456789101112131415161718192021 |
- import assert from 'node:assert/strict'
- import { readFileSync } from 'node:fs'
- const componentUrl = new URL(
- '../src/components/business/sample-payment-detail-dialog/index.vue',
- import.meta.url
- )
- const source = readFileSync(componentUrl, 'utf8')
- assert.match(source, /width="min\(1200px, 90vw\)"/)
- assert.match(source, /class="detail-summary form-grid-4"/)
- assert.equal(source.match(/class="detail-tag"/g)?.length, 2)
- assert.match(source, /\.detail-tag\s*\{[^}]*align-self:\s*flex-start;[^}]*width:\s*fit-content;/s)
- assert.match(source, /<el-table-column label="操作" min-width="150" align="center" fixed="right">/)
- assert.match(source, /class="transfer-action-stack"/)
- assert.match(
- source,
- /\.transfer-action-stack\s*\{[^}]*display:\s*inline-flex;[^}]*flex-direction:\s*column;/s
- )
- console.log('payment detail dialog layout contract passed')
|