From b135abd4a58c02de3537f49ef98b8a90f338703f Mon Sep 17 00:00:00 2001 From: Sagi Date: Tue, 20 Sep 2022 18:02:42 +0800 Subject: [PATCH] test: add unit test case --- .../button-edit/test/button-edit.spec.tsx | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/packages/ui-vue/components/button-edit/test/button-edit.spec.tsx b/packages/ui-vue/components/button-edit/test/button-edit.spec.tsx index f48c04ea0..c952a35b0 100644 --- a/packages/ui-vue/components/button-edit/test/button-edit.spec.tsx +++ b/packages/ui-vue/components/button-edit/test/button-edit.spec.tsx @@ -51,7 +51,27 @@ describe('f-button-edit', () => { describe('methods', () => {}); - describe('events', () => {}); + describe('events', () => { + it('should emit event named clear when click clear button', () => {}); + it('should emit event named change when changed text box value', () => {}); + it('should emit event named click whend click text box', () => {}); + it('should emit event named clickButton when click append button', () => {}); + it('should emit event named blur when text box lost focus', () => {}); + it('should emit event named focus when text box get focus', () => {}); + it('should emit event named mouseEnter when mouse move in text box', () => {}); + it('should emit event named mouseEnterIcon when mouse move in append button', () => {}); + it('should emit event named mouseLeaveIcon when mouse leave append button', () => {}); + it('should emit event named keyup when input text in text box', () => {}); + it('should emit event named keydown when input text in text box', () => {}); + it('should emit event named inputClick when click text box', () => {}); + it('should emit event named input when input text in text box', () => {}); + }); - describe('behaviors', () => {}); + describe('behaviors', () => { + it('should hightlight text box when mouse in', () => {}); + it('should show clear button when mouse in text box', () => {}); + it('should show clear button when fouse text box and it not empty', () => {}); + it('should hide clear button when text box is emtyp', () => {}); + it('should show clear button when text any word from empty', () => {}); + }); }); -- Gitee