@@ -21,13 +21,14 @@ describe('Component: pfToastNotification', function () {
2121 scope . $digest ( ) ;
2222 } ;
2323
24- var setupHTML = function ( notificationType , header , message , showClose , primaryAction , showMenu , data ) {
24+ var setupHTML = function ( notificationType , header , message , showClose , primaryAction , showMenu , data , htmlContent ) {
2525 $scope . type = notificationType ;
2626 $scope . header = header ;
2727 $scope . message = message || "Test Toast Notification Message" ;
2828 $scope . showClose = showClose ;
2929 $scope . primaryAction = primaryAction ;
3030 $scope . data = data ;
31+ $scope . htmlContent = htmlContent ;
3132
3233 $scope . closeData = undefined ;
3334 $scope . closeCallback = function ( data ) {
@@ -91,9 +92,9 @@ describe('Component: pfToastNotification', function () {
9192 title : "Test Notification"
9293 } ;
9394 var htmlTmp = '<pf-toast-notification notification-type="{{type}}" header="{{header}}" message="{{message}}"' +
94- ' show-close="{{showClose}}" close-callback="closeCallback" ' +
95- ' action-title="{{primaryAction}}" action-callback="handleAction "' +
96- ' menu-actions="menuActions" data="data">' +
95+ ' show-close="{{showClose}}" html-content="htmlContent" ' +
96+ ' close-callback="closeCallback" action-title="{{primaryAction}}"' +
97+ ' action-callback="handleAction" menu-actions="menuActions" data="data">' +
9798 ' </pf-toast-notification>' ;
9899
99100 compileHTML ( htmlTmp , $scope ) ;
@@ -119,12 +120,12 @@ describe('Component: pfToastNotification', function () {
119120 } ) ;
120121
121122 it ( 'should allow HTML content within the header and message' , function ( ) {
122- setupHTML ( "info" , "<em>Test Header</em>" , null , false , '' , false ) ;
123+ setupHTML ( "info" , "<em>Test Header</em>" , null , false , '' , false , null , true ) ;
123124 var header = element . find ( '.toast-pf span strong em' ) ;
124125 expect ( header . length ) . toBe ( 1 ) ;
125126 expect ( header . text ( ) ) . toContain ( "Test Header" ) ;
126127
127- setupHTML ( "info" , "" , "<em>Test Notification Message</em>" , false , '' , false ) ;
128+ setupHTML ( "info" , "" , "<em>Test Notification Message</em>" , false , '' , false , null , true ) ;
128129 var message = element . find ( '.toast-pf > span em' ) ;
129130 expect ( message . length ) . toBe ( 1 ) ;
130131 expect ( message . text ( ) ) . toContain ( "Test Notification Message" ) ;
0 commit comments