Commit 3df171c3 authored by Jay Swain's avatar Jay Swain

BUGFIX - translate 'core' => 'free' for "whats new"

While QA-ing the "whats new" feature on staging, I noticed that there
was a bug in translating "free". I've updated the logic so it correctly
translates "core" to "free".

I also titlecased the package names in the data yaml files. As well as
swapped out "All" for a list of package names.

The issue found here would be resolved once the file linter is merged:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/48851

But as that is still under development I figured a small MR to fix the
problem is best for now.
parent b202dde7
......@@ -4,7 +4,7 @@ module Gitlab
module WhatsNew
class ItemPresenter
DICTIONARY = {
free: 'Free',
core: 'Free',
starter: 'Bronze',
premium: 'Silver',
ultimate: 'Gold'
......
......@@ -7,7 +7,7 @@
stage: Plan
self-managed: true
gitlab-com: true
packages: [Ultimate, Gold]
packages: [Ultimate]
url: https://docs.gitlab.com/ee/user/project/requirements/index.html
image_url: https://docs.gitlab.com/ee/user/project/requirements/img/requirements_list_v13_5.png
published_at: 2020-04-22
......@@ -20,7 +20,7 @@
stage: Release
self-managed: true
gitlab-com: true
packages: [All]
packages: [Core, Starter, Premium, Ultimate]
url: https://docs.gitlab.com/ee/ci/examples/authenticating-with-hashicorp-vault/index.html
image_url: https://about.gitlab.com/images/12_10/jwt-vault-1.png
published_at: 2020-04-22
......@@ -35,7 +35,7 @@
stage: Plan
self-managed: true
gitlab-com: true
packages: [Ultimate, Gold]
packages: [Ultimate]
url: https://docs.gitlab.com/ee/user/project/issues/index.html#health-status
image_url: https://about.gitlab.com/images/12_10/epic-health-status.png
published_at: 2020-04-22
......@@ -48,7 +48,7 @@
stage: Plan
self-managed: true
gitlab-com: true
packages: [All]
packages: [Core, Starter, Premium, Ultimate]
url: https://docs.gitlab.com/ee/user/project/import/jira.html
image_url: https://about.gitlab.com/images/12_10/jira-importer.png
published_at: 2020-04-22
......
......@@ -20,7 +20,7 @@
stage: Release
self-managed: true
gitlab-com: true
packages: [All]
packages: [Core, Starter, Premium, Ultimate]
url: https://docs.gitlab.com/ee/topics/autodevops/index.html#aws-ecs
image_url: https://docs.gitlab.com/ee/ci/img/ecs_dashboard_v12_9.png
published_at: 2020-05-22
......@@ -33,7 +33,7 @@
stage: Plan
self-managed: true
gitlab-com: true
packages: [Ultimate, Gold]
packages: [Ultimate]
url: https://docs.gitlab.com/ee/user/group/roadmap/
image_url: https://about.gitlab.com/images/13_0/Expand-Epic-Hierarchy-Roadmap_roadmap.png
published_at: 2020-05-22
......@@ -46,7 +46,7 @@
stage: Create
self-managed: true
gitlab-com: true
packages: [All]
packages: [Core, Starter, Premium, Ultimate]
url: https://docs.gitlab.com/ee/user/snippets.html#versioned-snippets
image_url: https://about.gitlab.com/images/13_0/phikai-versioned-snippets.png
published_at: 2020-05-22
......@@ -59,7 +59,7 @@
stage: Create
self-managed: true
gitlab-com: true
packages: [All]
packages: [Core, Starter, Premium, Ultimate]
url: https://docs.gitlab.com/ee/user/project/web_ide/#themes
image_url: https://about.gitlab.com/images/13_0/phikai-web-ide-dark-theme.png
published_at: 2020-05-22
......
......@@ -7,7 +7,7 @@
stage: Monitor
self-managed: true
gitlab-com: true
packages: [All]
packages: [Core, Starter, Premium, Ultimate]
url: https://docs.gitlab.com/ee/user/project/operations/alert_management.html
image_url: https://about.gitlab.com/images/13_1/alert_management.png
published_at: 2020-06-22
......@@ -20,7 +20,7 @@
stage: Verify
self-managed: true
gitlab-com: true
packages: [All]
packages: [Core, Starter, Premium, Ultimate]
url: https://docs.gitlab.com/ee/user/project/merge_requests/accessibility_testing.html#accessibility-merge-request-widget
image_url: https://about.gitlab.com/images/13_1/a11y-merge-request-widget.png
published_at: 2020-06-22
......@@ -31,7 +31,7 @@
stage: Create
self-managed: true
gitlab-com: true
packages: [All]
packages: [Core, Starter, Premium, Ultimate]
url: https://docs.gitlab.com/ee/user/project/issues/design_management.html#resolve-design-threads
image_url: https://about.gitlab.com/images/13_1/resolve-design-comment.gif
published_at: 2020-06-22
......@@ -42,7 +42,7 @@
stage: Create
self-managed: true
gitlab-com: true
packages: [All]
packages: [Core, Starter, Premium, Ultimate]
url: https://docs.gitlab.com/ee/user/discussions/index.html#merge-request-reviews
image_url: https://about.gitlab.com/images/13_1/batch_comments.png
published_at: 2020-06-22
......
......@@ -20,7 +20,7 @@
stage: Defend
self-managed: true
gitlab-com: true
packages: [All]
packages: [Core, Starter, Premium, Ultimate]
url: https://www.youtube.com/watch?v=WxBzBz76FxU&feature=youtu.be
image_url: https://img.youtube.com/vi/WxBzBz76FxU/hqdefault.jpg
published_at: 2020-07-22
......@@ -33,7 +33,7 @@
stage: Create
self-managed: false
gitlab-com: true
packages: [All]
packages: [Core, Starter, Premium, Ultimate]
url: https://docs.gitlab.com/ee/user/project/issues/design_management.html#gitlab-figma-plugin
image_url: https://about.gitlab.com/images/13_2/figma-plugin.png
published_at: 2020-07-22
......@@ -48,7 +48,7 @@
stage: Monitor
self-managed: true
gitlab-com: true
packages: [All]
packages: [Core, Starter, Premium, Ultimate]
url: https://docs.gitlab.com/ee/user/project/clusters/#visualizing-cluster-health
image_url: https://about.gitlab.com/images/13_2/k8s_cluster_monitoring.png
published_at: 2020-07-22
......
......@@ -18,7 +18,7 @@
stage: Verify
self-managed: true
gitlab-com: true
packages: [All]
packages: [Core, Starter, Premium, Ultimate]
url: https://docs.gitlab.com/ee/ci/yaml/#parallel-matrix-jobs
image_url: https://about.gitlab.com/images/13_3/cartesian-matrix.png
published_at: 2020-08-22
......@@ -46,7 +46,7 @@
stage: Secure
self-managed: true
gitlab-com: true
packages: [All]
packages: [Core, Starter, Premium, Ultimate]
url: https://docs.gitlab.com/ee/user/application_security/sast/#making-sast-analyzers-available-to-all-gitlab-tiers
image_url: https://about.gitlab.com/images/13_3/sast-gitlab-languages.png
published_at: 2020-08-22
......
......@@ -76,7 +76,7 @@
stage: Enablement
self-managed: true
gitlab-com: true
packages: [core, starter, premium, ultimate]
packages: [Core, Starter, Premium, Ultimate]
url: https://docs.gitlab.com/ee/user/search/#autocomplete-suggestions
image_url: https://about.gitlab.com/images/13_4/enablement_global_search.gif
published_at: 2020-09-22
......
......@@ -65,7 +65,7 @@
stage: Release
self-managed: true
gitlab-com: true
packages: [core, starter, premium, ultimate]
packages: [Core, Starter, Premium, Ultimate]
url: https://docs.gitlab.com/ee/operations/feature_flags.html#percent-rollout
image_url: https://about.gitlab.com/images/13_5/percent-rollout.png
published_at: 2020-10-22
......@@ -78,7 +78,7 @@
stage: Secure
self-managed: true
gitlab-com: true
packages: [core, starter, premium, ultimate]
packages: [Core, Starter, Premium, Ultimate]
url: https://docs.gitlab.com/ee/user/application_security/sast/#supported-languages-and-frameworks
image_url: https://about.gitlab.com/images/13_5/sast-gitlab-mobile.png
published_at: 2020-10-22
......
......@@ -9,7 +9,7 @@
stage: Release
self-managed: true
gitlab-com: true
packages: [core, starter, premium, ultimate]
packages: [Core, Starter, Premium, Ultimate]
url: https://docs.gitlab.com/ee/ci/cloud_deployment/#custom-build-job-for-auto-devops
image_url: https://img.youtube.com/vi/4B-qSwKnacA/hqdefault.jpg
published_at: 2020-11-22
......@@ -22,7 +22,7 @@
stage: Verify
self-managed: true
gitlab-com: true
packages: [core, starter, premium, ultimate]
packages: [Core, Starter, Premium, Ultimate]
url: https://docs.gitlab.com/ee/user/project/merge_requests/code_quality.html#code-quality-widget
image_url: https://about.gitlab.com/images/13_6/code_quality_severity.png
published_at: 2020-11-22
......@@ -39,7 +39,7 @@
stage: Verify
self-managed: true
gitlab-com: true
packages: [premium, ultimate]
packages: [Premium, Ultimate]
url: https://docs.gitlab.com/ee/user/group/repositories_analytics/index.html#latest-project-test-coverage-list
image_url: https://about.gitlab.com/images/13_6/display_selected_coverage_projects_example.png
published_at: 2020-11-22
......@@ -58,7 +58,7 @@
stage: Create
self-managed: true
gitlab-com: true
packages: [core, starter, premium, ultimate]
packages: [Core, Starter, Premium, Ultimate]
url: https://docs.gitlab.com/ee/user/admin_area/settings/project_integration_management.html
image_url: https://about.gitlab.com/images/13_6/project-integration-inheriting-settings.png
published_at: 2020-11-22
......@@ -75,7 +75,7 @@
stage: Plan
self-managed: true
gitlab-com: true
packages: [starter, premium, ultimate]
packages: [Starter, Premium, Ultimate]
url: https://docs.gitlab.com/ee/user/project/milestones/burndown_and_burnup_charts.html#burnup-charts
image_url: https://about.gitlab.com/images/13_6/burnup-chart.png
published_at: 2020-11-22
......
......@@ -4,7 +4,7 @@ require 'spec_helper'
RSpec.describe Gitlab::WhatsNew::ItemPresenter do
let(:present) { Gitlab::WhatsNew::ItemPresenter.present(item) }
let(:item) { { "packages" => %w(Premium Ultimate) } }
let(:item) { { "packages" => %w(Core Starter Premium Ultimate) } }
let(:gitlab_com) { true }
before do
......@@ -14,7 +14,7 @@ RSpec.describe Gitlab::WhatsNew::ItemPresenter do
describe '.present' do
context 'when on Gitlab.com' do
it 'transforms package names to gitlab.com friendly package names' do
expect(present).to eq({ "packages" => %w(Silver Gold) })
expect(present).to eq({ "packages" => %w(Free Bronze Silver Gold) })
end
end
......@@ -22,7 +22,7 @@ RSpec.describe Gitlab::WhatsNew::ItemPresenter do
let(:gitlab_com) { false }
it 'does not transform package names' do
expect(present).to eq({ "packages" => %w(Premium Ultimate) })
expect(present).to eq({ "packages" => %w(Core Starter Premium Ultimate) })
end
end
end
......
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