|
|
@@ -34,6 +34,7 @@ describe('Toast', () => {
|
|
|
let opts = {
|
|
|
duration: 1,
|
|
|
content: 'dur1',
|
|
|
+ motion:false,
|
|
|
};
|
|
|
Toast.info(opts);
|
|
|
let toast = document.querySelector(`.${BASE_CLASS_PREFIX}-toast-info`);
|
|
|
@@ -47,14 +48,14 @@ describe('Toast', () => {
|
|
|
});
|
|
|
it('update content by id', done => {
|
|
|
const id = 'toastid'
|
|
|
- Toast.info({ content: 'bytedance', id });
|
|
|
+ Toast.info({ content: 'bytedance', id, motion: false });
|
|
|
let toast = document.querySelector(`.${BASE_CLASS_PREFIX}-toast-info`);
|
|
|
expect(toast.textContent).toEqual('bytedance');
|
|
|
setTimeout(() => {
|
|
|
- Toast.info({ content: 'dancebyte', id });
|
|
|
+ Toast.info({ content: 'dancebyte', id, motion: false });
|
|
|
expect(toast.textContent).toEqual('dancebyte');
|
|
|
setTimeout(() => {
|
|
|
- Toast.error({ content: 'error', id });
|
|
|
+ Toast.error({ content: 'error', id, motion: false});
|
|
|
expect(toast.textContent).toEqual('error');
|
|
|
expect(toast?.className).toEqual(`${BASE_CLASS_PREFIX}-toast ${BASE_CLASS_PREFIX}-toast-error`)
|
|
|
done()
|