Added Text Decoration options

This commit is contained in:
Timo Dittmann
2022-01-04 10:42:22 +01:00
parent 959ac047d9
commit 69e485352a
68 changed files with 385 additions and 1 deletions

View File

@@ -637,3 +637,96 @@ exports[`use various parts of svg-edit > check tool_text_change_font_family #0`]
</svg>
</body>
`;
exports[`use various parts of svg-edit > check tool_text_decoration_underline #0`] = `
<body>
<svg
width="640"
height="480"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
>
<g class="layer">
<title>Layer 1</title>
<text
fill="#bf0000"
font-family="Serif"
font-size="34"
font-style="italic"
font-weight="bold"
id="svg_1"
stroke="#0000bf"
text-anchor="middle"
text-decoration="underline"
x="46"
xml:space="preserve"
y="35"
>
AB
</text>
</g>
</svg>
</body>
`;
exports[`use various parts of svg-edit > check tool_text_decoration_linethrough #0`] = `
<body>
<svg
width="640"
height="480"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
>
<g class="layer">
<title>Layer 1</title>
<text
fill="#bf0000"
font-family="Serif"
font-size="34"
font-style="italic"
font-weight="bold"
id="svg_1"
stroke="#0000bf"
text-anchor="middle"
text-decoration="underline line-through"
x="46"
xml:space="preserve"
y="35"
>
AB
</text>
</g>
</svg>
</body>
`;
exports[`use various parts of svg-edit > check tool_text_decoration_overline #0`] = `
<body>
<svg
width="640"
height="480"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
>
<g class="layer">
<title>Layer 1</title>
<text
fill="#bf0000"
font-family="Serif"
font-size="34"
font-style="italic"
font-weight="bold"
id="svg_1"
stroke="#0000bf"
text-anchor="middle"
text-decoration="underline line-through overline"
x="46"
xml:space="preserve"
y="35"
>
AB
</text>
</g>
</svg>
</body>
`;

View File

@@ -163,4 +163,22 @@ describe('use various parts of svg-edit', function () {
cy.get('#tool_font_family').shadow().find('select').select('Serif')
testSnapshot()
})
it('check tool_text_decoration_underline', function () {
cy.get('#svg_1').click({ force: true })
cy.get('#tool_text_decoration_underline')
.click({ force: true })
testSnapshot()
})
it('check tool_text_decoration_linethrough', function () {
cy.get('#svg_1').click({ force: true })
cy.get('#tool_text_decoration_linethrough')
.click({ force: true })
testSnapshot()
})
it('check tool_text_decoration_overline', function () {
cy.get('#svg_1').click({ force: true })
cy.get('#tool_text_decoration_overline')
.click({ force: true })
testSnapshot()
})
})