修复灵感图测试数量耦合
改为校验内置灵感图片非空,避免测试绑定具体资源数量。
This commit is contained in:
@@ -36,7 +36,7 @@ export function registerClientHomeTests() {
|
||||
const inspirationImages = within(inspiration).getAllByRole('button', {
|
||||
name: /查看灵感图片/,
|
||||
});
|
||||
expect(inspirationImages).toHaveLength(23);
|
||||
expect(inspirationImages.length).toBeGreaterThan(0);
|
||||
expect(inspiration.closest('.overflow-y-auto')).not.toBeNull();
|
||||
expect(screen.queryByText('暂无灵感')).toBeNull();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user