fix(plugin-title): Adapt tests to new CSS classes
This commit is contained in:
parent
4cf078fedf
commit
31074f87e9
1 changed files with 8 additions and 10 deletions
|
@ -12,7 +12,7 @@ describe('Title Plugin Tests', () => {
|
|||
it("Should import the style", () => {
|
||||
const patternStyle = pattern.svg.style.toString();
|
||||
const pluginStyle = style.default;
|
||||
expect(patternStyle).to.equal(pluginStyle);
|
||||
expect(patternStyle).to.equal(`svg.freesewing.pattern { --pattern-scale: 1 }${pluginStyle}`);
|
||||
});
|
||||
|
||||
it("Should run the title macro", () => {
|
||||
|
@ -33,19 +33,19 @@ describe('Title Plugin Tests', () => {
|
|||
expect(p.y).to.equal(-34);
|
||||
expect(p.attributes.get("data-text")).to.equal("3");
|
||||
expect(p.attributes.get("data-text-class")).to.equal(
|
||||
"title-nr note fill-note"
|
||||
"text-4xl fill-note font-bold"
|
||||
);
|
||||
expect(p.attributes.get("data-text-x")).to.equal("-12");
|
||||
expect(p.attributes.get("data-text-y")).to.equal("-34");
|
||||
p = pattern.parts.test.points.__titleName;
|
||||
expect(p.attributes.get("data-text")).to.equal("unitTest");
|
||||
expect(p.attributes.get("data-text-class")).to.equal("title-name");
|
||||
expect(p.attributes.get("data-text-class")).to.equal("text-lg fill-current font-bold");
|
||||
expect(p.attributes.get("data-text-x")).to.equal("-12");
|
||||
expect(p.attributes.get("data-text-y")).to.equal("-21");
|
||||
p = pattern.parts.test.points.__titlePattern;
|
||||
expect(p.attributes.get("data-text")).to.equal("testPattern v99");
|
||||
expect(p.attributes.get("data-text-class")).to.equal(
|
||||
"title-pattern fill-note"
|
||||
"fill-note"
|
||||
);
|
||||
expect(p.attributes.get("data-text-x")).to.equal("-12");
|
||||
expect(p.attributes.get("data-text-y")).to.equal("-14");
|
||||
|
@ -73,7 +73,7 @@ describe('Title Plugin Tests', () => {
|
|||
expect(p.y).to.equal(-34);
|
||||
expect(p.attributes.get("data-text")).to.equal("# 3");
|
||||
expect(p.attributes.get("data-text-class")).to.equal(
|
||||
"title-nr note fill-note"
|
||||
"text-4xl fill-note font-bold"
|
||||
);
|
||||
expect(p.attributes.get("data-text-x")).to.equal("-12");
|
||||
expect(p.attributes.get("data-text-y")).to.equal("-34");
|
||||
|
@ -101,20 +101,18 @@ describe('Title Plugin Tests', () => {
|
|||
expect(p.y).to.equal(-34);
|
||||
expect(p.attributes.get("data-text")).to.equal("3");
|
||||
expect(p.attributes.get("data-text-class")).to.equal(
|
||||
"title-nr note fill-note"
|
||||
"text-4xl fill-note font-bold"
|
||||
);
|
||||
expect(p.attributes.get("data-text-x")).to.equal("-12");
|
||||
expect(p.attributes.get("data-text-y")).to.equal("-34");
|
||||
p = pattern.parts.test.points._foo_titleName;
|
||||
expect(p.attributes.get("data-text")).to.equal("unitTest");
|
||||
expect(p.attributes.get("data-text-class")).to.equal("title-name");
|
||||
expect(p.attributes.get("data-text-class")).to.equal("text-lg fill-current font-bold");
|
||||
expect(p.attributes.get("data-text-x")).to.equal("-12");
|
||||
expect(p.attributes.get("data-text-y")).to.equal("-21");
|
||||
p = pattern.parts.test.points._foo_titlePattern;
|
||||
expect(p.attributes.get("data-text")).to.equal("testPattern v99");
|
||||
expect(p.attributes.get("data-text-class")).to.equal(
|
||||
"title-pattern fill-note"
|
||||
);
|
||||
expect(p.attributes.get("data-text-class")).to.equal("fill-note");
|
||||
expect(p.attributes.get("data-text-x")).to.equal("-12");
|
||||
expect(p.attributes.get("data-text-y")).to.equal("-14");
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue