Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
JiuqingSong committed Feb 6, 2025
1 parent 59278e2 commit c8dbc40
Showing 1 changed file with 52 additions and 1 deletion.
53 changes: 52 additions & 1 deletion packages/roosterjs-content-model-dom/test/endToEndTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2278,7 +2278,7 @@ describe('End to end test for DOM => Model => DOM/TEXT', () => {
);
});

it('TH with font-weight', () => {
it('TH with font-weight: 400', () => {
runTest(
'<table><tr><th style="font-weight:400">test</th></tr></table>',
{
Expand Down Expand Up @@ -2328,4 +2328,55 @@ describe('End to end test for DOM => Model => DOM/TEXT', () => {
'<table><tbody><tr><th><span style="font-weight: 400;">test</span></th></tr></tbody></table>'
);
});

it('TH with font-weight: bold', () => {
runTest(
'<table><tr><th style="font-weight: bold">test</th></tr></table>',
{
blockGroupType: 'Document',
blocks: [
{
widths: [],
rows: [
{
height: 0,
cells: [
{
spanAbove: false,
spanLeft: false,
isHeader: true,
blockGroupType: 'TableCell',
blocks: [
{
isImplicit: true,
segments: [
{
text: 'test',
segmentType: 'Text',
format: {
fontWeight: 'bold',
},
},
],
blockType: 'Paragraph',
format: {},
},
],
format: {},
dataset: {},
},
],
format: {},
},
],
blockType: 'Table',
format: {},
dataset: {},
},
],
},
'test',
'<table><tbody><tr><th>test</th></tr></tbody></table>'
);
});
});

0 comments on commit c8dbc40

Please sign in to comment.