Commit fd52a93d authored by Rishabh Gupta's avatar Rishabh Gupta Committed by Martin Wortschack

Fix: Buttons text update with proper capitalization

parent ddb2c3ae
......@@ -5,7 +5,7 @@ export const NAME_MAX_LENGTH = 100;
export const i18n = {
FORM_TITLE: s__('CreateValueStreamForm|Create Value Stream'),
EDIT_FORM_TITLE: s__('CreateValueStreamForm|Edit Value Stream'),
EDIT_FORM_ACTION: s__('CreateValueStreamForm|Save Value Stream'),
EDIT_FORM_ACTION: s__('CreateValueStreamForm|Save value stream'),
FORM_CREATED: s__("CreateValueStreamForm|'%{name}' Value Stream created"),
FORM_EDITED: s__("CreateValueStreamForm|'%{name}' Value Stream saved"),
RECOVER_HIDDEN_STAGE: s__('CreateValueStreamForm|Recover hidden stage'),
......
......@@ -64,7 +64,7 @@ RSpec.describe 'Value stream analytics charts', :js do
def hide_vsa_stage(index = 0)
page.find_button(_('Edit')).click
page.find("[data-testid='stage-action-hide-#{index}']").click
page.find_button(_('Save Value Stream')).click
click_save_value_stream_button
wait_for_requests
end
......
......@@ -101,7 +101,7 @@ RSpec.describe 'Multiple value streams', :js do
page.all("[data-testid*='stage-action-move-down-']").first.click
page.all("[data-testid*='stage-action-move-up-']").last.click
page.find_button(_('Save Value Stream')).click
click_save_value_stream_button
wait_for_requests
expect(path_nav_stage_names_without_median).to eq(["Overview", "Plan", "Issue", "Code", "Test", "Review", "Cool custom stage - name 7", "Staging"])
......@@ -114,14 +114,14 @@ RSpec.describe 'Multiple value streams', :js do
it 'includes additional form fields' do
expect(page).to have_selector(extended_form_fields_selector)
expect(page).to have_button("Save Value Stream")
expect(page).to have_button("Save value stream")
end
it 'can update the value stream name' do
edited_name = "Edit new value stream"
fill_in 'create-value-stream-name', with: edited_name
page.find_button(_('Save Value Stream')).click
click_save_value_stream_button
wait_for_requests
expect(page).to have_text(_("'%{name}' Value Stream saved") % { name: edited_name })
......@@ -131,7 +131,7 @@ RSpec.describe 'Multiple value streams', :js do
add_custom_stage_to_form
add_custom_label_stage_to_form
page.find_button(_('Save Value Stream')).click
click_save_value_stream_button
wait_for_requests
expect(path_nav_elem).to have_text("Cool custom stage - name")
......@@ -146,7 +146,7 @@ RSpec.describe 'Multiple value streams', :js do
page.all("[data-testid*='stage-action-move-down-']").first.click
page.all("[data-testid*='stage-action-move-up-']").last.click
page.find_button(_('Save Value Stream')).click
click_save_value_stream_button
wait_for_requests
expect(path_nav_elem).not_to have_text("Cool custom stage - name")
......@@ -157,7 +157,7 @@ RSpec.describe 'Multiple value streams', :js do
click_action_button('hide', 4)
click_action_button('hide', 3)
click_button(_('Save Value Stream'))
click_save_value_stream_button
wait_for_requests
expect(page).to have_text(_("'%{name}' Value Stream saved") % { name: custom_value_stream_name })
......@@ -168,7 +168,7 @@ RSpec.describe 'Multiple value streams', :js do
click_button(_('Edit'))
click_action_button('restore', 0)
click_button(_('Save Value Stream'))
click_save_value_stream_button
wait_for_requests
expect(page).to have_text(_("'%{name}' Value Stream saved") % { name: custom_value_stream_name })
......
......@@ -247,8 +247,8 @@ describe('ValueStreamForm', () => {
expect(findPresetSelector().exists()).toBe(false);
});
it('sets the submit action text to "Save Value Stream"', () => {
expect(findBtn('actionPrimary').text).toBe('Save Value Stream');
it('sets the submit action text to "Save value stream"', () => {
expect(findBtn('actionPrimary').text).toBe('Save value stream');
});
it('does not display any hidden stages', () => {
......
......@@ -9829,7 +9829,7 @@ msgstr ""
msgid "CreateValueStreamForm|Restore stage"
msgstr ""
msgid "CreateValueStreamForm|Save Value Stream"
msgid "CreateValueStreamForm|Save value stream"
msgstr ""
msgid "CreateValueStreamForm|Select end event"
......@@ -29682,9 +29682,6 @@ msgstr ""
msgid "Save Changes"
msgstr ""
msgid "Save Value Stream"
msgstr ""
msgid "Save application"
msgstr ""
......
......@@ -63,6 +63,10 @@ module CycleAnalyticsHelpers
wait_for_requests
end
def click_save_value_stream_button
click_button(_('Save value stream'))
end
def create_custom_value_stream(custom_value_stream_name)
toggle_value_stream_dropdown
page.find_button(_('Create new Value Stream')).click
......
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