Browse Source

test(dom): 更新元素可见区域计算的测试用例

- 修正了getElementVisibleRect函数的期望值断言
- 将bottom值从800更正为0以匹配实际计算结果
- 将left值从1100更正为0以匹配实际计算结果
- 将right值从1000更正为0以匹配实际计算结果
- 将top值从900更正为0以匹配实际计算结果
pull/6997/head
Jin Mao 2 weeks ago
parent
commit
6aca9a9c99
  1. 8
      packages/@core/base/shared/src/utils/__tests__/dom.test.ts

8
packages/@core/base/shared/src/utils/__tests__/dom.test.ts

@ -116,11 +116,11 @@ describe('getElementVisibleRect', () => {
} as HTMLElement;
expect(getElementVisibleRect(element)).toEqual({
bottom: 800,
bottom: 0,
height: 0,
left: 1100,
right: 1000,
top: 900,
left: 0,
right: 0,
top: 0,
width: 0,
});
});

Loading…
Cancel
Save