@@ -14,7 +14,7 @@ describe('<CommentInput />', () => {
1414 onSubmit : ( ) => { } ,
1515 } ;
1616
17- it ( 'should render styled TextInput and styled TouchableOpacity if user has post permissions and issue is not locked' , ( ) => {
17+ it ( 'should render styled TextInput and styled TouchableOpacity if user has push permissions and issue is not locked' , ( ) => {
1818
1919 const wrapper = shallow (
2020 < CommentInput { ...defaultProps } />
@@ -24,7 +24,7 @@ describe('<CommentInput />', () => {
2424 expect ( wrapper . find ( 'Styled(TouchableOpacity)' ) . length ) . toEqual ( 1 ) ;
2525 } ) ;
2626
27- it ( 'should not render styled Text and Icon if user has post permissions and issue is not locked' , ( ) => {
27+ it ( 'should not render styled Text and Icon if user has push permissions and issue is not locked' , ( ) => {
2828
2929 const wrapper = shallow (
3030 < CommentInput { ...defaultProps } />
@@ -34,7 +34,7 @@ describe('<CommentInput />', () => {
3434 expect ( wrapper . find ( 'Icon' ) . length ) . toEqual ( 0 ) ;
3535 } ) ;
3636
37- it ( 'should not render styled TextInput and styled TouchableOpacity if user does not have post permissions and issue is locked' , ( ) => {
37+ it ( 'should not render styled TextInput and styled TouchableOpacity if user does not have push permissions and issue is locked' , ( ) => {
3838
3939 const wrapper = shallow (
4040 < CommentInput
@@ -47,7 +47,7 @@ describe('<CommentInput />', () => {
4747 expect ( wrapper . find ( 'Styled(TouchableOpacity)' ) . length ) . toEqual ( 0 ) ;
4848 } ) ;
4949
50- it ( 'should render styled Text and Icon if user does not have post permissions and issue is locked' , ( ) => {
50+ it ( 'should render styled Text and Icon if user does not have push permissions and issue is locked' , ( ) => {
5151
5252 const wrapper = shallow (
5353 < CommentInput
@@ -60,7 +60,7 @@ describe('<CommentInput />', () => {
6060 expect ( wrapper . find ( 'Icon' ) . length ) . toEqual ( 1 ) ;
6161 } ) ;
6262
63- it ( 'should render styled TextInput and styled TouchableOpacity if user has post permissions and issue is locked' , ( ) => {
63+ it ( 'should render styled TextInput and styled TouchableOpacity if user has push permissions and issue is locked' , ( ) => {
6464 const wrapper = shallow (
6565 < CommentInput
6666 { ...defaultProps }
@@ -71,7 +71,7 @@ describe('<CommentInput />', () => {
7171 expect ( wrapper . find ( 'Styled(TouchableOpacity)' ) . length ) . toEqual ( 1 ) ;
7272 } ) ;
7373
74- it ( 'should not render styled Text and Icon if user has post permissions and issue is locked' , ( ) => {
74+ it ( 'should not render styled Text and Icon if user has push permissions and issue is locked' , ( ) => {
7575 const wrapper = shallow (
7676 < CommentInput
7777 { ...defaultProps }
@@ -82,26 +82,26 @@ describe('<CommentInput />', () => {
8282 expect ( wrapper . find ( 'Icon' ) . length ) . toEqual ( 0 ) ;
8383 } ) ;
8484
85- it ( 'should render styled TextInput and styled TouchableOpacity if user does not have post permissions and issue is not locked' , ( ) => {
85+ it ( 'should not render styled Text and Icon if user does not have push permissions and issue is not locked' , ( ) => {
8686 const wrapper = shallow (
8787 < CommentInput
8888 { ...defaultProps }
89- issueLocked = { true } />
89+ userHasPushPermission = { false } />
9090 ) ;
9191
92- expect ( wrapper . find ( 'Styled(TextInput )' ) . length ) . toEqual ( 1 ) ;
93- expect ( wrapper . find ( 'Styled(TouchableOpacity) ' ) . length ) . toEqual ( 1 ) ;
92+ expect ( wrapper . find ( 'Styled(Text )' ) . length ) . toEqual ( 0 ) ;
93+ expect ( wrapper . find ( 'Icon ' ) . length ) . toEqual ( 0 ) ;
9494 } ) ;
9595
96- it ( 'should not render styled Text and icon if user does not have post permissions and issue is not locked' , ( ) => {
96+ it ( 'should render styled TextInput and styled TouchableOpacity if user does not have push permissions and issue is not locked' , ( ) => {
9797 const wrapper = shallow (
9898 < CommentInput
9999 { ...defaultProps }
100- issueLocked = { true } />
100+ userHasPushPermission = { false } />
101101 ) ;
102102
103- expect ( wrapper . find ( 'Styled(Text )' ) . length ) . toEqual ( 0 ) ;
104- expect ( wrapper . find ( 'Icon ' ) . length ) . toEqual ( 0 ) ;
103+ expect ( wrapper . find ( 'Styled(TextInput )' ) . length ) . toEqual ( 1 ) ;
104+ expect ( wrapper . find ( 'Styled(TouchableOpacity) ' ) . length ) . toEqual ( 1 ) ;
105105 } ) ;
106106
107107 it ( 'should update the state text if value is changed' , ( ) => {
0 commit comments