Commit bdfbf07d authored by Illya Klymov's avatar Illya Klymov

Merge branch 'cngo-fix-issueable-misspellings' into 'master'

Fix misspellings of issuable

See merge request gitlab-org/gitlab!76344
parents ab891bfd 76f348d1
...@@ -115,7 +115,7 @@ export default { ...@@ -115,7 +115,7 @@ export default {
}); });
// Add uniqueIds to add it as argument for _.intersection // Add uniqueIds to add it as argument for _.intersection
labelIds.unshift(uniqueIds); labelIds.unshift(uniqueIds);
// Return IDs that are present but not in all selected issueables // Return IDs that are present but not in all selected issuables
return uniqueIds.filter((x) => !intersection.apply(this, labelIds).includes(x)); return uniqueIds.filter((x) => !intersection.apply(this, labelIds).includes(x));
}, },
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
import $ from 'jquery'; import $ from 'jquery';
import { property } from 'lodash'; import { property } from 'lodash';
import issueableEventHub from '~/issues_list/eventhub'; import issuableEventHub from '~/issues_list/eventhub';
import LabelsSelect from '~/labels/labels_select'; import LabelsSelect from '~/labels/labels_select';
import MilestoneSelect from '~/milestones/milestone_select'; import MilestoneSelect from '~/milestones/milestone_select';
import initIssueStatusSelect from './init_issue_status_select'; import initIssueStatusSelect from './init_issue_status_select';
...@@ -50,8 +50,8 @@ export default class IssuableBulkUpdateSidebar { ...@@ -50,8 +50,8 @@ export default class IssuableBulkUpdateSidebar {
// The event hub connects this bulk update logic with `issues_list_app.vue`. // The event hub connects this bulk update logic with `issues_list_app.vue`.
// We can remove it once we've refactored the issues list page bulk edit sidebar to Vue. // We can remove it once we've refactored the issues list page bulk edit sidebar to Vue.
// https://gitlab.com/gitlab-org/gitlab/-/issues/325874 // https://gitlab.com/gitlab-org/gitlab/-/issues/325874
issueableEventHub.$on('issuables:enableBulkEdit', () => this.toggleBulkEdit(null, true)); issuableEventHub.$on('issuables:enableBulkEdit', () => this.toggleBulkEdit(null, true));
issueableEventHub.$on('issuables:updateBulkEdit', () => this.updateFormState()); issuableEventHub.$on('issuables:updateBulkEdit', () => this.updateFormState());
} }
initDropdowns() { initDropdowns() {
...@@ -110,7 +110,7 @@ export default class IssuableBulkUpdateSidebar { ...@@ -110,7 +110,7 @@ export default class IssuableBulkUpdateSidebar {
toggleBulkEdit(e, enable) { toggleBulkEdit(e, enable) {
e?.preventDefault(); e?.preventDefault();
issueableEventHub.$emit('issuables:toggleBulkEdit', enable); issuableEventHub.$emit('issuables:toggleBulkEdit', enable);
this.toggleSidebarDisplay(enable); this.toggleSidebarDisplay(enable);
this.toggleBulkEditButtonDisabled(enable); this.toggleBulkEditButtonDisabled(enable);
......
...@@ -56,7 +56,7 @@ export function initCsvImportExportButtons() { ...@@ -56,7 +56,7 @@ export function initCsvImportExportButtons() {
export function initIssuableByEmail() { export function initIssuableByEmail() {
Vue.use(GlToast); Vue.use(GlToast);
const el = document.querySelector('.js-issueable-by-email'); const el = document.querySelector('.js-issuable-by-email');
if (!el) return null; if (!el) return null;
......
...@@ -21,7 +21,7 @@ import { ...@@ -21,7 +21,7 @@ import {
PAGE_SIZE_MANUAL, PAGE_SIZE_MANUAL,
LOADING_LIST_ITEMS_LENGTH, LOADING_LIST_ITEMS_LENGTH,
} from '../constants'; } from '../constants';
import issueableEventHub from '../eventhub'; import issuableEventHub from '../eventhub';
import { emptyStateHelper } from '../service_desk_helper'; import { emptyStateHelper } from '../service_desk_helper';
import Issuable from './issuable.vue'; import Issuable from './issuable.vue';
...@@ -192,7 +192,7 @@ export default { ...@@ -192,7 +192,7 @@ export default {
// We need to call nextTick here to wait for all of the boxes to be checked and rendered // We need to call nextTick here to wait for all of the boxes to be checked and rendered
// before we query the dom in issuable_bulk_update_actions.js. // before we query the dom in issuable_bulk_update_actions.js.
this.$nextTick(() => { this.$nextTick(() => {
issueableEventHub.$emit('issuables:updateBulkEdit'); issuableEventHub.$emit('issuables:updateBulkEdit');
}); });
}, },
issuables() { issuables() {
...@@ -203,7 +203,7 @@ export default { ...@@ -203,7 +203,7 @@ export default {
}, },
mounted() { mounted() {
if (this.canBulkEdit) { if (this.canBulkEdit) {
this.unsubscribeToggleBulkEdit = issueableEventHub.$on('issuables:toggleBulkEdit', (val) => { this.unsubscribeToggleBulkEdit = issuableEventHub.$on('issuables:toggleBulkEdit', (val) => {
this.isBulkEditing = val; this.isBulkEditing = val;
}); });
} }
...@@ -211,7 +211,7 @@ export default { ...@@ -211,7 +211,7 @@ export default {
}, },
beforeDestroy() { beforeDestroy() {
// eslint-disable-next-line @gitlab/no-global-event-off // eslint-disable-next-line @gitlab/no-global-event-off
issueableEventHub.$off('issuables:toggleBulkEdit'); issuableEventHub.$off('issuables:toggleBulkEdit');
}, },
methods: { methods: {
isSelected(issuableId) { isSelected(issuableId) {
......
...@@ -101,7 +101,7 @@ export default class LabelsSelect { ...@@ -101,7 +101,7 @@ export default class LabelsSelect {
if (IS_EE) { if (IS_EE) {
/** /**
* For Scoped labels, the last label selected with the * For Scoped labels, the last label selected with the
* same key will be applied to the current issueable. * same key will be applied to the current issuable.
* *
* If these are the labels - priority::1, priority::2; and if * If these are the labels - priority::1, priority::2; and if
* we apply them in the same order, only priority::2 will stick * we apply them in the same order, only priority::2 will stick
......
...@@ -10,7 +10,7 @@ class Projects::IssuesController < Projects::ApplicationController ...@@ -10,7 +10,7 @@ class Projects::IssuesController < Projects::ApplicationController
include RecordUserLastActivity include RecordUserLastActivity
ISSUES_EXCEPT_ACTIONS = %i[index calendar new create bulk_update import_csv export_csv service_desk].freeze ISSUES_EXCEPT_ACTIONS = %i[index calendar new create bulk_update import_csv export_csv service_desk].freeze
SET_ISSUEABLES_INDEX_ONLY_ACTIONS = %i[index calendar service_desk].freeze SET_ISSUABLES_INDEX_ONLY_ACTIONS = %i[index calendar service_desk].freeze
prepend_before_action(only: [:index]) { authenticate_sessionless_user!(:rss) } prepend_before_action(only: [:index]) { authenticate_sessionless_user!(:rss) }
prepend_before_action(only: [:calendar]) { authenticate_sessionless_user!(:ics) } prepend_before_action(only: [:calendar]) { authenticate_sessionless_user!(:ics) }
...@@ -22,7 +22,7 @@ class Projects::IssuesController < Projects::ApplicationController ...@@ -22,7 +22,7 @@ class Projects::IssuesController < Projects::ApplicationController
before_action :issue, unless: ->(c) { ISSUES_EXCEPT_ACTIONS.include?(c.action_name.to_sym) } before_action :issue, unless: ->(c) { ISSUES_EXCEPT_ACTIONS.include?(c.action_name.to_sym) }
after_action :log_issue_show, unless: ->(c) { ISSUES_EXCEPT_ACTIONS.include?(c.action_name.to_sym) } after_action :log_issue_show, unless: ->(c) { ISSUES_EXCEPT_ACTIONS.include?(c.action_name.to_sym) }
before_action :set_issuables_index, if: ->(c) { SET_ISSUEABLES_INDEX_ONLY_ACTIONS.include?(c.action_name.to_sym) } before_action :set_issuables_index, if: ->(c) { SET_ISSUABLES_INDEX_ONLY_ACTIONS.include?(c.action_name.to_sym) }
# Allow write(create) issue # Allow write(create) issue
before_action :authorize_create_issue!, only: [:new, :create] before_action :authorize_create_issue!, only: [:new, :create]
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
= render 'issues' = render 'issues'
- if new_issue_email - if new_issue_email
.gl-text-center.gl-pt-5.gl-pb-7 .gl-text-center.gl-pt-5.gl-pb-7
.js-issueable-by-email{ data: { initial_email: new_issue_email, issuable_type: issuable_type, emails_help_page_path: help_page_path('development/emails', anchor: 'email-namespace'), quick_actions_help_path: help_page_path('user/project/quick_actions'), markdown_help_path: help_page_path('user/markdown'), reset_path: new_issuable_address_project_path(@project, issuable_type: issuable_type) } } .js-issuable-by-email{ data: { initial_email: new_issue_email, issuable_type: issuable_type, emails_help_page_path: help_page_path('development/emails', anchor: 'email-namespace'), quick_actions_help_path: help_page_path('user/project/quick_actions'), markdown_help_path: help_page_path('user/markdown'), reset_path: new_issuable_address_project_path(@project, issuable_type: issuable_type) } }
- else - else
- new_project_issue_button_path = @project.archived? ? false : new_project_issue_path(@project) - new_project_issue_button_path = @project.archived? ? false : new_project_issue_path(@project)
= render 'shared/empty_states/issues', new_project_issue_button_path: new_project_issue_button_path, show_import_button: true = render 'shared/empty_states/issues', new_project_issue_button_path: new_project_issue_button_path, show_import_button: true
...@@ -26,6 +26,6 @@ ...@@ -26,6 +26,6 @@
= render 'merge_requests', new_merge_request_path: new_merge_request_path = render 'merge_requests', new_merge_request_path: new_merge_request_path
- if new_merge_request_email - if new_merge_request_email
.gl-text-center.gl-pt-5.gl-pb-7 .gl-text-center.gl-pt-5.gl-pb-7
.js-issueable-by-email{ data: { initial_email: new_merge_request_email, issuable_type: issuable_type, emails_help_page_path: help_page_path('development/emails', anchor: 'email-namespace'), quick_actions_help_path: help_page_path('user/project/quick_actions'), markdown_help_path: help_page_path('user/markdown'), reset_path: new_issuable_address_project_path(@project, issuable_type: issuable_type) } } .js-issuable-by-email{ data: { initial_email: new_merge_request_email, issuable_type: issuable_type, emails_help_page_path: help_page_path('development/emails', anchor: 'email-namespace'), quick_actions_help_path: help_page_path('user/project/quick_actions'), markdown_help_path: help_page_path('user/markdown'), reset_path: new_issuable_address_project_path(@project, issuable_type: issuable_type) } }
- else - else
= render 'shared/empty_states/merge_requests', button_path: new_merge_request_path = render 'shared/empty_states/merge_requests', button_path: new_merge_request_path
...@@ -16,10 +16,10 @@ RSpec.describe NotesHelper do ...@@ -16,10 +16,10 @@ RSpec.describe NotesHelper do
end end
describe '#discussions_path' do describe '#discussions_path' do
subject { discussions_path(issueable) } subject { discussions_path(issuable) }
context 'for vulnerability' do context 'for vulnerability' do
let(:issueable) { vulnerability } let(:issuable) { vulnerability }
it { is_expected.to eq("/#{vulnerability.project.full_path}/-/security/vulnerabilities/#{vulnerability.id}/discussions.json") } it { is_expected.to eq("/#{vulnerability.project.full_path}/-/security/vulnerabilities/#{vulnerability.id}/discussions.json") }
end end
......
...@@ -17,7 +17,7 @@ const setupHTML = (initialData) => { ...@@ -17,7 +17,7 @@ const setupHTML = (initialData) => {
}; };
describe('Issue show index', () => { describe('Issue show index', () => {
describe('initIssueableApp', () => { describe('initIssuableApp', () => {
it('should initialize app with no potential XSS attack', async () => { it('should initialize app with no potential XSS attack', async () => {
const alertSpy = jest.spyOn(window, 'alert').mockImplementation(() => {}); const alertSpy = jest.spyOn(window, 'alert').mockImplementation(() => {});
const parseDataSpy = jest.spyOn(parseData, 'parseIssuableData'); const parseDataSpy = jest.spyOn(parseData, 'parseIssuableData');
......
...@@ -13,7 +13,7 @@ import createFlash from '~/flash'; ...@@ -13,7 +13,7 @@ import createFlash from '~/flash';
import Issuable from '~/issues_list/components/issuable.vue'; import Issuable from '~/issues_list/components/issuable.vue';
import IssuablesListApp from '~/issues_list/components/issuables_list_app.vue'; import IssuablesListApp from '~/issues_list/components/issuables_list_app.vue';
import { PAGE_SIZE, PAGE_SIZE_MANUAL, RELATIVE_POSITION } from '~/issues_list/constants'; import { PAGE_SIZE, PAGE_SIZE_MANUAL, RELATIVE_POSITION } from '~/issues_list/constants';
import issueablesEventBus from '~/issues_list/eventhub'; import issuablesEventBus from '~/issues_list/eventhub';
import FilteredSearchBar from '~/vue_shared/components/filtered_search_bar/filtered_search_bar_root.vue'; import FilteredSearchBar from '~/vue_shared/components/filtered_search_bar/filtered_search_bar_root.vue';
jest.mock('~/flash'); jest.mock('~/flash');
...@@ -185,8 +185,8 @@ describe('Issuables list component', () => { ...@@ -185,8 +185,8 @@ describe('Issuables list component', () => {
describe('with bulk editing enabled', () => { describe('with bulk editing enabled', () => {
beforeEach(() => { beforeEach(() => {
issueablesEventBus.$on.mockReset(); issuablesEventBus.$on.mockReset();
issueablesEventBus.$emit.mockReset(); issuablesEventBus.$emit.mockReset();
setupApiMock(() => [200, MOCK_ISSUES.slice(0)]); setupApiMock(() => [200, MOCK_ISSUES.slice(0)]);
factory({ canBulkEdit: true }); factory({ canBulkEdit: true });
...@@ -239,19 +239,19 @@ describe('Issuables list component', () => { ...@@ -239,19 +239,19 @@ describe('Issuables list component', () => {
}); });
it('broadcasts a message to the bulk edit sidebar when a value is added to selection', () => { it('broadcasts a message to the bulk edit sidebar when a value is added to selection', () => {
issueablesEventBus.$emit.mockReset(); issuablesEventBus.$emit.mockReset();
const i1 = wrapper.vm.issuables[1]; const i1 = wrapper.vm.issuables[1];
wrapper.vm.onSelectIssuable({ issuable: i1, selected: true }); wrapper.vm.onSelectIssuable({ issuable: i1, selected: true });
return wrapper.vm.$nextTick().then(() => { return wrapper.vm.$nextTick().then(() => {
expect(issueablesEventBus.$emit).toHaveBeenCalledTimes(1); expect(issuablesEventBus.$emit).toHaveBeenCalledTimes(1);
expect(issueablesEventBus.$emit).toHaveBeenCalledWith('issuables:updateBulkEdit'); expect(issuablesEventBus.$emit).toHaveBeenCalledWith('issuables:updateBulkEdit');
}); });
}); });
it('does not broadcast a message to the bulk edit sidebar when a value is not added to selection', () => { it('does not broadcast a message to the bulk edit sidebar when a value is not added to selection', () => {
issueablesEventBus.$emit.mockReset(); issuablesEventBus.$emit.mockReset();
return wrapper.vm return wrapper.vm
.$nextTick() .$nextTick()
...@@ -263,19 +263,19 @@ describe('Issuables list component', () => { ...@@ -263,19 +263,19 @@ describe('Issuables list component', () => {
}) })
.then(wrapper.vm.$nextTick) .then(wrapper.vm.$nextTick)
.then(() => { .then(() => {
expect(issueablesEventBus.$emit).toHaveBeenCalledTimes(0); expect(issuablesEventBus.$emit).toHaveBeenCalledTimes(0);
}); });
}); });
it('listens to a message to toggle bulk editing', () => { it('listens to a message to toggle bulk editing', () => {
expect(wrapper.vm.isBulkEditing).toBe(false); expect(wrapper.vm.isBulkEditing).toBe(false);
expect(issueablesEventBus.$on.mock.calls[0][0]).toBe('issuables:toggleBulkEdit'); expect(issuablesEventBus.$on.mock.calls[0][0]).toBe('issuables:toggleBulkEdit');
issueablesEventBus.$on.mock.calls[0][1](true); // Call the message handler issuablesEventBus.$on.mock.calls[0][1](true); // Call the message handler
return waitForPromises() return waitForPromises()
.then(() => { .then(() => {
expect(wrapper.vm.isBulkEditing).toBe(true); expect(wrapper.vm.isBulkEditing).toBe(true);
issueablesEventBus.$on.mock.calls[0][1](false); issuablesEventBus.$on.mock.calls[0][1](false);
}) })
.then(() => { .then(() => {
expect(wrapper.vm.isBulkEditing).toBe(false); expect(wrapper.vm.isBulkEditing).toBe(false);
......
...@@ -380,7 +380,7 @@ RSpec.describe API::Todos do ...@@ -380,7 +380,7 @@ RSpec.describe API::Todos do
end end
end end
describe 'POST :id/issuable_type/:issueable_id/todo' do describe 'POST :id/issuable_type/:issuable_id/todo' do
context 'for an issue' do context 'for an issue' do
let_it_be(:issuable) do let_it_be(:issuable) do
create(:issue, :confidential, project: project_1) create(:issue, :confidential, project: project_1)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment