Skip to content

Commit 2c993bc

Browse files
committed
test(core): the color parse test uses the theme colors of main
Main changed the values of all theme colors (#3206). The test of the lens branch gave the old CSS values (for example #e03e3e for red), and the parse kept them as CSS values. Now the test gives the CSS values of main for the same colors. The expected color names do not change.
1 parent 360dd3c commit 2c993bc

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎packages/core/src/blocks/defaultProps.browser.test.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,20 @@ describe("the HTML parse of colors", () => {
77

88
// HTML from outside BlockNote (or HTML without the `data-` attributes)
99
// gives a theme color only as its CSS value. Before the fix, the parse
10-
// gave that CSS value as the color (for example "rgb(224, 62, 62)"), and
10+
// gave that CSS value as the color (for example "rgb(153, 74, 55)"), and
1111
// the editor showed no color: it shows only the theme colors by name.
1212
it("reads a theme color of a block that the HTML gives only as a style as its name", () => {
1313
expect(
1414
editor.tryParseHTMLToBlocks(
15-
'<p style="color: #e03e3e; background-color: #ddebf1">Hello</p>',
15+
'<p style="color: #994a37; background-color: #cfedff">Hello</p>',
1616
),
1717
).toMatchObject([{ props: { textColor: "red", backgroundColor: "blue" } }]);
1818
});
1919

2020
it("reads a theme color of text that the HTML gives only as a style as its name", () => {
2121
expect(
2222
editor.tryParseHTMLToBlocks(
23-
'<p><span style="color: #4d6461">Hello</span> <span style="background-color: #fbf3db">you</span></p>',
23+
'<p><span style="color: #48722d">Hello</span> <span style="background-color: #f0e8cb">you</span></p>',
2424
),
2525
).toMatchObject([
2626
{

0 commit comments

Comments
 (0)