Commit e3ba2b1d authored by Enrique Alcántara's avatar Enrique Alcántara

Merge branch 'nfriend-add-release-og-description' into 'master'

Add og:description attribute to individual "Release" page

Closes #215389

See merge request gitlab-org/gitlab!42889
parents 5eeb1b78 e274ae44
- add_to_breadcrumbs _("Releases"), project_releases_path(@project)
- page_title @release.name
- page_description @release.description_html
#js-show-release-page{ data: { project_id: @project.id, tag_name: @release.tag } }
---
title: Add og:description meta tag to individual "Release" page
merge_request: 42889
author:
type: added
......@@ -4,17 +4,25 @@ require 'spec_helper'
RSpec.describe 'User views Release', :js do
let(:project) { create(:project, :repository) }
let(:release) { create(:release, project: project, name: 'The first release' ) }
let(:user) { create(:user) }
let(:release) do
create(:release,
project: project,
name: 'The first release',
description: '**Lorem** _ipsum_ dolor sit [amet](https://example.com)')
end
before do
project.add_developer(user)
gitlab_sign_in(user)
sign_in(user)
visit project_release_path(project, release)
end
it_behaves_like 'page meta description', 'Lorem ipsum dolor sit amet'
it 'renders the breadcrumbs' do
within('.breadcrumbs') do
expect(page).to have_content("#{project.creator.name} #{project.name} Releases #{release.name}")
......@@ -31,7 +39,7 @@ RSpec.describe 'User views Release', :js do
expect(page).to have_content(release.name)
expect(page).to have_content(release.tag)
expect(page).to have_content(release.commit.short_id)
expect(page).to have_content(release.description)
expect(page).to have_content('Lorem ipsum dolor sit amet')
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