| 12345678910111213141516171819202122 |
- import test from 'node:test'
- import assert from 'node:assert/strict'
- import fs from 'node:fs'
- import path from 'node:path'
- // 供水设施五页统一美化(spec: docs/superpowers/specs/2026-09-05-water-facility-pages-ui-unification.md)
- // T-A 打样页:水厂;T-B 完成后将列表扩展为全部五个页面。
- const facilityPages = [
- 'src/views/subSystem/basic/waterPlant/index.vue'
- ]
- test('water facility pages use the shared water-page shell and theme', () => {
- for (const page of facilityPages) {
- const source = fs.readFileSync(path.resolve(page), 'utf8')
- assert.match(source, /<div class="water-page facility-page">/u, page)
- assert.match(source, /@use '\.\.\/\.\.\/waterSupply\/components\/waterFacilityPageTheme\.scss'/u, page)
- assert.doesNotMatch(source, /<right-toolbar/u, page)
- assert.match(source, /class="page-heading"/u, page)
- assert.match(source, /class="filter-card"/u, page)
- assert.match(source, /class="table-card"/u, page)
- }
- })
|