@@ -9,7 +9,7 @@ describe('Button', function () {
99 Title
1010 </ Button >
1111 ) ;
12- assert . equal ( instance . getDOMNode ( ) . nodeName , 'BUTTON' ) ;
12+ assert . equal ( React . findDOMNode ( instance ) . nodeName , 'BUTTON' ) ;
1313 } ) ;
1414
1515 it ( 'Should output a component with button classes' , function ( ) {
@@ -18,8 +18,8 @@ describe('Button', function () {
1818 Title
1919 </ Button >
2020 ) ;
21- assert . equal ( instance . getDOMNode ( ) . nodeName , 'INPUT' ) ;
22- assert . equal ( instance . getDOMNode ( ) . getAttribute ( 'class' ) , 'btn btn-default' ) ;
21+ assert . equal ( React . findDOMNode ( instance ) . nodeName , 'INPUT' ) ;
22+ assert . equal ( React . findDOMNode ( instance ) . getAttribute ( 'class' ) , 'btn btn-default' ) ;
2323 } ) ;
2424
2525 it ( 'Should have type=button by default' , function ( ) {
@@ -28,7 +28,7 @@ describe('Button', function () {
2828 Title
2929 </ Button >
3030 ) ;
31- assert . equal ( instance . getDOMNode ( ) . getAttribute ( 'type' ) , 'button' ) ;
31+ assert . equal ( React . findDOMNode ( instance ) . getAttribute ( 'type' ) , 'button' ) ;
3232 } ) ;
3333
3434 it ( 'Should show the type if passed one' , function ( ) {
@@ -37,7 +37,7 @@ describe('Button', function () {
3737 Title
3838 </ Button >
3939 ) ;
40- assert . equal ( instance . getDOMNode ( ) . getAttribute ( 'type' ) , 'submit' ) ;
40+ assert . equal ( React . findDOMNode ( instance ) . getAttribute ( 'type' ) , 'submit' ) ;
4141 } ) ;
4242
4343 it ( 'Should output an anchor if called with a href' , function ( ) {
@@ -47,8 +47,8 @@ describe('Button', function () {
4747 Title
4848 </ Button >
4949 ) ;
50- assert . equal ( instance . getDOMNode ( ) . nodeName , 'A' ) ;
51- assert . equal ( instance . getDOMNode ( ) . getAttribute ( 'href' ) , href ) ;
50+ assert . equal ( React . findDOMNode ( instance ) . nodeName , 'A' ) ;
51+ assert . equal ( React . findDOMNode ( instance ) . getAttribute ( 'href' ) , href ) ;
5252 } ) ;
5353
5454 it ( 'Should output an input if called with a href and an input component' , function ( ) {
@@ -58,8 +58,8 @@ describe('Button', function () {
5858 Title
5959 </ Button >
6060 ) ;
61- assert . equal ( instance . getDOMNode ( ) . nodeName , 'INPUT' ) ;
62- assert . equal ( instance . getDOMNode ( ) . getAttribute ( 'href' ) , href ) ;
61+ assert . equal ( React . findDOMNode ( instance ) . nodeName , 'INPUT' ) ;
62+ assert . equal ( React . findDOMNode ( instance ) . getAttribute ( 'href' ) , href ) ;
6363 } ) ;
6464
6565 it ( 'Should output an anchor if called with a target' , function ( ) {
@@ -69,8 +69,8 @@ describe('Button', function () {
6969 Title
7070 </ Button >
7171 ) ;
72- assert . equal ( instance . getDOMNode ( ) . nodeName , 'A' ) ;
73- assert . equal ( instance . getDOMNode ( ) . getAttribute ( 'target' ) , target ) ;
72+ assert . equal ( React . findDOMNode ( instance ) . nodeName , 'A' ) ;
73+ assert . equal ( React . findDOMNode ( instance ) . getAttribute ( 'target' ) , target ) ;
7474 } ) ;
7575
7676 it ( 'Should call onClick callback' , function ( done ) {
@@ -82,7 +82,7 @@ describe('Button', function () {
8282 Title
8383 </ Button >
8484 ) ;
85- ReactTestUtils . Simulate . click ( instance . getDOMNode ( ) ) ;
85+ ReactTestUtils . Simulate . click ( React . findDOMNode ( instance ) ) ;
8686 } ) ;
8787
8888 it ( 'Should be disabled' , function ( ) {
@@ -91,7 +91,7 @@ describe('Button', function () {
9191 Title
9292 </ Button >
9393 ) ;
94- assert . ok ( instance . getDOMNode ( ) . disabled ) ;
94+ assert . ok ( React . findDOMNode ( instance ) . disabled ) ;
9595 } ) ;
9696
9797 it ( 'Should be disabled link' , function ( ) {
@@ -100,7 +100,7 @@ describe('Button', function () {
100100 Title
101101 </ Button >
102102 ) ;
103- assert . ok ( instance . getDOMNode ( ) . className . match ( / \b d i s a b l e d \b / ) ) ;
103+ assert . ok ( React . findDOMNode ( instance ) . className . match ( / \b d i s a b l e d \b / ) ) ;
104104 } ) ;
105105
106106 it ( 'Should have block class' , function ( ) {
@@ -109,7 +109,7 @@ describe('Button', function () {
109109 Title
110110 </ Button >
111111 ) ;
112- assert . ok ( instance . getDOMNode ( ) . className . match ( / \b b t n - b l o c k \b / ) ) ;
112+ assert . ok ( React . findDOMNode ( instance ) . className . match ( / \b b t n - b l o c k \b / ) ) ;
113113 } ) ;
114114
115115 it ( 'Should apply bsStyle class' , function ( ) {
@@ -118,7 +118,7 @@ describe('Button', function () {
118118 Title
119119 </ Button >
120120 ) ;
121- assert . ok ( instance . getDOMNode ( ) . className . match ( / \b b t n - d a n g e r \b / ) ) ;
121+ assert . ok ( React . findDOMNode ( instance ) . className . match ( / \b b t n - d a n g e r \b / ) ) ;
122122 } ) ;
123123
124124 it ( 'Should honour additional classes passed in, adding not overriding' , function ( ) {
@@ -127,8 +127,8 @@ describe('Button', function () {
127127 Title
128128 </ Button >
129129 ) ;
130- assert . ok ( instance . getDOMNode ( ) . className . match ( / \b b o b \b / ) ) ;
131- assert . ok ( instance . getDOMNode ( ) . className . match ( / \b b t n - d a n g e r \b / ) ) ;
130+ assert . ok ( React . findDOMNode ( instance ) . className . match ( / \b b o b \b / ) ) ;
131+ assert . ok ( React . findDOMNode ( instance ) . className . match ( / \b b t n - d a n g e r \b / ) ) ;
132132 } ) ;
133133
134134 it ( 'Should default to bsStyle="default"' , function ( ) {
@@ -146,7 +146,7 @@ describe('Button', function () {
146146 Title
147147 </ Button >
148148 ) ;
149- assert . ok ( instance . getDOMNode ( ) . className . match ( / \b a c t i v e \b / ) ) ;
149+ assert . ok ( React . findDOMNode ( instance ) . className . match ( / \b a c t i v e \b / ) ) ;
150150 } ) ;
151151
152152 it ( 'Should render an anchor in a list item when in a nav' , function ( ) {
@@ -156,7 +156,7 @@ describe('Button', function () {
156156 </ Button >
157157 ) ;
158158
159- let li = instance . getDOMNode ( ) ;
159+ let li = React . findDOMNode ( instance ) ;
160160 let anchor = ReactTestUtils . findRenderedDOMComponentWithTag ( instance , 'a' ) ;
161161 assert . equal ( li . nodeName , 'LI' ) ;
162162 assert . ok ( li . className . match ( / \b a c t i v e \b / ) ) ;
@@ -170,7 +170,7 @@ describe('Button', function () {
170170 </ Button >
171171 ) ;
172172
173- let anchor = instance . getDOMNode ( ) ;
173+ let anchor = React . findDOMNode ( instance ) ;
174174 assert . equal ( anchor . nodeName , 'A' ) ;
175175 assert . ok ( anchor . getAttribute ( 'href' ) , '#' ) ;
176176 } ) ;
0 commit comments