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:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-12-19 14:01:45 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-12-19 14:01:45 +0300
commit9297025d0b7ddf095eb618dfaaab2ff8f2018d8b (patch)
tree865198c01d1824a9b098127baa3ab980c9cd2c06 /spec/frontend/import_entities/import_groups/components/import_history_link_spec.js
parent6372471f43ee03c05a7c1f8b0c6ac6b8a7431dbe (diff)
Add latest changes from gitlab-org/gitlab@16-7-stable-eev16.7.0-rc42
Diffstat (limited to 'spec/frontend/import_entities/import_groups/components/import_history_link_spec.js')
-rw-r--r--spec/frontend/import_entities/import_groups/components/import_history_link_spec.js34
1 files changed, 34 insertions, 0 deletions
diff --git a/spec/frontend/import_entities/import_groups/components/import_history_link_spec.js b/spec/frontend/import_entities/import_groups/components/import_history_link_spec.js
new file mode 100644
index 00000000000..5f530f2c3be
--- /dev/null
+++ b/spec/frontend/import_entities/import_groups/components/import_history_link_spec.js
@@ -0,0 +1,34 @@
+import { shallowMount } from '@vue/test-utils';
+import { GlLink } from '@gitlab/ui';
+
+import ImportHistoryLink from '~/import_entities/import_groups/components/import_history_link.vue';
+
+describe('import history link', () => {
+ let wrapper;
+
+ const mockHistoryPath = '/import/history';
+
+ const createComponent = ({ props } = {}) => {
+ wrapper = shallowMount(ImportHistoryLink, {
+ propsData: {
+ historyPath: mockHistoryPath,
+ ...props,
+ },
+ });
+ };
+
+ const findGlLink = () => wrapper.findComponent(GlLink);
+
+ it('renders link with href', () => {
+ const mockId = 174;
+
+ createComponent({
+ props: {
+ id: mockId,
+ },
+ });
+
+ expect(findGlLink().text()).toBe('View details');
+ expect(findGlLink().attributes('href')).toBe('/import/history?bulk_import_id=174');
+ });
+});