diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-10-17 21:10:11 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-10-17 21:10:11 +0300 |
commit | 5cbf24858edb03505b16474e3b7b41a49b677ff6 (patch) | |
tree | 21999fbb911fe2410cf498b3ed668d202dc90098 /spec/components | |
parent | 673a1a02e97181a5f2d94cd0b116ebb4dba3d875 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/components')
-rw-r--r-- | spec/components/projects/ml/models_index_component_spec.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/spec/components/projects/ml/models_index_component_spec.rb b/spec/components/projects/ml/models_index_component_spec.rb index 586190c8fc0..c42c94d5d01 100644 --- a/spec/components/projects/ml/models_index_component_spec.rb +++ b/spec/components/projects/ml/models_index_component_spec.rb @@ -30,6 +30,8 @@ RSpec.describe Projects::Ml::ModelsIndexComponent, type: :component, feature_cat let(:element) { page.find("#js-index-ml-models") } before do + allow(model1).to receive(:version_count).and_return(1) + allow(model2).to receive(:version_count).and_return(0) render_inline component end @@ -41,12 +43,14 @@ RSpec.describe Projects::Ml::ModelsIndexComponent, type: :component, feature_cat { 'name' => model1.name, 'version' => model1.latest_version.version, - 'path' => "/#{project.full_path}/-/packages/#{model1.latest_version.package_id}" + 'path' => "/#{project.full_path}/-/packages/#{model1.latest_version.package_id}", + 'versionCount' => 1 }, { 'name' => model2.name, 'version' => nil, - 'path' => nil + 'path' => nil, + 'versionCount' => 0 } ], 'pageInfo' => { |