Commit bcdc57d9 authored by Tristan Read's avatar Tristan Read Committed by Olena Horal-Koretska

Add hyphen to 'To-Do' for alert sidebar

parent 543a2e1a
...@@ -27,7 +27,7 @@ export default { ...@@ -27,7 +27,7 @@ export default {
<template> <template>
<div class="block gl-display-flex gl-justify-content-space-between"> <div class="block gl-display-flex gl-justify-content-space-between">
<span class="issuable-header-text hide-collapsed"> <span class="issuable-header-text hide-collapsed">
{{ __('To Do') }} {{ __('To-Do') }}
</span> </span>
<sidebar-todo <sidebar-todo
v-if="!sidebarCollapsed" v-if="!sidebarCollapsed"
......
...@@ -7,7 +7,7 @@ import createAlertTodo from '../../graphql/mutations/alert_todo_create.graphql'; ...@@ -7,7 +7,7 @@ import createAlertTodo from '../../graphql/mutations/alert_todo_create.graphql';
export default { export default {
i18n: { i18n: {
UPDATE_ALERT_TODO_ERROR: s__( UPDATE_ALERT_TODO_ERROR: s__(
'AlertManagement|There was an error while updating the To Do of the alert.', 'AlertManagement|There was an error while updating the To-Do of the alert.',
), ),
}, },
components: { components: {
......
...@@ -6,7 +6,7 @@ import tooltip from '~/vue_shared/directives/tooltip'; ...@@ -6,7 +6,7 @@ import tooltip from '~/vue_shared/directives/tooltip';
import Icon from '~/vue_shared/components/icon.vue'; import Icon from '~/vue_shared/components/icon.vue';
const MARK_TEXT = __('Mark as done'); const MARK_TEXT = __('Mark as done');
const TODO_TEXT = __('Add a To Do'); const TODO_TEXT = __('Add a To-Do');
export default { export default {
directives: { directives: {
......
...@@ -16,7 +16,7 @@ RSpec.describe 'Manually create a todo item from epic', :js do ...@@ -16,7 +16,7 @@ RSpec.describe 'Manually create a todo item from epic', :js do
it 'creates todo when clicking button' do it 'creates todo when clicking button' do
page.within '.issuable-sidebar' do page.within '.issuable-sidebar' do
click_button 'Add a To Do' click_button 'Add a To-Do'
expect(page).to have_content 'Mark as done' expect(page).to have_content 'Mark as done'
end end
...@@ -28,7 +28,7 @@ RSpec.describe 'Manually create a todo item from epic', :js do ...@@ -28,7 +28,7 @@ RSpec.describe 'Manually create a todo item from epic', :js do
it 'marks a todo as done' do it 'marks a todo as done' do
page.within '.issuable-sidebar' do page.within '.issuable-sidebar' do
click_button 'Add a To Do' click_button 'Add a To-Do'
end end
expect(page).to have_selector('.todos-count', visible: true) expect(page).to have_selector('.todos-count', visible: true)
......
...@@ -1402,6 +1402,9 @@ msgstr "" ...@@ -1402,6 +1402,9 @@ msgstr ""
msgid "Add a To Do" msgid "Add a To Do"
msgstr "" msgstr ""
msgid "Add a To-Do"
msgstr ""
msgid "Add a bullet list" msgid "Add a bullet list"
msgstr "" msgstr ""
...@@ -2118,7 +2121,7 @@ msgstr "" ...@@ -2118,7 +2121,7 @@ msgstr ""
msgid "AlertManagement|There was an error displaying the alerts. Confirm your endpoint's configuration details to ensure alerts appear." msgid "AlertManagement|There was an error displaying the alerts. Confirm your endpoint's configuration details to ensure alerts appear."
msgstr "" msgstr ""
msgid "AlertManagement|There was an error while updating the To Do of the alert." msgid "AlertManagement|There was an error while updating the To-Do of the alert."
msgstr "" msgstr ""
msgid "AlertManagement|There was an error while updating the assignee(s) list. Please try again." msgid "AlertManagement|There was an error while updating the assignee(s) list. Please try again."
...@@ -24945,6 +24948,9 @@ msgstr "" ...@@ -24945,6 +24948,9 @@ msgstr ""
msgid "To widen your search, change or remove filters." msgid "To widen your search, change or remove filters."
msgstr "" msgstr ""
msgid "To-Do"
msgstr ""
msgid "To-Do List" msgid "To-Do List"
msgstr "" msgstr ""
......
...@@ -52,9 +52,9 @@ describe('Alert Details Sidebar To Do', () => { ...@@ -52,9 +52,9 @@ describe('Alert Details Sidebar To Do', () => {
}); });
}); });
it('renders a button for adding a To Do', () => { it('renders a button for adding a To-Do', () => {
return wrapper.vm.$nextTick().then(() => { return wrapper.vm.$nextTick().then(() => {
expect(wrapper.find('[data-testid="alert-todo-button"]').text()).toBe('Add a To Do'); expect(wrapper.find('[data-testid="alert-todo-button"]').text()).toBe('Add a To-Do');
}); });
}); });
......
...@@ -36,7 +36,7 @@ describe('SidebarTodo', () => { ...@@ -36,7 +36,7 @@ describe('SidebarTodo', () => {
it.each` it.each`
isTodo | iconClass | label | icon isTodo | iconClass | label | icon
${false} | ${''} | ${'Add a To Do'} | ${'todo-add'} ${false} | ${''} | ${'Add a To-Do'} | ${'todo-add'}
${true} | ${'todo-undone'} | ${'Mark as done'} | ${'todo-done'} ${true} | ${'todo-undone'} | ${'Mark as done'} | ${'todo-done'}
`( `(
'renders proper button when `isTodo` prop is `$isTodo`', 'renders proper button when `isTodo` prop is `$isTodo`',
......
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