test: 优化测试用例快照。显示加载的图标

release/desktop
moonrailgun 3 years ago
parent f12ef404fb
commit d82279f911

@ -1,5 +1,8 @@
// mock
jest.mock('tailchat-shared/i18n');
jest.mock('@iconify/react', () => ({
Icon: ({ icon }) => `[iconify icon="${icon}"]`,
}));
const ignoreErroMessages = [
/Warning.*not wrapped in act/,

@ -6,7 +6,7 @@ exports[`IconBtn render 1`] = `
class="ant-btn ant-btn-circle ant-btn-icon-only border-0 bg-black bg-opacity-30 text-white text-opacity-80 hover:text-opacity-100 hover:bg-opacity-60"
type="button"
>
<span />
[iconify icon="mdi:close"]
</button>
</div>
`;

@ -5,7 +5,7 @@ exports[`IsDeveloping render 1`] = `
<div
class="text-white w-full h-full flex items-center justify-center flex-col"
>
<span />
[iconify icon="mdi:code-braces"]
<p
class="text-2xl"
>

@ -3,7 +3,7 @@
exports[`LoadingSpinner render 1`] = `
<div>
<div>
<span />
[iconify icon="mdi:loading"]
加载中...
</div>
</div>
@ -12,7 +12,7 @@ exports[`LoadingSpinner render 1`] = `
exports[`LoadingSpinner render with text 1`] = `
<div>
<div>
<span />
[iconify icon="mdi:loading"]
加载中...
</div>
</div>

@ -2,6 +2,6 @@
exports[`Spinner render 1`] = `
<div>
<span />
[iconify icon="mdi:loading"]
</div>
`;

@ -91,13 +91,13 @@ exports[`GroupPanelTree simple render snapshot 1`] = `
class="ant-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span />
[iconify icon="mdi:pencil-outline"]
</button>
<button
class="ant-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span />
[iconify icon="mdi:trash-can-outline"]
</button>
</div>
</div>
@ -140,13 +140,13 @@ exports[`GroupPanelTree simple render snapshot 1`] = `
class="ant-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span />
[iconify icon="mdi:pencil-outline"]
</button>
<button
class="ant-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span />
[iconify icon="mdi:trash-can-outline"]
</button>
</div>
</div>
@ -189,13 +189,13 @@ exports[`GroupPanelTree simple render snapshot 1`] = `
class="ant-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span />
[iconify icon="mdi:pencil-outline"]
</button>
<button
class="ant-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span />
[iconify icon="mdi:trash-can-outline"]
</button>
</div>
</div>
@ -254,13 +254,13 @@ exports[`GroupPanelTree simple render snapshot 1`] = `
class="ant-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span />
[iconify icon="mdi:pencil-outline"]
</button>
<button
class="ant-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span />
[iconify icon="mdi:trash-can-outline"]
</button>
</div>
</div>
@ -303,13 +303,13 @@ exports[`GroupPanelTree simple render snapshot 1`] = `
class="ant-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span />
[iconify icon="mdi:pencil-outline"]
</button>
<button
class="ant-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span />
[iconify icon="mdi:trash-can-outline"]
</button>
</div>
</div>
@ -352,13 +352,13 @@ exports[`GroupPanelTree simple render snapshot 1`] = `
class="ant-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span />
[iconify icon="mdi:pencil-outline"]
</button>
<button
class="ant-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span />
[iconify icon="mdi:trash-can-outline"]
</button>
</div>
</div>

Loading…
Cancel
Save