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

pull/81/head
moonrailgun 3 years ago
parent f12ef404fb
commit d82279f911

@ -1,5 +1,8 @@
// mock // mock
jest.mock('tailchat-shared/i18n'); jest.mock('tailchat-shared/i18n');
jest.mock('@iconify/react', () => ({
Icon: ({ icon }) => `[iconify icon="${icon}"]`,
}));
const ignoreErroMessages = [ const ignoreErroMessages = [
/Warning.*not wrapped in act/, /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" 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" type="button"
> >
<span /> [iconify icon="mdi:close"]
</button> </button>
</div> </div>
`; `;

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

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

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

@ -91,13 +91,13 @@ exports[`GroupPanelTree simple render snapshot 1`] = `
class="ant-btn ant-btn-text ant-btn-sm ant-btn-icon-only" class="ant-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
type="button" type="button"
> >
<span /> [iconify icon="mdi:pencil-outline"]
</button> </button>
<button <button
class="ant-btn ant-btn-text ant-btn-sm ant-btn-icon-only" class="ant-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
type="button" type="button"
> >
<span /> [iconify icon="mdi:trash-can-outline"]
</button> </button>
</div> </div>
</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" class="ant-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
type="button" type="button"
> >
<span /> [iconify icon="mdi:pencil-outline"]
</button> </button>
<button <button
class="ant-btn ant-btn-text ant-btn-sm ant-btn-icon-only" class="ant-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
type="button" type="button"
> >
<span /> [iconify icon="mdi:trash-can-outline"]
</button> </button>
</div> </div>
</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" class="ant-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
type="button" type="button"
> >
<span /> [iconify icon="mdi:pencil-outline"]
</button> </button>
<button <button
class="ant-btn ant-btn-text ant-btn-sm ant-btn-icon-only" class="ant-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
type="button" type="button"
> >
<span /> [iconify icon="mdi:trash-can-outline"]
</button> </button>
</div> </div>
</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" class="ant-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
type="button" type="button"
> >
<span /> [iconify icon="mdi:pencil-outline"]
</button> </button>
<button <button
class="ant-btn ant-btn-text ant-btn-sm ant-btn-icon-only" class="ant-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
type="button" type="button"
> >
<span /> [iconify icon="mdi:trash-can-outline"]
</button> </button>
</div> </div>
</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" class="ant-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
type="button" type="button"
> >
<span /> [iconify icon="mdi:pencil-outline"]
</button> </button>
<button <button
class="ant-btn ant-btn-text ant-btn-sm ant-btn-icon-only" class="ant-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
type="button" type="button"
> >
<span /> [iconify icon="mdi:trash-can-outline"]
</button> </button>
</div> </div>
</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" class="ant-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
type="button" type="button"
> >
<span /> [iconify icon="mdi:pencil-outline"]
</button> </button>
<button <button
class="ant-btn ant-btn-text ant-btn-sm ant-btn-icon-only" class="ant-btn ant-btn-text ant-btn-sm ant-btn-icon-only"
type="button" type="button"
> >
<span /> [iconify icon="mdi:trash-can-outline"]
</button> </button>
</div> </div>
</div> </div>

Loading…
Cancel
Save