Commit 546e0a86 authored by Coung Ngo's avatar Coung Ngo Committed by Nikola Milojevic

Update sort name from Last updated to Updated date

Update sort name on list views such as issues,
merge requests, and epics

https://gitlab.com/gitlab-org/gitlab/-/issues/23775

Changelog: changed
parent b292b07c
......@@ -72,7 +72,7 @@ export const getSortOptions = (hasIssueWeightsFeature, hasBlockedIssuesFeature)
},
{
id: 3,
title: __('Last updated'),
title: __('Updated date'),
sortDirection: {
ascending: UPDATED_ASC,
descending: UPDATED_DESC,
......
......@@ -38,7 +38,7 @@ export const AvailableSortOptions = [
},
{
id: 2,
title: __('Last updated'),
title: __('Updated date'),
sortDirection: {
descending: 'updated_desc',
ascending: 'updated_asc',
......
......@@ -141,7 +141,7 @@ module SearchHelper
}
},
{
title: _('Last updated'),
title: _('Updated date'),
sortable: true,
sortParam: {
asc: 'updated_asc',
......
......@@ -59,7 +59,7 @@ module SortingTitlesValuesHelper
end
def sort_title_latest_activity
s_('SortOptions|Last updated')
_('Updated date')
end
def sort_title_milestone
......@@ -127,7 +127,7 @@ module SortingTitlesValuesHelper
end
def sort_title_recently_updated
s_('SortOptions|Last updated')
_('Updated date')
end
def sort_title_start_date_later
......
......@@ -22,7 +22,7 @@ export const AvailableSortOptions = [
},
{
id: 2,
title: __('Last updated'),
title: __('Updated date'),
sortDirection: {
descending: 'updated_desc',
ascending: 'updated_asc',
......
......@@ -38,7 +38,7 @@ export const AvailableSortOptions = [
},
{
id: 2,
title: __('Last updated'),
title: __('Updated date'),
sortDirection: {
descending: 'updated_desc',
ascending: 'updated_asc',
......
......@@ -94,14 +94,14 @@ RSpec.describe 'epics list', :js do
sort_options = find('ul.dropdown-menu-sort li').all('a').collect(&:text)
expect(sort_options[0]).to eq('Created date')
expect(sort_options[1]).to eq('Last updated')
expect(sort_options[1]).to eq('Updated date')
expect(sort_options[2]).to eq('Start date')
expect(sort_options[3]).to eq('Due date')
click_link 'Last updated'
click_link 'Updated date'
end
expect(page).to have_button('Last updated')
expect(page).to have_button('Updated date')
page.within('.content-wrapper .content') do
expect(find('.top-area')).to have_content('All 3')
......@@ -123,7 +123,7 @@ RSpec.describe 'epics list', :js do
visit group_epics_path(group)
expect(page).to have_button('Last updated')
expect(page).to have_button('Updated date')
end
it 'renders the epic detail correctly after clicking the link' do
......
......@@ -149,7 +149,7 @@ Object {
"ascending": "updated_asc",
"descending": "updated_desc",
},
"title": "Last updated",
"title": "Updated date",
},
],
"tabCounts": null,
......
......@@ -268,7 +268,7 @@ RSpec.describe SearchHelper do
}
mock_updated_sort = {
title: _('Last updated'),
title: _('Updated date'),
sortable: true,
sortParam: {
asc: 'updated_asc',
......
......@@ -33574,9 +33574,6 @@ msgstr ""
msgid "SortOptions|Last created"
msgstr ""
msgid "SortOptions|Last updated"
msgstr ""
msgid "SortOptions|Least popular"
msgstr ""
......@@ -38264,6 +38261,9 @@ msgstr ""
msgid "Updated %{updated_at} by %{updated_by}"
msgstr ""
msgid "Updated date"
msgstr ""
msgid "Updates"
msgstr ""
......
......@@ -168,7 +168,7 @@ RSpec.describe 'Dashboard > User filters projects' do
sorting_dropdown.click
['Last updated', 'Created date', 'Name', 'Stars'].each do |label|
['Updated date', 'Created date', 'Name', 'Stars'].each do |label|
expect(sorting_dropdown).to have_content(label)
end
end
......@@ -192,9 +192,9 @@ RSpec.describe 'Dashboard > User filters projects' do
end
end
context 'Sorting by Last updated' do
context 'Sorting by Updated date' do
it 'sorts the project list' do
select_dropdown_option '#filtered-search-sorting-dropdown', 'Last updated'
select_dropdown_option '#filtered-search-sorting-dropdown', 'Updated date'
expect_to_see_projects(desc_sorted_project_names)
......
......@@ -34,7 +34,7 @@ RSpec.describe 'Sort labels', :js do
expect(sort_options[1]).to eq('Name, descending')
expect(sort_options[2]).to eq('Last created')
expect(sort_options[3]).to eq('Oldest created')
expect(sort_options[4]).to eq('Last updated')
expect(sort_options[4]).to eq('Updated date')
expect(sort_options[5]).to eq('Oldest updated')
click_link 'Name, descending'
......
......@@ -54,10 +54,10 @@ RSpec.describe 'Sort Issuable List' do
context 'in the "merge requests / merged" tab', :js do
let(:issuable_type) { :merged_merge_request }
it 'is "last updated"' do
it 'is "updated date"' do
visit_merge_requests_with_state(project, 'merged')
expect(page).to have_button 'Last updated'
expect(page).to have_button 'Updated date'
expect(first_merge_request).to include(last_updated_issuable.title)
expect(last_merge_request).to include(first_updated_issuable.title)
end
......@@ -66,10 +66,10 @@ RSpec.describe 'Sort Issuable List' do
context 'in the "merge requests / closed" tab', :js do
let(:issuable_type) { :closed_merge_request }
it 'is "last updated"' do
it 'is "updated date"' do
visit_merge_requests_with_state(project, 'closed')
expect(page).to have_button 'Last updated'
expect(page).to have_button 'Updated date'
expect(first_merge_request).to include(last_updated_issuable.title)
expect(last_merge_request).to include(first_updated_issuable.title)
end
......@@ -95,7 +95,7 @@ RSpec.describe 'Sort Issuable List' do
visit_merge_requests_with_state(project, 'open')
click_button('Created date')
click_link('Last updated')
click_link('Updated date')
expect(first_merge_request).to include(last_updated_issuable.title)
expect(last_merge_request).to include(first_updated_issuable.title)
......@@ -152,10 +152,10 @@ RSpec.describe 'Sort Issuable List' do
context 'in the "issues / closed" tab', :js do
let(:issuable_type) { :closed_issue }
it 'is "last updated"' do
it 'is "updated date"' do
visit_issues_with_state(project, 'closed')
expect(page).to have_button 'Last updated'
expect(page).to have_button 'Updated date'
expect(first_issue).to include(last_updated_issuable.title)
expect(last_issue).to include(first_updated_issuable.title)
end
......@@ -195,7 +195,7 @@ RSpec.describe 'Sort Issuable List' do
visit_issues_with_state(project, 'opened')
click_button('Created date')
click_on('Last updated')
click_on('Updated date')
expect(page).to have_css('.issue:first-child', text: last_updated_issuable.title)
expect(page).to have_css('.issue:last-child', text: first_updated_issuable.title)
......
......@@ -117,7 +117,7 @@ RSpec.describe 'Branches' do
it 'sorts the branches by name', :js do
visit project_branches_filtered_path(project, state: 'all')
click_button "Last updated" # Open sorting dropdown
click_button "Updated date" # Open sorting dropdown
within '[data-testid="branches-dropdown"]' do
find('p', text: 'Name').click
end
......@@ -128,7 +128,7 @@ RSpec.describe 'Branches' do
it 'sorts the branches by oldest updated', :js do
visit project_branches_filtered_path(project, state: 'all')
click_button "Last updated" # Open sorting dropdown
click_button "Updated date" # Open sorting dropdown
within '[data-testid="branches-dropdown"]' do
find('p', text: 'Oldest updated').click
end
......
......@@ -34,7 +34,7 @@ RSpec.describe 'Sort labels', :js do
expect(sort_options[1]).to eq('Name, descending')
expect(sort_options[2]).to eq('Last created')
expect(sort_options[3]).to eq('Oldest created')
expect(sort_options[4]).to eq('Last updated')
expect(sort_options[4]).to eq('Updated date')
expect(sort_options[5]).to eq('Oldest updated')
click_link 'Name, descending'
......
......@@ -41,10 +41,10 @@ RSpec.describe 'User sorts projects and order persists' do
sign_in(user)
visit(explore_projects_path)
find('#sort-projects-dropdown').click
first(:link, 'Last updated').click
first(:link, 'Updated date').click
end
it_behaves_like "sort order persists across all views", "Last updated", "Last updated"
it_behaves_like "sort order persists across all views", 'Updated date', 'Updated date'
end
context 'from dashboard projects' do
......
......@@ -21,7 +21,7 @@ RSpec.describe "User sorts things" do
end
it "issues -> project home page -> issues" do
sort_option = "Last updated"
sort_option = 'Updated date'
visit(project_issues_path(project))
......@@ -34,7 +34,7 @@ RSpec.describe "User sorts things" do
end
it "issues -> merge requests" do
sort_option = "Last updated"
sort_option = 'Updated date'
visit(project_issues_path(project))
......@@ -46,7 +46,7 @@ RSpec.describe "User sorts things" do
end
it "merge requests -> dashboard merge requests" do
sort_option = "Last updated"
sort_option = 'Updated date'
visit(project_merge_requests_path(project))
......
......@@ -641,7 +641,7 @@ RSpec.describe SearchHelper do
}
},
{
title: _('Last updated'),
title: _('Updated date'),
sortable: true,
sortParam: {
asc: 'updated_asc',
......
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