Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/tracing/components/tracing_list_spec.js')
-rw-r--r--spec/frontend/tracing/components/tracing_list_spec.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/frontend/tracing/components/tracing_list_spec.js b/spec/frontend/tracing/components/tracing_list_spec.js
index 183578cff31..f02b238f7a7 100644
--- a/spec/frontend/tracing/components/tracing_list_spec.js
+++ b/spec/frontend/tracing/components/tracing_list_spec.js
@@ -5,6 +5,8 @@ import TracingEmptyState from '~/tracing/components/tracing_empty_state.vue';
import TracingTableList from '~/tracing/components/tracing_table_list.vue';
import waitForPromises from 'helpers/wait_for_promises';
import { createAlert } from '~/alert';
+import * as urlUtility from '~/lib/utils/url_utility';
+import setWindowLocation from 'helpers/set_window_location_helper';
jest.mock('~/alert');
@@ -69,6 +71,16 @@ describe('TracingList', () => {
expect(observabilityClientMock.fetchTraces).toHaveBeenCalledTimes(1);
});
+
+ it('on trace selection it redirects to the details url', () => {
+ setWindowLocation('base_path');
+ const visitUrlMock = jest.spyOn(urlUtility, 'visitUrl').mockReturnValue({});
+
+ findTableList().vm.$emit('trace-selected', { trace_id: 'test-trace-id' });
+
+ expect(visitUrlMock).toHaveBeenCalledTimes(1);
+ expect(visitUrlMock).toHaveBeenCalledWith('/base_path/test-trace-id');
+ });
});
describe('when tracing is not enabled', () => {