@@ -13,6 +13,7 @@ describe('license features', function () {
1313 const serviceSetup = new SecurityLicenseService ( ) . setup ( {
1414 license$ : of ( undefined as any ) ,
1515 } ) ;
16+ expect ( serviceSetup . license . isLicenseAvailable ( ) ) . toEqual ( false ) ;
1617 expect ( serviceSetup . license . getFeatures ( ) ) . toEqual ( {
1718 showLogin : true ,
1819 allowLogin : false ,
@@ -34,6 +35,7 @@ describe('license features', function () {
3435 const serviceSetup = new SecurityLicenseService ( ) . setup ( {
3536 license$ : of ( rawLicenseMock ) ,
3637 } ) ;
38+ expect ( serviceSetup . license . isLicenseAvailable ( ) ) . toEqual ( false ) ;
3739 expect ( serviceSetup . license . getFeatures ( ) ) . toEqual ( {
3840 showLogin : true ,
3941 allowLogin : false ,
@@ -60,6 +62,7 @@ describe('license features', function () {
6062 const subscriptionHandler = jest . fn ( ) ;
6163 const subscription = serviceSetup . license . features$ . subscribe ( subscriptionHandler ) ;
6264 try {
65+ expect ( serviceSetup . license . isLicenseAvailable ( ) ) . toEqual ( false ) ;
6366 expect ( subscriptionHandler ) . toHaveBeenCalledTimes ( 1 ) ;
6467 expect ( subscriptionHandler . mock . calls [ 0 ] ) . toMatchInlineSnapshot ( `
6568 Array [
@@ -80,6 +83,7 @@ describe('license features', function () {
8083 ` ) ;
8184
8285 rawLicense$ . next ( licenseMock . createLicenseMock ( ) ) ;
86+ expect ( serviceSetup . license . isLicenseAvailable ( ) ) . toEqual ( true ) ;
8387 expect ( subscriptionHandler ) . toHaveBeenCalledTimes ( 2 ) ;
8488 expect ( subscriptionHandler . mock . calls [ 1 ] ) . toMatchInlineSnapshot ( `
8589 Array [
@@ -112,6 +116,7 @@ describe('license features', function () {
112116 const serviceSetup = new SecurityLicenseService ( ) . setup ( {
113117 license$ : of ( mockRawLicense ) ,
114118 } ) ;
119+ expect ( serviceSetup . license . isLicenseAvailable ( ) ) . toEqual ( true ) ;
115120 expect ( serviceSetup . license . getFeatures ( ) ) . toEqual ( {
116121 showLogin : true ,
117122 allowLogin : true ,
@@ -136,6 +141,7 @@ describe('license features', function () {
136141 const serviceSetup = new SecurityLicenseService ( ) . setup ( {
137142 license$ : of ( mockRawLicense ) ,
138143 } ) ;
144+ expect ( serviceSetup . license . isLicenseAvailable ( ) ) . toEqual ( true ) ;
139145 expect ( serviceSetup . license . getFeatures ( ) ) . toEqual ( {
140146 showLogin : false ,
141147 allowLogin : false ,
@@ -159,6 +165,7 @@ describe('license features', function () {
159165 const serviceSetup = new SecurityLicenseService ( ) . setup ( {
160166 license$ : of ( mockRawLicense ) ,
161167 } ) ;
168+ expect ( serviceSetup . license . isLicenseAvailable ( ) ) . toEqual ( true ) ;
162169 expect ( serviceSetup . license . getFeatures ( ) ) . toEqual ( {
163170 showLogin : true ,
164171 allowLogin : true ,
@@ -182,6 +189,7 @@ describe('license features', function () {
182189 const serviceSetup = new SecurityLicenseService ( ) . setup ( {
183190 license$ : of ( mockRawLicense ) ,
184191 } ) ;
192+ expect ( serviceSetup . license . isLicenseAvailable ( ) ) . toEqual ( true ) ;
185193 expect ( serviceSetup . license . getFeatures ( ) ) . toEqual ( {
186194 showLogin : true ,
187195 allowLogin : true ,
@@ -205,6 +213,7 @@ describe('license features', function () {
205213 const serviceSetup = new SecurityLicenseService ( ) . setup ( {
206214 license$ : of ( mockRawLicense ) ,
207215 } ) ;
216+ expect ( serviceSetup . license . isLicenseAvailable ( ) ) . toEqual ( true ) ;
208217 expect ( serviceSetup . license . getFeatures ( ) ) . toEqual ( {
209218 showLogin : true ,
210219 allowLogin : true ,
0 commit comments