Skip to content

Commit

Permalink
Merge pull request #19 from VisActor/test/18-test-solve-errors-in-ci-…
Browse files Browse the repository at this point in the history
…workflow-unit-test

fix: ci workflow unit test occur error
  • Loading branch information
fangsmile committed Jun 9, 2023
2 parents fce6b4c + 68af631 commit 997acf3
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
8 changes: 6 additions & 2 deletions packages/vtable/__tests__/listTable-autoRowHeight.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ describe('listTable init test', () => {
field: '订单 ID',
caption: '订单 ID',
sort: true,
width: 'auto'
width: 'auto',
style: {
fontFamily: 'Arial',
fontSize: 14
}
},
{
field: '订单日期',
Expand Down Expand Up @@ -86,7 +90,7 @@ describe('listTable init test', () => {
});

test('listTable column width', () => {
expect(listTable.getColWidth(0)).toBe(162);
expect(listTable.getColWidth(0)).toBe(151);
});

test('listTable row Height', () => {
Expand Down
8 changes: 6 additions & 2 deletions packages/vtable/__tests__/listTable.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ describe('listTable init test', () => {
caption: '订单 ID',
sort: true,
width: 'auto',
description: '这是订单的描述信息'
description: '这是订单的描述信息',
style: {
fontFamily: 'Arial',
fontSize: 14
}
},
{
field: '订单日期',
Expand Down Expand Up @@ -94,7 +98,7 @@ describe('listTable init test', () => {
});
test('listTable scrollToCell', () => {
listTable.scrollToCell({ col: 4, row: 28 });
expect(listTable.getScrollLeft()).toBe(612);
expect(listTable.getScrollLeft()).toBe(601);
expect(listTable.getScrollTop()).toBe(802);
});
// test('listTable API getAllCells', () => {
Expand Down
6 changes: 5 additions & 1 deletion packages/vtable/examples/unit-test-demo/unitTestListTable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ export function createTable() {
caption: '订单 ID',
sort: true,
width: 'auto',
description: '这是订单的描述信息'
description: '这是订单的描述信息',
style: {
fontFamily: 'Arial',
fontSize: 14
}
},
{
field: '订单日期',
Expand Down

0 comments on commit 997acf3

Please sign in to comment.