const assert = require("assert");
const fs = require("fs");
const path = require("path");

const source = fs.readFileSync(
  path.resolve(
    __dirname,
    "../../src/views/ccdiProject/components/detail/RiskModelSection.vue"
  ),
  "utf8"
);

assert(
  source.includes("grid-template-columns: repeat(4, minmax(0, 1fr));"),
  "桌面端模型卡片应固定为每行 4 张"
);
assert(
  source.includes("@media (max-width: 1200px)"),
  "应存在平板断点"
);
assert(
  source.includes("grid-template-columns: repeat(2, minmax(0, 1fr));"),
  "平板端模型卡片应降为 2 列"
);
assert(
  source.includes("@media (max-width: 768px)"),
  "应存在手机断点"
);
assert(
  source.includes("grid-template-columns: 1fr;"),
  "手机端模型卡片应降为 1 列"
);
