import React from "react";
import { assert } from "chai";
import { DOCXQuoteStructRun, HTMLQuoteStructRun } from "./quoteStructRun";
import loadEL from "../../node/el/loadEL";
import type * as std from "../../law/std";
import { renderToStaticMarkup } from "../common";
import formatXML from "../../util/formatXml";
import htmlCSS from "./htmlCSS";
import path from "path";
import { promisify } from "util";
import fs from "fs";
import ensureTempTestDir from "../../../test/ensureTempTestDir";
import { renderDocxAsync } from "../common/docx/file";
import { w } from "../common/docx/tags";
describe("Test HTML quoteStructRun", () => {
/* eslint-disable no-irregular-whitespace */
it("Success case", async () => {
const input = loadEL({
tag: "QuoteStruct",
attr: {},
children: [
{
tag: "TableStruct",
attr: {},
children: [
{
tag: "TableStructTitle",
attr: {},
children: ["表一"],
},
{
tag: "Table",
attr: {},
children: [
{
tag: "TableHeaderRow",
attr: {},
children: [
{
tag: "TableHeaderColumn",
attr: {},
children: ["項"],
},
{
tag: "TableHeaderColumn",
attr: {},
children: ["種名"],
},
],
},
{
tag: "TableRow",
attr: {},
children: [
{
tag: "TableColumn",
attr: {
colspan: "2",
},
children: [
{
tag: "Column",
attr: {},
children: [
{
tag: "Sentence",
attr: {},
children: ["(1)"],
},
],
},
{
tag: "Column",
attr: {},
children: [
{
tag: "Sentence",
attr: {},
children: ["かも科"],
},
],
},
],
},
],
},
{
tag: "TableRow",
attr: {},
children: [
{
tag: "TableColumn",
attr: {},
children: [
{
tag: "Sentence",
attr: {},
children: ["1"],
},
],
},
{
tag: "TableColumn",
attr: {},
children: [
{
tag: "Sentence",
attr: {},
children: ["シジュウカラガン"],
},
],
},
],
},
],
},
],
},
],
}) as std.QuoteStruct;
const expectedHTML = /*html*/`\