@@ -750,22 +750,22 @@ describe('Protocol', function () {
750750
751751 iframeLoaded
752752 . then ( ( ) => {
753- spyApp . validateLoad . and . returnValue ( Promise . reject ( null ) ) ;
753+ spyApp . validateReportLoad . and . returnValue ( Promise . reject ( null ) ) ;
754754
755755 // Act
756756 hpm . post < models . IError > ( '/report/load' , testData . load , { uid : testData . uniqueId } )
757757 . then ( ( ) => {
758758 expect ( false ) . toBe ( true ) ;
759- spyApp . validateLoad . calls . reset ( ) ;
759+ spyApp . validateReportLoad . calls . reset ( ) ;
760760 done ( ) ;
761761 } )
762762 . catch ( response => {
763763 // Assert
764- expect ( spyApp . validateLoad ) . toHaveBeenCalledWith ( testData . load ) ;
765- expect ( spyApp . load ) . not . toHaveBeenCalledWith ( testData . load ) ;
764+ expect ( spyApp . validateReportLoad ) . toHaveBeenCalledWith ( testData . load ) ;
765+ expect ( spyApp . reportLoad ) . not . toHaveBeenCalledWith ( testData . load ) ;
766766 expect ( response . statusCode ) . toEqual ( 400 ) ;
767767 // Cleanup
768- spyApp . validateLoad . calls . reset ( ) ;
768+ spyApp . validateReportLoad . calls . reset ( ) ;
769769 done ( ) ;
770770 } ) ;
771771 } ) ;
@@ -784,17 +784,17 @@ describe('Protocol', function () {
784784
785785 iframeLoaded
786786 . then ( ( ) => {
787- spyApp . validateLoad . and . returnValue ( Promise . resolve ( null ) ) ;
787+ spyApp . validateReportLoad . and . returnValue ( Promise . resolve ( null ) ) ;
788788 // Act
789789 hpm . post < void > ( '/report/load' , testData . load )
790790 . then ( response => {
791791 // Assert
792- expect ( spyApp . validateLoad ) . toHaveBeenCalledWith ( testData . load ) ;
793- expect ( spyApp . load ) . toHaveBeenCalledWith ( testData . load ) ;
792+ expect ( spyApp . validateReportLoad ) . toHaveBeenCalledWith ( testData . load ) ;
793+ expect ( spyApp . reportLoad ) . toHaveBeenCalledWith ( testData . load ) ;
794794 expect ( response . statusCode ) . toEqual ( 202 ) ;
795795 // Cleanup
796- spyApp . validateLoad . calls . reset ( ) ;
797- spyApp . load . calls . reset ( ) ;
796+ spyApp . validateReportLoad . calls . reset ( ) ;
797+ spyApp . reportLoad . calls . reset ( ) ;
798798 done ( ) ;
799799 } ) ;
800800 } ) ;
@@ -822,19 +822,19 @@ describe('Protocol', function () {
822822
823823 iframeLoaded
824824 . then ( ( ) => {
825- spyApp . load . and . returnValue ( Promise . resolve ( testData . load ) ) ;
825+ spyApp . reportLoad . and . returnValue ( Promise . resolve ( testData . load ) ) ;
826826
827827 // Act
828828 hpm . post < void > ( '/report/load' , testData . load , { uid : testData . uniqueId } )
829829 . then ( response => {
830830 setTimeout ( ( ) => {
831831 // Assert
832- expect ( spyApp . validateLoad ) . toHaveBeenCalledWith ( testData . load ) ;
833- expect ( spyApp . load ) . toHaveBeenCalledWith ( testData . load ) ;
832+ expect ( spyApp . validateReportLoad ) . toHaveBeenCalledWith ( testData . load ) ;
833+ expect ( spyApp . reportLoad ) . toHaveBeenCalledWith ( testData . load ) ;
834834 expect ( spyHandler . handle ) . toHaveBeenCalledWith ( jasmine . objectContaining ( testExpectedEvent ) ) ;
835835 // Cleanup
836- spyApp . validateLoad . calls . reset ( ) ;
837- spyApp . load . calls . reset ( ) ;
836+ spyApp . validateReportLoad . calls . reset ( ) ;
837+ spyApp . reportLoad . calls . reset ( ) ;
838838 done ( ) ;
839839 } ) ;
840840 } ) ;
@@ -864,19 +864,19 @@ describe('Protocol', function () {
864864
865865 iframeLoaded
866866 . then ( ( ) => {
867- spyApp . load . and . returnValue ( Promise . reject ( testData . error ) ) ;
867+ spyApp . reportLoad . and . returnValue ( Promise . reject ( testData . error ) ) ;
868868
869869 // Act
870870 hpm . post < void > ( '/report/load' , testData . load , { uid : testData . uniqueId } )
871871 . then ( response => {
872872 setTimeout ( ( ) => {
873873 // Assert
874- expect ( spyApp . validateLoad ) . toHaveBeenCalledWith ( testData . load ) ;
875- expect ( spyApp . load ) . toHaveBeenCalledWith ( testData . load ) ;
874+ expect ( spyApp . validateReportLoad ) . toHaveBeenCalledWith ( testData . load ) ;
875+ expect ( spyApp . reportLoad ) . toHaveBeenCalledWith ( testData . load ) ;
876876 expect ( spyHandler . handle ) . toHaveBeenCalledWith ( jasmine . objectContaining ( testExpectedEvent ) ) ;
877877 // Cleanup
878- spyApp . validateLoad . calls . reset ( ) ;
879- spyApp . load . calls . reset ( ) ;
878+ spyApp . validateReportLoad . calls . reset ( ) ;
879+ spyApp . reportLoad . calls . reset ( ) ;
880880 done ( ) ;
881881 } ) ;
882882 } ) ;
@@ -899,17 +899,17 @@ describe('Protocol', function () {
899899
900900 iframeLoaded
901901 . then ( ( ) => {
902- spyApp . validateLoad . and . returnValue ( Promise . resolve ( null ) ) ;
902+ spyApp . validateDashboardLoad . and . returnValue ( Promise . resolve ( null ) ) ;
903903 // Act
904904 hpm . post < void > ( '/dashboard/load' , testData . load )
905905 . then ( response => {
906906 // Assert
907- expect ( spyApp . validateLoad ) . toHaveBeenCalledWith ( testData . load ) ;
908- expect ( spyApp . load ) . toHaveBeenCalledWith ( testData . load ) ;
907+ expect ( spyApp . validateDashboardLoad ) . toHaveBeenCalledWith ( testData . load ) ;
908+ expect ( spyApp . dashboardLoad ) . toHaveBeenCalledWith ( testData . load ) ;
909909 expect ( response . statusCode ) . toEqual ( 202 ) ;
910910 // Cleanup
911- spyApp . validateLoad . calls . reset ( ) ;
912- spyApp . load . calls . reset ( ) ;
911+ spyApp . validateDashboardLoad . calls . reset ( ) ;
912+ spyApp . dashboardLoad . calls . reset ( ) ;
913913 done ( ) ;
914914 } ) ;
915915 } ) ;
@@ -930,22 +930,22 @@ describe('Protocol', function () {
930930
931931 iframeLoaded
932932 . then ( ( ) => {
933- spyApp . validateLoad . and . returnValue ( Promise . reject ( null ) ) ;
933+ spyApp . validateDashboardLoad . and . returnValue ( Promise . reject ( null ) ) ;
934934
935935 // Act
936936 hpm . post < models . IError > ( '/dashboard/load' , testData . load , { uid : testData . uniqueId } )
937937 . then ( ( ) => {
938938 expect ( false ) . toBe ( true ) ;
939- spyApp . validateLoad . calls . reset ( ) ;
939+ spyApp . validateDashboardLoad . calls . reset ( ) ;
940940 done ( ) ;
941941 } )
942942 . catch ( response => {
943943 // Assert
944- expect ( spyApp . validateLoad ) . toHaveBeenCalledWith ( testData . load ) ;
945- expect ( spyApp . load ) . not . toHaveBeenCalledWith ( testData . load ) ;
944+ expect ( spyApp . validateDashboardLoad ) . toHaveBeenCalledWith ( testData . load ) ;
945+ expect ( spyApp . dashboardLoad ) . not . toHaveBeenCalledWith ( testData . load ) ;
946946 expect ( response . statusCode ) . toEqual ( 400 ) ;
947947 // Cleanup
948- spyApp . validateLoad . calls . reset ( ) ;
948+ spyApp . validateDashboardLoad . calls . reset ( ) ;
949949 done ( ) ;
950950 } ) ;
951951 } ) ;
@@ -1093,7 +1093,7 @@ describe('Protocol', function () {
10931093 expect ( response . statusCode ) . toEqual ( 202 ) ;
10941094 expect ( spyHandler . handle ) . toHaveBeenCalledWith ( jasmine . objectContaining ( expectedEvent ) ) ;
10951095 // Cleanup
1096- spyApp . validateLoad . calls . reset ( ) ;
1096+ spyApp . validateReportLoad . calls . reset ( ) ;
10971097 spyApp . setPage . calls . reset ( ) ;
10981098 done ( ) ;
10991099 } ) ;
@@ -1132,7 +1132,7 @@ describe('Protocol', function () {
11321132 expect ( response . statusCode ) . toEqual ( 202 ) ;
11331133 expect ( spyHandler . handle ) . toHaveBeenCalledWith ( jasmine . objectContaining ( expectedEvent ) ) ;
11341134 // Cleanup
1135- spyApp . validateLoad . calls . reset ( ) ;
1135+ spyApp . validateReportLoad . calls . reset ( ) ;
11361136 spyApp . setPage . calls . reset ( ) ;
11371137 done ( ) ;
11381138 } ) ;
@@ -3125,7 +3125,8 @@ describe('SDK-to-MockApp', function () {
31253125 iframeHpm2 = setupEmbedMockApp ( iframe2 . contentWindow , window , logMessages , 'SDK-to-MockApp IframeWpmp2' ) ;
31263126
31273127 // Reset load handler
3128- spyApp . validateLoad . calls . reset ( ) ;
3128+ spyApp . validateReportLoad . calls . reset ( ) ;
3129+ spyApp . validateDashboardLoad . calls . reset ( ) ;
31293130 spyApp . reset ( ) ;
31303131
31313132 const iframe1Loaded = new Promise < void > ( ( resolve , reject ) => {
@@ -3170,13 +3171,13 @@ describe('SDK-to-MockApp', function () {
31703171
31713172 iframeLoaded
31723173 . then ( ( ) => {
3173- spyApp . validateLoad . and . returnValue ( Promise . reject ( testData . expectedErrors ) ) ;
3174+ spyApp . validateReportLoad . and . returnValue ( Promise . reject ( testData . expectedErrors ) ) ;
31743175 // Act
31753176 report . load ( testData . loadConfig )
31763177 . catch ( errors => {
31773178 // Assert
3178- expect ( spyApp . validateLoad ) . toHaveBeenCalledWith ( testData . loadConfig ) ;
3179- expect ( spyApp . load ) . not . toHaveBeenCalled ( ) ;
3179+ expect ( spyApp . validateReportLoad ) . toHaveBeenCalledWith ( testData . loadConfig ) ;
3180+ expect ( spyApp . reportLoad ) . not . toHaveBeenCalled ( ) ;
31803181 expect ( errors ) . toEqual ( jasmine . objectContaining ( testData . expectedErrors ) ) ;
31813182 done ( ) ;
31823183 } ) ;
@@ -3194,14 +3195,14 @@ describe('SDK-to-MockApp', function () {
31943195
31953196 iframeLoaded
31963197 . then ( ( ) => {
3197- spyApp . validateLoad . and . returnValue ( Promise . resolve ( null ) ) ;
3198- spyApp . load . and . returnValue ( Promise . resolve ( null ) ) ;
3198+ spyApp . validateReportLoad . and . returnValue ( Promise . resolve ( null ) ) ;
3199+ spyApp . reportLoad . and . returnValue ( Promise . resolve ( null ) ) ;
31993200 // Act
32003201 report . load ( testData . loadConfig )
32013202 . then ( response => {
32023203 // Assert
3203- expect ( spyApp . validateLoad ) . toHaveBeenCalledWith ( testData . loadConfig ) ;
3204- expect ( spyApp . load ) . toHaveBeenCalledWith ( testData . loadConfig ) ;
3204+ expect ( spyApp . validateReportLoad ) . toHaveBeenCalledWith ( testData . loadConfig ) ;
3205+ expect ( spyApp . reportLoad ) . toHaveBeenCalledWith ( testData . loadConfig ) ;
32053206 expect ( response ) . toEqual ( undefined ) ;
32063207 done ( ) ;
32073208 } ) ;
0 commit comments