11describe ( 'Component: pfInfoStatusCard' , function ( ) {
2- var $scope , $compile , element , cardClass
2+ var $scope , $compile , element , cardClass ;
33
4- beforeEach ( module ( 'patternfly.card' , 'card/info-status/info-status-card.html' ) )
4+ beforeEach ( module ( 'patternfly.card' , 'card/info-status/info-status-card.html' ) ) ;
55
66 beforeEach ( inject ( function ( _$compile_ , _$rootScope_ ) {
7- $compile = _$compile_
8- $scope = _$rootScope_
9- } ) )
7+ $compile = _$compile_ ;
8+ $scope = _$rootScope_ ;
9+ } ) ) ;
1010
1111 describe ( 'Page with pf-info-status-card component' , function ( ) {
1212
1313 var compileCard = function ( markup , scope ) {
14- var el = $compile ( markup ) ( scope )
15- scope . $digest ( )
16- return el
17- }
14+ var el = $compile ( markup ) ( scope ) ;
15+ scope . $digest ( ) ;
16+ return el ;
17+ } ;
1818
1919 it ( 'should set the title link, and icons class' , function ( ) {
2020
@@ -25,20 +25,20 @@ describe('Component: pfInfoStatusCard', function () {
2525 'info' : [
2626 'VM Name: aapdemo002'
2727 ]
28- }
28+ } ;
2929
30- element = compileCard ( '<pf-info-status-card status="status"></pf-info-status-card>' , $scope )
30+ element = compileCard ( '<pf-info-status-card status="status"></pf-info-status-card>' , $scope ) ;
3131
3232 //Make sure a link renders in the title
33- expect ( angular . element ( element ) . find ( '.card-pf-title' ) . find ( 'a' ) . length ) . toBe ( 1 )
33+ expect ( angular . element ( element ) . find ( '.card-pf-title' ) . find ( 'a' ) . length ) . toBe ( 1 ) ;
3434
3535 //Make sure the class is getting set for the title icon
36- expect ( angular . element ( element ) . find ( '.fa' ) . hasClass ( 'fa-shield' ) ) . toBeTruthy ( )
36+ expect ( angular . element ( element ) . find ( '.fa' ) . hasClass ( 'fa-shield' ) ) . toBeTruthy ( ) ;
3737
3838 // By default, showTopBorder if not defined, should be false, resulting in hiding the top
3939 // border, ie. having a .card-pf class
40- cardClass = angular . element ( element ) . find ( '.card-pf' ) . hasClass ( 'card-pf-accented' )
41- expect ( cardClass ) . toBeFalsy ( )
40+ cardClass = angular . element ( element ) . find ( '.card-pf' ) . hasClass ( 'card-pf-accented' ) ;
41+ expect ( cardClass ) . toBeFalsy ( ) ;
4242 } )
4343
4444 it ( 'No link should be present in the title' , function ( ) {
@@ -49,13 +49,13 @@ describe('Component: pfInfoStatusCard', function () {
4949 'info' : [
5050 'VM Name: aapdemo002'
5151 ]
52- }
52+ } ;
5353
54- element = compileCard ( '<pf-info-status-card status="status"></pf-info-status-card>' , $scope )
54+ element = compileCard ( '<pf-info-status-card status="status"></pf-info-status-card>' , $scope ) ;
5555
5656 //Make sure a link renders in the title
57- expect ( angular . element ( element ) . find ( '.card-pf-title' ) . find ( 'a' ) . length ) . toBe ( 0 )
58- } )
57+ expect ( angular . element ( element ) . find ( '.card-pf-title' ) . find ( 'a' ) . length ) . toBe ( 0 ) ;
58+ } ) ;
5959
6060 it ( 'should set the info' , function ( ) {
6161
@@ -69,32 +69,31 @@ describe('Component: pfInfoStatusCard', function () {
6969 'IP Address: 10.9.62.100' ,
7070 'Power status: on'
7171 ]
72- }
72+ } ;
7373
74- element = compileCard ( '<pf-info-status-card status="status"></pf-info-status-card>' , $scope )
74+ element = compileCard ( '<pf-info-status-card status="status"></pf-info-status-card>' , $scope ) ;
7575
76- info = angular . element ( element ) . find ( 'p' )
76+ info = angular . element ( element ) . find ( '.card-pf-info-item' ) ;
7777
7878 //Make sure four info blocks render
79- expect ( info . length ) . toBe ( 4 )
80- } )
79+ expect ( info . length ) . toBe ( 4 ) ;
80+ } ) ;
8181
8282 it ( 'should show the top border' , function ( ) {
83- element = compileCard ( '<pf-info-status-card show-top-border="true"></pf-info-status-card>' , $scope )
83+ element = compileCard ( '<pf-info-status-card show-top-border="true"></pf-info-status-card>' , $scope ) ;
8484
8585 // showTopBorder set to true, results in having the .card-pf-accented class
86- cardClass = angular . element ( element ) . find ( '.card-pf' ) . hasClass ( 'card-pf-accented' )
87- expect ( cardClass ) . toBeTruthy ( )
88-
89- } )
86+ cardClass = angular . element ( element ) . find ( '.card-pf' ) . hasClass ( 'card-pf-accented' ) ;
87+ expect ( cardClass ) . toBeTruthy ( ) ;
88+ } ) ;
9089
9190 it ( 'should hide the top border' , function ( ) {
92- element = compileCard ( '<pf-info-status-card show-top-border="false"></pf-info-status-card>' , $scope )
91+ element = compileCard ( '<pf-info-status-card show-top-border="false"></pf-info-status-card>' , $scope ) ;
9392
9493 // showTopBorder set to false, results in not having the .card-pf-accented class
95- cardClass = angular . element ( element ) . find ( '.card-pf' ) . hasClass ( 'card-pf-accented' )
96- expect ( cardClass ) . toBeFalsy ( )
97- } )
94+ cardClass = angular . element ( element ) . find ( '.card-pf' ) . hasClass ( 'card-pf-accented' ) ;
95+ expect ( cardClass ) . toBeFalsy ( ) ;
96+ } ) ;
9897
9998 it ( 'should set of the iconImage value' , function ( ) {
10099
@@ -106,14 +105,14 @@ describe('Component: pfInfoStatusCard', function () {
106105 '12 Snapshots' ,
107106 'Drift History: 1'
108107 ]
109- }
108+ } ;
110109
111- element = compileCard ( '<pf-info-status-card status="status"></pf-info-status-card>' , $scope )
110+ element = compileCard ( '<pf-info-status-card status="status"></pf-info-status-card>' , $scope ) ;
112111
113112 // should have the images
114- imageElements = angular . element ( element ) . find ( '.info-img' )
115- expect ( imageElements . length ) . toBe ( 1 )
116- expect ( angular . element ( imageElements [ 0 ] ) . attr ( 'src' ) ) . toBe ( 'img/OpenShift-logo.svg' )
117- } )
118- } )
119- } )
113+ imageElements = angular . element ( element ) . find ( '.info-img' ) ;
114+ expect ( imageElements . length ) . toBe ( 1 ) ;
115+ expect ( angular . element ( imageElements [ 0 ] ) . attr ( 'src' ) ) . toBe ( 'img/OpenShift-logo.svg' ) ;
116+ } ) ;
117+ } ) ;
118+ } ) ;
0 commit comments