forked from jappel/leistungsbilanz-ts
Widen Revit CSV dialog
This commit is contained in:
parent
a9d6301753
commit
d0fc1a7caf
3 changed files with 27 additions and 2 deletions
|
|
@ -1,5 +1,8 @@
|
|||
import assert from "node:assert/strict";
|
||||
import { describe, it } from "node:test";
|
||||
import { createElement } from "react";
|
||||
import { renderToStaticMarkup } from "react-dom/server";
|
||||
import { RevitCsvModal } from "../src/frontend/components/revit-csv-modal.js";
|
||||
import {
|
||||
getExternalCsvConfiguration,
|
||||
previewExternalCsv,
|
||||
|
|
@ -52,3 +55,19 @@ describe("Revit CSV frontend API", () => {
|
|||
]);
|
||||
});
|
||||
});
|
||||
|
||||
describe("Revit CSV modal presentation", () => {
|
||||
it("uses the viewport-wide dialog variant", () => {
|
||||
const markup = renderToStaticMarkup(
|
||||
createElement(RevitCsvModal, {
|
||||
currentRevision: 0,
|
||||
onClose: () => undefined,
|
||||
onRevisionChange: () => undefined,
|
||||
projectId: "project-1",
|
||||
})
|
||||
);
|
||||
|
||||
assert.match(markup, /max-width:calc\(100vw - 2rem\)/);
|
||||
assert.doesNotMatch(markup, /modal-lg/);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue