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/ml')
-rw-r--r--spec/frontend/ml/model_registry/apps/show_ml_model_version_spec.js15
-rw-r--r--spec/frontend/ml/model_registry/mock_data.js2
2 files changed, 17 insertions, 0 deletions
diff --git a/spec/frontend/ml/model_registry/apps/show_ml_model_version_spec.js b/spec/frontend/ml/model_registry/apps/show_ml_model_version_spec.js
new file mode 100644
index 00000000000..77fca53c00e
--- /dev/null
+++ b/spec/frontend/ml/model_registry/apps/show_ml_model_version_spec.js
@@ -0,0 +1,15 @@
+import { shallowMount } from '@vue/test-utils';
+import { ShowMlModelVersion } from '~/ml/model_registry/apps';
+import { MODEL_VERSION } from '../mock_data';
+
+let wrapper;
+const createWrapper = () => {
+ wrapper = shallowMount(ShowMlModelVersion, { propsData: { modelVersion: MODEL_VERSION } });
+};
+
+describe('ShowMlModelVersion', () => {
+ beforeEach(() => createWrapper());
+ it('renders the app', () => {
+ expect(wrapper.text()).toContain(`${MODEL_VERSION.model.name} - ${MODEL_VERSION.version}`);
+ });
+});
diff --git a/spec/frontend/ml/model_registry/mock_data.js b/spec/frontend/ml/model_registry/mock_data.js
index 18b2b32e069..35a2c3bec01 100644
--- a/spec/frontend/ml/model_registry/mock_data.js
+++ b/spec/frontend/ml/model_registry/mock_data.js
@@ -1 +1,3 @@
export const MODEL = { name: 'blah' };
+
+export const MODEL_VERSION = { version: '1.2.3', model: MODEL };