summaryrefslogtreecommitdiff
path: root/spec/views
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-10-25 09:10:14 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-10-25 09:10:14 +0000
commit919f0e86ba5997120d02601e648543d1682e8260 (patch)
treea19cd58b0d82a56f46e6c02535253461149b1c6b /spec/views
parent866b1f8ed7db9b29b1188ffcba309b92572f354b (diff)
downloadgitlab-ce-919f0e86ba5997120d02601e648543d1682e8260.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/views')
-rw-r--r--spec/views/events/event/_common.html.haml_spec.rb17
-rw-r--r--spec/views/layouts/header/_gitlab_version.html.haml_spec.rb8
2 files changed, 21 insertions, 4 deletions
diff --git a/spec/views/events/event/_common.html.haml_spec.rb b/spec/views/events/event/_common.html.haml_spec.rb
index ad8e5c2ef77..2160245fb63 100644
--- a/spec/views/events/event/_common.html.haml_spec.rb
+++ b/spec/views/events/event/_common.html.haml_spec.rb
@@ -18,9 +18,22 @@ RSpec.describe 'events/event/_common.html.haml' do
create(:event, :created, project: project, target: work_item, target_type: 'WorkItem', author: user)
end
- it 'renders the correct url' do
+ context 'when use_iid_in_work_items_path feature flag is disabled' do
+ before do
+ stub_feature_flags(use_iid_in_work_items_path: false)
+ render partial: 'events/event/common', locals: { event: event.present }
+ end
+
+ it 'renders the correct url' do
+ expect(rendered).to have_link(
+ work_item.reference_link_text, href: "/#{project.full_path}/-/work_items/#{work_item.id}"
+ )
+ end
+ end
+
+ it 'renders the correct url with iid' do
expect(rendered).to have_link(
- work_item.reference_link_text, href: "/#{project.full_path}/-/work_items/#{work_item.id}"
+ work_item.reference_link_text, href: "/#{project.full_path}/-/work_items/#{work_item.iid}?iid_path=true"
)
end
diff --git a/spec/views/layouts/header/_gitlab_version.html.haml_spec.rb b/spec/views/layouts/header/_gitlab_version.html.haml_spec.rb
index d6706038066..8be874ba401 100644
--- a/spec/views/layouts/header/_gitlab_version.html.haml_spec.rb
+++ b/spec/views/layouts/header/_gitlab_version.html.haml_spec.rb
@@ -21,12 +21,16 @@ RSpec.describe 'layouts/header/_gitlab_version' do
it 'renders the container with correct data-tracking attributes' do
expect(rendered).to have_selector(
- 'a[data-testid="gitlab-version-container"][data-track-action="click_version_help_dropdown"]'
+ 'a[data-testid="gitlab-version-container"][data-track-action="click_link"]'
+ )
+
+ expect(rendered).to have_selector(
+ 'a[data-testid="gitlab-version-container"][data-track-label="version_help_dropdown"]'
)
expect(rendered).to have_selector(
'a[data-testid="gitlab-version-container"]' \
- "[data-track-label=\"#{Gitlab.version_info.major}.#{Gitlab.version_info.minor}\"]"
+ "[data-track-property=\"#{Gitlab.version_info.major}.#{Gitlab.version_info.minor}\"]"
)
end
end