@@ -1154,26 +1154,6 @@ describe('Protocol', function () {
11541154 } ) ;
11551155 } ) ;
11561156
1157- describe ( 'refresh' , function ( ) {
1158- it ( 'POST /report/refresh returns 202 if the request is valid' , function ( done ) {
1159- // Arrange
1160- iframeLoaded
1161- . then ( ( ) => {
1162- spyApp . refreshData . and . returnValue ( Promise . resolve ( null ) ) ;
1163- // Act
1164- hpm . post < void > ( '/report/refresh' , null )
1165- . then ( response => {
1166- // Assert
1167- expect ( spyApp . refreshData ) . toHaveBeenCalled ( ) ;
1168- expect ( response . statusCode ) . toEqual ( 202 ) ;
1169- // Cleanup
1170- spyApp . refreshData . calls . reset ( ) ;
1171- done ( ) ;
1172- } ) ;
1173- } ) ;
1174- } ) ;
1175- } ) ;
1176-
11771157 describe ( 'filters (report level)' , function ( ) {
11781158 it ( 'GET /report/filters returns 200 with body as array of filters' , function ( done ) {
11791159 // Arrange
@@ -2214,36 +2194,6 @@ describe('SDK-to-HPM', function () {
22142194 } ) ;
22152195 } ) ;
22162196
2217- describe ( 'refresh' , function ( ) {
2218- it ( 'report.refresh() sends POST /report/refresh' , function ( ) {
2219- // Arrange
2220- spyHpm . post . and . returnValue ( Promise . resolve ( {
2221- body : { }
2222- } ) ) ;
2223-
2224- // Act
2225- report . refresh ( ) ;
2226-
2227- // Assert
2228- expect ( spyHpm . post ) . toHaveBeenCalledWith ( '/report/refresh' , null , { uid : uniqueId } , iframe . contentWindow ) ;
2229- } ) ;
2230-
2231- it ( 'report.refresh() returns promise that resolves if the request is accepted' , function ( done ) {
2232- // Arrange
2233- spyHpm . post . and . returnValue ( Promise . resolve ( {
2234- body : { }
2235- } ) ) ;
2236-
2237- // Act
2238- report . refresh ( )
2239- . then ( ( ) => {
2240- // Assert
2241- expect ( spyHpm . post ) . toHaveBeenCalledWith ( '/report/refresh' , null , { uid : uniqueId } , iframe . contentWindow ) ;
2242- done ( ) ;
2243- } ) ;
2244- } ) ;
2245- } ) ;
2246-
22472197 describe ( 'reload' , function ( ) {
22482198 it ( 'report.reload() sends POST /report/load with configuration in body' , function ( ) {
22492199 // Arrange
@@ -3125,24 +3075,6 @@ describe('SDK-to-MockApp', function () {
31253075 } ) ;
31263076 } ) ;
31273077
3128- describe ( 'refresh' , function ( ) {
3129- it ( 'report.refresh() returns promise that resolves with null if the report refresh command was accepted' , function ( done ) {
3130- // Arrange
3131- iframeLoaded
3132- . then ( ( ) => {
3133- spyApp . refreshData . and . returnValue ( Promise . resolve ( null ) ) ;
3134- // Act
3135- report . refresh ( )
3136- . then ( response => {
3137- // Assert
3138- expect ( spyApp . refreshData ) . toHaveBeenCalled ( ) ;
3139- expect ( response ) . toEqual ( undefined ) ;
3140- done ( ) ;
3141- } ) ;
3142- } ) ;
3143- } ) ;
3144- } ) ;
3145-
31463078 describe ( 'settings' , function ( ) {
31473079 it ( 'report.updateSettings(setting) returns promise that rejects with validation error if object is invalid' , function ( done ) {
31483080 // Arrange
0 commit comments