File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,38 @@ it("renders schema methods name", () => {
4444 ReactDOM . unmountComponentAtNode ( div ) ;
4545} ) ;
4646
47+ it ( "doesnt renders collapsed contents" , ( ) => {
48+ const div = document . createElement ( "div" ) ;
49+ const schema = {
50+ methods : [
51+ {
52+ params : [ {
53+ name : "foobarz" ,
54+ } ] ,
55+ } ,
56+ ] ,
57+ } ;
58+ ReactDOM . render ( < Methods schema = { schema as any } /> , div ) ;
59+ expect ( div . innerHTML . includes ( "foobarz" ) ) . toBe ( false ) ;
60+ ReactDOM . unmountComponentAtNode ( div ) ;
61+ } ) ;
62+
63+ it ( "renders collapsed contents with disableTransitionProps" , ( ) => {
64+ const div = document . createElement ( "div" ) ;
65+ const schema = {
66+ methods : [
67+ {
68+ params : [ {
69+ name : "foobarz" ,
70+ } ] ,
71+ } ,
72+ ] ,
73+ } ;
74+ ReactDOM . render ( < Methods schema = { schema as any } disableTransitionProps = { true } /> , div ) ;
75+ expect ( div . innerHTML . includes ( "foobarz" ) ) . toBe ( true ) ;
76+ ReactDOM . unmountComponentAtNode ( div ) ;
77+ } ) ;
78+
4779it ( "renders schema plugin" , ( ) => {
4880 const div = document . createElement ( "div" ) ;
4981 const schema = {
You can’t perform that action at this time.
0 commit comments