File tree Expand file tree Collapse file tree
x-pack/plugins/security_solution/public/resolver Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -193,14 +193,11 @@ describe('data state', () => {
193193 expect ( selectors . isLoading ( state ( ) ) ) . toBe ( true ) ;
194194 } ) ;
195195 it ( 'should need to fetch the second databaseDocumentID' , ( ) => {
196- expect ( selectors . databaseDocumentIDToFetch ( state ( ) ) ) . toBe ( firstDatabaseDocumentID ) ;
196+ expect ( selectors . databaseDocumentIDToFetch ( state ( ) ) ) . toBe ( secondDatabaseDocumentID ) ;
197197 } ) ;
198198 it ( 'should need to abort the request for the databaseDocumentID' , ( ) => {
199199 expect ( selectors . databaseDocumentIDToFetch ( state ( ) ) ) . toBe ( secondDatabaseDocumentID ) ;
200200 } ) ;
201- it ( 'should use the correct location for the first resolver' , ( ) => {
202- expect ( selectors . resolverComponentInstanceID ( state ( ) ) ) . toBe ( resolverComponentInstanceID1 ) ;
203- } ) ;
204201 it ( 'should use the correct location for the second resolver' , ( ) => {
205202 expect ( selectors . resolverComponentInstanceID ( state ( ) ) ) . toBe ( resolverComponentInstanceID2 ) ;
206203 } ) ;
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ export function isLoading(state: DataState): boolean {
4444 * A string for uniquely identifying the instance of resolver within the app.
4545 */
4646export function resolverComponentInstanceID ( state : DataState ) : string {
47- return state . resolverComponentInstanceID ;
47+ return state . resolverComponentInstanceID ? state . resolverComponentInstanceID : '' ;
4848}
4949
5050/**
Original file line number Diff line number Diff line change @@ -177,7 +177,7 @@ export interface DataState {
177177 * The id used for the pending request, if there is one.
178178 */
179179 readonly pendingRequestDatabaseDocumentID ?: string ;
180- readonly resolverComponentInstanceID : string ;
180+ readonly resolverComponentInstanceID : string | undefined ;
181181
182182 /**
183183 * The parameters and response from the last successful request.
You can’t perform that action at this time.
0 commit comments