check-info-tag-barley.mjs 804 B

1234567891011121314151617
  1. import assert from 'node:assert/strict'
  2. import fs from 'node:fs'
  3. import path from 'node:path'
  4. import { fileURLToPath } from 'node:url'
  5. const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..')
  6. const scss = fs.readFileSync(path.join(root, 'src/assets/styles/core/el-ui.scss'), 'utf8')
  7. const block = scss.match(
  8. /\.page-container \.el-tag--info,[\s\S]*?\.el-dialog \.el-tag--info\s*\{[\s\S]*?\}/
  9. )
  10. assert.ok(block, 'expected Fresh Mint el-tag--info override block')
  11. assert.match(block[0], /background:\s*#fff7e8\s*!important/)
  12. assert.match(block[0], /color:\s*#9a7020\s*!important/)
  13. assert.match(block[0], /border-color:\s*#f0e0b8\s*!important/)
  14. assert.doesNotMatch(block[0], /#f8fafc/)
  15. assert.doesNotMatch(block[0], /#64748b/)
  16. console.log('ok: web-admin info tag uses barley soft')