|
|
|
@ -126,16 +126,16 @@ describe('Tree', () => { |
|
|
|
|
await openSelector(); |
|
|
|
|
await expandResultApplications(); |
|
|
|
|
await searchScopes('Cloud'); |
|
|
|
|
expect(fetchNodesSpy).toHaveBeenCalledTimes(3); |
|
|
|
|
expect(fetchNodesSpy).toHaveBeenCalledTimes(2); |
|
|
|
|
expectResultApplicationsGrafanaNotPresent(); |
|
|
|
|
expectResultApplicationsMimirNotPresent(); |
|
|
|
|
expectResultApplicationsCloudPresent(); |
|
|
|
|
|
|
|
|
|
await clearScopesSearch(); |
|
|
|
|
expect(fetchNodesSpy).toHaveBeenCalledTimes(4); |
|
|
|
|
expect(fetchNodesSpy).toHaveBeenCalledTimes(3); |
|
|
|
|
|
|
|
|
|
await searchScopes('Grafana'); |
|
|
|
|
expect(fetchNodesSpy).toHaveBeenCalledTimes(5); |
|
|
|
|
expect(fetchNodesSpy).toHaveBeenCalledTimes(4); |
|
|
|
|
expectResultApplicationsGrafanaPresent(); |
|
|
|
|
expectResultApplicationsCloudNotPresent(); |
|
|
|
|
}); |
|
|
|
@ -156,7 +156,7 @@ describe('Tree', () => { |
|
|
|
|
await expandResultApplications(); |
|
|
|
|
await selectResultApplicationsMimir(); |
|
|
|
|
await searchScopes('grafana'); |
|
|
|
|
expect(fetchNodesSpy).toHaveBeenCalledTimes(3); |
|
|
|
|
expect(fetchNodesSpy).toHaveBeenCalledTimes(2); |
|
|
|
|
expectPersistedApplicationsMimirPresent(); |
|
|
|
|
expectPersistedApplicationsGrafanaNotPresent(); |
|
|
|
|
expectResultApplicationsMimirNotPresent(); |
|
|
|
@ -168,7 +168,7 @@ describe('Tree', () => { |
|
|
|
|
await expandResultApplications(); |
|
|
|
|
await selectResultApplicationsMimir(); |
|
|
|
|
await searchScopes('mimir'); |
|
|
|
|
expect(fetchNodesSpy).toHaveBeenCalledTimes(3); |
|
|
|
|
expect(fetchNodesSpy).toHaveBeenCalledTimes(2); |
|
|
|
|
expectPersistedApplicationsMimirNotPresent(); |
|
|
|
|
expectResultApplicationsMimirPresent(); |
|
|
|
|
}); |
|
|
|
@ -178,10 +178,10 @@ describe('Tree', () => { |
|
|
|
|
await expandResultApplications(); |
|
|
|
|
await selectResultApplicationsMimir(); |
|
|
|
|
await searchScopes('grafana'); |
|
|
|
|
expect(fetchNodesSpy).toHaveBeenCalledTimes(3); |
|
|
|
|
expect(fetchNodesSpy).toHaveBeenCalledTimes(2); |
|
|
|
|
|
|
|
|
|
await clearScopesSearch(); |
|
|
|
|
expect(fetchNodesSpy).toHaveBeenCalledTimes(4); |
|
|
|
|
expect(fetchNodesSpy).toHaveBeenCalledTimes(3); |
|
|
|
|
expectPersistedApplicationsMimirNotPresent(); |
|
|
|
|
expectPersistedApplicationsGrafanaNotPresent(); |
|
|
|
|
expectResultApplicationsMimirPresent(); |
|
|
|
@ -192,15 +192,15 @@ describe('Tree', () => { |
|
|
|
|
await openSelector(); |
|
|
|
|
await expandResultApplications(); |
|
|
|
|
await searchScopes('mimir'); |
|
|
|
|
expect(fetchNodesSpy).toHaveBeenCalledTimes(3); |
|
|
|
|
expect(fetchNodesSpy).toHaveBeenCalledTimes(2); |
|
|
|
|
|
|
|
|
|
await selectResultApplicationsMimir(); |
|
|
|
|
await searchScopes('unknown'); |
|
|
|
|
expect(fetchNodesSpy).toHaveBeenCalledTimes(4); |
|
|
|
|
expect(fetchNodesSpy).toHaveBeenCalledTimes(3); |
|
|
|
|
expectPersistedApplicationsMimirPresent(); |
|
|
|
|
|
|
|
|
|
await clearScopesSearch(); |
|
|
|
|
expect(fetchNodesSpy).toHaveBeenCalledTimes(5); |
|
|
|
|
expect(fetchNodesSpy).toHaveBeenCalledTimes(4); |
|
|
|
|
expectResultApplicationsMimirPresent(); |
|
|
|
|
expectResultApplicationsGrafanaPresent(); |
|
|
|
|
}); |
|
|
|
@ -210,7 +210,7 @@ describe('Tree', () => { |
|
|
|
|
await expandResultApplications(); |
|
|
|
|
await selectResultApplicationsMimir(); |
|
|
|
|
await searchScopes('grafana'); |
|
|
|
|
expect(fetchNodesSpy).toHaveBeenCalledTimes(3); |
|
|
|
|
expect(fetchNodesSpy).toHaveBeenCalledTimes(2); |
|
|
|
|
|
|
|
|
|
await selectResultApplicationsGrafana(); |
|
|
|
|
await applyScopes(); |
|
|
|
@ -222,7 +222,7 @@ describe('Tree', () => { |
|
|
|
|
await expandResultApplications(); |
|
|
|
|
await selectResultApplicationsMimir(); |
|
|
|
|
await searchScopes('grafana'); |
|
|
|
|
expect(fetchNodesSpy).toHaveBeenCalledTimes(3); |
|
|
|
|
expect(fetchNodesSpy).toHaveBeenCalledTimes(2); |
|
|
|
|
|
|
|
|
|
await selectResultApplicationsGrafana(); |
|
|
|
|
await applyScopes(); |
|
|
|
@ -239,11 +239,11 @@ describe('Tree', () => { |
|
|
|
|
expectScopesHeadline('Recommended'); |
|
|
|
|
|
|
|
|
|
await searchScopes('Applications'); |
|
|
|
|
expect(fetchNodesSpy).toHaveBeenCalledTimes(2); |
|
|
|
|
expect(fetchNodesSpy).toHaveBeenCalledTimes(1); |
|
|
|
|
expectScopesHeadline('Results'); |
|
|
|
|
|
|
|
|
|
await searchScopes('unknown'); |
|
|
|
|
expect(fetchNodesSpy).toHaveBeenCalledTimes(3); |
|
|
|
|
expect(fetchNodesSpy).toHaveBeenCalledTimes(2); |
|
|
|
|
expectScopesHeadline('No results found for your query'); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|