summaryrefslogtreecommitdiff
path: root/spec/frontend/fixtures
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-08-19 09:08:42 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-08-19 09:08:42 +0000
commitb76ae638462ab0f673e5915986070518dd3f9ad3 (patch)
treebdab0533383b52873be0ec0eb4d3c66598ff8b91 /spec/frontend/fixtures
parent434373eabe7b4be9593d18a585fb763f1e5f1a6f (diff)
downloadgitlab-ce-b76ae638462ab0f673e5915986070518dd3f9ad3.tar.gz
Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42
Diffstat (limited to 'spec/frontend/fixtures')
-rw-r--r--spec/frontend/fixtures/analytics.rb71
-rw-r--r--spec/frontend/fixtures/api_markdown.rb9
-rw-r--r--spec/frontend/fixtures/api_markdown.yml31
-rw-r--r--spec/frontend/fixtures/startup_css.rb24
4 files changed, 108 insertions, 27 deletions
diff --git a/spec/frontend/fixtures/analytics.rb b/spec/frontend/fixtures/analytics.rb
new file mode 100644
index 00000000000..6d106dce166
--- /dev/null
+++ b/spec/frontend/fixtures/analytics.rb
@@ -0,0 +1,71 @@
+# frozen_string_literal: true
+require 'spec_helper'
+
+RSpec.describe 'Analytics (JavaScript fixtures)', :sidekiq_inline do
+ include_context 'Analytics fixtures shared context'
+
+ let_it_be(:value_stream_id) { 'default' }
+
+ before(:all) do
+ clean_frontend_fixtures('projects/analytics/value_stream_analytics/')
+ end
+
+ before do
+ update_metrics
+ create_deployment
+ end
+
+ describe Projects::Analytics::CycleAnalytics::StagesController, type: :controller do
+ render_views
+
+ let(:params) { { namespace_id: group, project_id: project, value_stream_id: value_stream_id } }
+
+ before do
+ project.add_developer(user)
+
+ sign_in(user)
+ end
+
+ it 'projects/analytics/value_stream_analytics/stages' do
+ get(:index, params: params, format: :json)
+
+ expect(response).to be_successful
+ end
+ end
+
+ describe Projects::CycleAnalytics::EventsController, type: :controller do
+ render_views
+ let(:params) { { namespace_id: group, project_id: project, value_stream_id: value_stream_id } }
+
+ before do
+ project.add_developer(user)
+
+ sign_in(user)
+ end
+
+ Gitlab::Analytics::CycleAnalytics::DefaultStages.all.each do |stage|
+ it "projects/analytics/value_stream_analytics/events/#{stage[:name]}" do
+ get(stage[:name], params: params, format: :json)
+
+ expect(response).to be_successful
+ end
+ end
+ end
+
+ describe Projects::Analytics::CycleAnalytics::SummaryController, type: :controller do
+ render_views
+ let(:params) { { namespace_id: group, project_id: project, value_stream_id: value_stream_id } }
+
+ before do
+ project.add_developer(user)
+
+ sign_in(user)
+ end
+
+ it "projects/analytics/value_stream_analytics/summary" do
+ get(:show, params: params, format: :json)
+
+ expect(response).to be_successful
+ end
+ end
+end
diff --git a/spec/frontend/fixtures/api_markdown.rb b/spec/frontend/fixtures/api_markdown.rb
index 94db262e4fd..cb9a116f293 100644
--- a/spec/frontend/fixtures/api_markdown.rb
+++ b/spec/frontend/fixtures/api_markdown.rb
@@ -7,12 +7,17 @@ RSpec.describe API::MergeRequests, '(JavaScript fixtures)', type: :request do
include WikiHelpers
include JavaScriptFixturesHelpers
- let_it_be(:user) { create(:user) }
+ let_it_be(:user) { create(:user, username: 'gitlab') }
let_it_be(:group) { create(:group, :public) }
let_it_be(:project) { create(:project, :public, :repository, group: group) }
- let_it_be(:project_wiki) { create(:project_wiki, user: user) }
+ let_it_be(:label) { create(:label, project: project, title: 'bug') }
+ let_it_be(:milestone) { create(:milestone, project: project, title: '1.1') }
+ let_it_be(:issue) { create(:issue, project: project) }
+ let_it_be(:merge_request) { create(:merge_request, source_project: project) }
+
+ let_it_be(:project_wiki) { create(:project_wiki, project: project, user: user) }
let(:project_wiki_page) { create(:wiki_page, wiki: project_wiki) }
diff --git a/spec/frontend/fixtures/api_markdown.yml b/spec/frontend/fixtures/api_markdown.yml
index 8d8c9a1d902..b581aac6aee 100644
--- a/spec/frontend/fixtures/api_markdown.yml
+++ b/spec/frontend/fixtures/api_markdown.yml
@@ -8,6 +8,14 @@
markdown: '_emphasized text_'
- name: inline_code
markdown: '`code`'
+- name: inline_diff
+ markdown: |-
+ * {-deleted-}
+ * {+added+}
+- name: subscript
+ markdown: H<sub>2</sub>O
+- name: superscript
+ markdown: 2<sup>8</sup> = 256
- name: strike
markdown: '~~del~~'
- name: horizontal_rule
@@ -68,6 +76,22 @@
1. list item 1
2. list item 2
3. list item 3
+- name: task_list
+ markdown: |-
+ * [x] hello
+ * [x] world
+ * [ ] example
+ * [ ] of nested
+ * [x] task list
+ * [ ] items
+- name: ordered_task_list
+ markdown: |-
+ 1. [x] hello
+ 2. [x] world
+ 3. [ ] example
+ 1. [ ] of nested
+ 1. [x] task list
+ 2. [ ] items
- name: image
markdown: '![alt text](https://gitlab.com/logo.png)'
- name: hard_break
@@ -86,4 +110,9 @@
|--------|------------|----------|
| cell | cell | cell |
| cell | cell | cell |
-
+- name: emoji
+ markdown: ':sparkles: :heart: :100:'
+- name: reference
+ context: project_wiki
+ markdown: |-
+ Hi @gitlab - thank you for reporting this ~bug (#1) we hope to fix it in %1.1 as part of !1
diff --git a/spec/frontend/fixtures/startup_css.rb b/spec/frontend/fixtures/startup_css.rb
index 003f7b768dd..be2ead756cf 100644
--- a/spec/frontend/fixtures/startup_css.rb
+++ b/spec/frontend/fixtures/startup_css.rb
@@ -10,8 +10,6 @@ RSpec.describe 'Startup CSS fixtures', type: :controller do
render_views
before(:all) do
- stub_feature_flags(combined_menu: true)
- stub_feature_flags(sidebar_refactor: true)
clean_frontend_fixtures('startup_css/')
end
@@ -23,17 +21,6 @@ RSpec.describe 'Startup CSS fixtures', type: :controller do
sign_in(user)
end
- it "startup_css/project-#{type}-legacy-menu.html" do
- stub_feature_flags(combined_menu: false)
-
- get :show, params: {
- namespace_id: project.namespace.to_param,
- id: project
- }
-
- expect(response).to be_successful
- end
-
it "startup_css/project-#{type}.html" do
get :show, params: {
namespace_id: project.namespace.to_param,
@@ -43,17 +30,6 @@ RSpec.describe 'Startup CSS fixtures', type: :controller do
expect(response).to be_successful
end
- it "startup_css/project-#{type}-legacy-sidebar.html" do
- stub_feature_flags(sidebar_refactor: false)
-
- get :show, params: {
- namespace_id: project.namespace.to_param,
- id: project
- }
-
- expect(response).to be_successful
- end
-
it "startup_css/project-#{type}-signed-out.html" do
sign_out(user)