@@ -2446,6 +2446,7 @@ describe('SDK-to-HPM', function () {
24462446 let page1 : page . Page ;
24472447 let visual1 : visualDescriptor . VisualDescriptor ;
24482448 let uniqueId = 'uniqueId' ;
2449+ let sdkSessionId = 'sdkSessionId' ;
24492450 let createUniqueId = 'uniqueId' ;
24502451 let dashboardUniqueId = 'uniqueId' ;
24512452 let visualUniqueId = 'uniqueId' ;
@@ -2513,6 +2514,7 @@ describe('SDK-to-HPM', function () {
25132514 page1 = new page . Page ( report , 'xyz' ) ;
25142515 visual1 = new visualDescriptor . VisualDescriptor ( page1 , 'uvw' , 'title' , 'type' , { } ) ;
25152516 uniqueId = report . config . uniqueId ;
2517+ sdkSessionId = powerbi . getSdkSessionId ( ) ;
25162518 createUniqueId = create . config . uniqueId ;
25172519 dashboardUniqueId = dashboard . config . uniqueId ;
25182520 visualUniqueId = embeddedVisual . config . uniqueId ;
@@ -2567,7 +2569,7 @@ describe('SDK-to-HPM', function () {
25672569 report . load ( testData . loadConfiguration ) ;
25682570
25692571 // Assert
2570- expect ( spyHpm . post ) . toHaveBeenCalledWith ( '/report/load' , testData . loadConfiguration , { uid : uniqueId } , iframe . contentWindow ) ;
2572+ expect ( spyHpm . post ) . toHaveBeenCalledWith ( '/report/load' , testData . loadConfiguration , { uid : uniqueId , sdkSessionId : sdkSessionId } , iframe . contentWindow ) ;
25712573 } ) ;
25722574
25732575 it ( 'report.load() returns promise that rejects with validation error if the load configuration is invalid' , function ( done ) {
@@ -2589,7 +2591,7 @@ describe('SDK-to-HPM', function () {
25892591 // Act
25902592 report . load ( testData . loadConfiguration )
25912593 . catch ( error => {
2592- expect ( spyHpm . post ) . toHaveBeenCalledWith ( '/report/load' , testData . loadConfiguration , { uid : uniqueId } , iframe . contentWindow ) ;
2594+ expect ( spyHpm . post ) . toHaveBeenCalledWith ( '/report/load' , testData . loadConfiguration , { uid : uniqueId , sdkSessionId : sdkSessionId } , iframe . contentWindow ) ;
25932595 expect ( error ) . toEqual ( testData . errorResponse . body ) ;
25942596 // Assert
25952597 done ( ) ;
@@ -2613,7 +2615,7 @@ describe('SDK-to-HPM', function () {
26132615 // Act
26142616 report . load ( testData . loadConfiguration )
26152617 . then ( response => {
2616- expect ( spyHpm . post ) . toHaveBeenCalledWith ( '/report/load' , testData . loadConfiguration , { uid : uniqueId } , iframe . contentWindow ) ;
2618+ expect ( spyHpm . post ) . toHaveBeenCalledWith ( '/report/load' , testData . loadConfiguration , { uid : uniqueId , sdkSessionId : sdkSessionId } , iframe . contentWindow ) ;
26172619 expect ( response ) . toEqual ( null ) ;
26182620 // Assert
26192621 done ( ) ;
@@ -2709,7 +2711,7 @@ describe('SDK-to-HPM', function () {
27092711 let spyArgs = spyHpm . post . calls . mostRecent ( ) . args ;
27102712 expect ( spyArgs [ 0 ] ) . toEqual ( '/report/load' ) ;
27112713 expect ( spyArgs [ 1 ] ) . toEqual ( expectedConfiguration ) ;
2712- expect ( spyArgs [ 2 ] ) . toEqual ( { uid : visualUniqueId } ) ;
2714+ expect ( spyArgs [ 2 ] ) . toEqual ( { uid : visualUniqueId , sdkSessionId : sdkSessionId } ) ;
27132715 expect ( spyArgs [ 3 ] ) . toEqual ( visualFrame . contentWindow ) ;
27142716 } ) ;
27152717
@@ -3167,7 +3169,7 @@ describe('SDK-to-HPM', function () {
31673169 report . reload ( ) ;
31683170
31693171 // Assert
3170- expect ( spyHpm . post ) . toHaveBeenCalledWith ( '/report/load' , jasmine . objectContaining ( testData . loadConfiguration ) , { uid : uniqueId } , iframe . contentWindow ) ;
3172+ expect ( spyHpm . post ) . toHaveBeenCalledWith ( '/report/load' , jasmine . objectContaining ( testData . loadConfiguration ) , { uid : uniqueId , sdkSessionId : sdkSessionId } , iframe . contentWindow ) ;
31713173 } ) ;
31723174 } ) ;
31733175 } ) ;
@@ -3274,7 +3276,7 @@ describe('SDK-to-HPM', function () {
32743276 create . createReport ( testData . createConfiguration ) ;
32753277
32763278 // Assert
3277- expect ( spyHpm . post ) . toHaveBeenCalledWith ( '/report/create' , testData . createConfiguration , { uid : createUniqueId } , createIframe . contentWindow ) ;
3279+ expect ( spyHpm . post ) . toHaveBeenCalledWith ( '/report/create' , testData . createConfiguration , { uid : createUniqueId , sdkSessionId : sdkSessionId } , createIframe . contentWindow ) ;
32783280 } ) ;
32793281
32803282 it ( 'create.createReport() returns promise that rejects with validation error if the create configuration is invalid' , function ( done ) {
@@ -3296,7 +3298,7 @@ describe('SDK-to-HPM', function () {
32963298 // Act
32973299 create . createReport ( testData . createConfiguration )
32983300 . catch ( error => {
3299- expect ( spyHpm . post ) . toHaveBeenCalledWith ( '/report/create' , testData . createConfiguration , { uid : createUniqueId } , createIframe . contentWindow ) ;
3301+ expect ( spyHpm . post ) . toHaveBeenCalledWith ( '/report/create' , testData . createConfiguration , { uid : createUniqueId , sdkSessionId : sdkSessionId } , createIframe . contentWindow ) ;
33003302 expect ( error ) . toEqual ( testData . errorResponse . body ) ;
33013303 // Assert
33023304 done ( ) ;
@@ -3320,7 +3322,7 @@ describe('SDK-to-HPM', function () {
33203322 // Act
33213323 create . createReport ( testData . createConfiguration )
33223324 . then ( response => {
3323- expect ( spyHpm . post ) . toHaveBeenCalledWith ( '/report/create' , testData . createConfiguration , { uid : createUniqueId } , createIframe . contentWindow ) ;
3325+ expect ( spyHpm . post ) . toHaveBeenCalledWith ( '/report/create' , testData . createConfiguration , { uid : createUniqueId , sdkSessionId : sdkSessionId } , createIframe . contentWindow ) ;
33243326 expect ( response ) . toEqual ( null ) ;
33253327 // Assert
33263328 done ( ) ;
@@ -3350,7 +3352,7 @@ describe('SDK-to-HPM', function () {
33503352 dashboard . load ( testData . loadConfiguration ) ;
33513353
33523354 // Assert
3353- expect ( spyHpm . post ) . toHaveBeenCalledWith ( '/dashboard/load' , testData . loadConfiguration , { uid : dashboardUniqueId } , dashboardIframe . contentWindow ) ;
3355+ expect ( spyHpm . post ) . toHaveBeenCalledWith ( '/dashboard/load' , testData . loadConfiguration , { uid : dashboardUniqueId , sdkSessionId : sdkSessionId } , dashboardIframe . contentWindow ) ;
33543356 } ) ;
33553357 } ) ;
33563358 } ) ;
0 commit comments