summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-05-17 00:08:30 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2023-05-17 00:08:30 +0000
commite91080371b32e69d038b3a94261688c09dbcd641 (patch)
treeb2048c031771a959f28368de5932122b0e2ca749 /spec
parent32cfd14a94117d1e56524727e7d1b649493f5790 (diff)
downloadgitlab-ce-e91080371b32e69d038b3a94261688c09dbcd641.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec')
-rw-r--r--spec/frontend/work_items/components/notes/work_item_note_actions_spec.js13
-rw-r--r--spec/models/namespace/root_storage_statistics_spec.rb25
2 files changed, 7 insertions, 31 deletions
diff --git a/spec/frontend/work_items/components/notes/work_item_note_actions_spec.js b/spec/frontend/work_items/components/notes/work_item_note_actions_spec.js
index 99bf391e261..9f796c8663f 100644
--- a/spec/frontend/work_items/components/notes/work_item_note_actions_spec.js
+++ b/spec/frontend/work_items/components/notes/work_item_note_actions_spec.js
@@ -1,4 +1,4 @@
-import { GlDropdown } from '@gitlab/ui';
+import { GlDisclosureDropdown } from '@gitlab/ui';
import { shallowMount } from '@vue/test-utils';
import Vue from 'vue';
import VueApollo from 'vue-apollo';
@@ -18,7 +18,7 @@ describe('Work Item Note Actions', () => {
const findReplyButton = () => wrapper.findComponent(ReplyButton);
const findEditButton = () => wrapper.find('[data-testid="edit-work-item-note"]');
const findEmojiButton = () => wrapper.find('[data-testid="note-emoji-button"]');
- const findDropdown = () => wrapper.findComponent(GlDropdown);
+ const findDropdown = () => wrapper.findComponent(GlDisclosureDropdown);
const findDeleteNoteButton = () => wrapper.find('[data-testid="delete-note-action"]');
const findCopyLinkButton = () => wrapper.find('[data-testid="copy-link-action"]');
const findAssignUnassignButton = () => wrapper.find('[data-testid="assign-note-action"]');
@@ -61,6 +61,7 @@ describe('Work Item Note Actions', () => {
},
apolloProvider: createMockApollo([[addAwardEmojiMutation, addEmojiMutationResolver]]),
});
+ wrapper.vm.$refs.dropdown.close = jest.fn();
};
describe('reply button', () => {
@@ -152,7 +153,7 @@ describe('Work Item Note Actions', () => {
showEdit: true,
});
- findDeleteNoteButton().vm.$emit('click');
+ findDeleteNoteButton().vm.$emit('action');
expect(wrapper.emitted('deleteNote')).toEqual([[]]);
});
@@ -167,7 +168,7 @@ describe('Work Item Note Actions', () => {
});
it('should emit `notifyCopyDone` event when copy link note action is clicked', () => {
- findCopyLinkButton().vm.$emit('click');
+ findCopyLinkButton().vm.$emit('action');
expect(wrapper.emitted('notifyCopyDone')).toEqual([[]]);
});
@@ -193,7 +194,7 @@ describe('Work Item Note Actions', () => {
showAssignUnassign: true,
});
- findAssignUnassignButton().vm.$emit('click');
+ findAssignUnassignButton().vm.$emit('action');
expect(wrapper.emitted('assignUser')).toEqual([[]]);
});
@@ -219,7 +220,7 @@ describe('Work Item Note Actions', () => {
canReportAbuse: true,
});
- findReportAbuseToAdminButton().vm.$emit('click');
+ findReportAbuseToAdminButton().vm.$emit('action');
expect(wrapper.emitted('reportAbuse')).toEqual([[]]);
});
diff --git a/spec/models/namespace/root_storage_statistics_spec.rb b/spec/models/namespace/root_storage_statistics_spec.rb
index c2a0c8c8a7c..3b6062c0d8a 100644
--- a/spec/models/namespace/root_storage_statistics_spec.rb
+++ b/spec/models/namespace/root_storage_statistics_spec.rb
@@ -317,31 +317,6 @@ RSpec.describe Namespace::RootStorageStatistics, type: :model do
expect(root_storage_statistics.reload.internal_forks_storage_size).to eq(0)
end
-
- context 'when the feature flag is off' do
- before do
- stub_feature_flags(root_storage_statistics_calculate_forks: false)
- end
-
- it 'does not aggregate fork storage sizes' do
- project = create_project(size_multiplier: 150)
- create_fork(project, size_multiplier: 100)
-
- root_storage_statistics.recalculate!
-
- expect(root_storage_statistics.reload.private_forks_storage_size).to eq(0)
- end
-
- it 'aggregates fork sizes for enabled namespaces' do
- stub_feature_flags(root_storage_statistics_calculate_forks: namespace)
- project = create_project(size_multiplier: 150)
- project_fork = create_fork(project, size_multiplier: 100)
-
- root_storage_statistics.recalculate!
-
- expect(root_storage_statistics.reload.private_forks_storage_size).to eq(project_fork.statistics.storage_size)
- end
- end
end
end