Commit 62fe29f4 authored by Donald Cook's avatar Donald Cook Committed by Simon Knox

Switched title to h1 on issues

Changelog: changed
parent 4493a0cf
...@@ -68,7 +68,7 @@ export default { ...@@ -68,7 +68,7 @@ export default {
<template> <template>
<div class="title-container"> <div class="title-container">
<h2 <h1
v-safe-html="titleHtml" v-safe-html="titleHtml"
:class="{ :class="{
'issue-realtime-pre-pulse': preAnimation, 'issue-realtime-pre-pulse': preAnimation,
...@@ -76,7 +76,7 @@ export default { ...@@ -76,7 +76,7 @@ export default {
}" }"
class="title qa-title" class="title qa-title"
dir="auto" dir="auto"
></h2> ></h1>
<gl-button <gl-button
v-if="showInlineEditButton && canUpdate" v-if="showInlineEditButton && canUpdate"
v-gl-tooltip.bottom v-gl-tooltip.bottom
......
...@@ -58,7 +58,12 @@ export default { ...@@ -58,7 +58,12 @@ export default {
<template> <template>
<div> <div>
<div class="title-container"> <div class="title-container">
<h2 v-safe-html="issuable.titleHtml || issuable.title" class="title qa-title" dir="auto"></h2> <h1
v-safe-html="issuable.titleHtml || issuable.title"
class="title qa-title"
dir="auto"
data-testid="title"
></h1>
<gl-button <gl-button
v-if="enableEdit" v-if="enableEdit"
v-gl-tooltip.bottom v-gl-tooltip.bottom
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
.detail-page-description.content-block .detail-page-description.content-block
#js-issuable-app{ data: { initial: issuable_initial_data(issuable).to_json, full_path: @project.full_path } } #js-issuable-app{ data: { initial: issuable_initial_data(issuable).to_json, full_path: @project.full_path } }
.title-container .title-container
%h2.title= markdown_field(issuable, :title) %h1.title= markdown_field(issuable, :title)
- if issuable.description.present? - if issuable.description.present?
.description .description
.md= markdown_field(issuable, :description) .md= markdown_field(issuable, :description)
......
...@@ -55,7 +55,7 @@ RSpec.describe 'Update Epic', :js do ...@@ -55,7 +55,7 @@ RSpec.describe 'Update Epic', :js do
click_button 'Save changes' click_button 'Save changes'
expect(find('.issuable-details h2.title')).to have_content('New epic title') expect(find('.issuable-details h1.title')).to have_content('New epic title')
expect(find('.issuable-details .description')).to have_content('New epic description') expect(find('.issuable-details .description')).to have_content('New epic description')
end end
...@@ -89,7 +89,7 @@ RSpec.describe 'Update Epic', :js do ...@@ -89,7 +89,7 @@ RSpec.describe 'Update Epic', :js do
click_button 'Save changes' click_button 'Save changes'
expect(find('.issuable-details h2.title')).to have_content('title') expect(find('.issuable-details h1.title')).to have_content('title')
visit dashboard_todos_path visit dashboard_todos_path
......
...@@ -21,7 +21,7 @@ RSpec.describe 'Incident details', :js do ...@@ -21,7 +21,7 @@ RSpec.describe 'Incident details', :js do
context 'when a developer+ displays the incident' do context 'when a developer+ displays the incident' do
it 'shows the incident' do it 'shows the incident' do
page.within('.issuable-details') do page.within('.issuable-details') do
expect(find('h2')).to have_content(incident.title) expect(find('h1')).to have_content(incident.title)
end end
end end
...@@ -33,7 +33,7 @@ RSpec.describe 'Incident details', :js do ...@@ -33,7 +33,7 @@ RSpec.describe 'Incident details', :js do
page.within('.issuable-details') do page.within('.issuable-details') do
incident_tabs = find('[data-testid="incident-tabs"]') incident_tabs = find('[data-testid="incident-tabs"]')
expect(find('h2')).to have_content(incident.title) expect(find('h1')).to have_content(incident.title)
expect(incident_tabs).to have_content('Summary') expect(incident_tabs).to have_content('Summary')
expect(incident_tabs).to have_content(incident.description) expect(incident_tabs).to have_content(incident.description)
end end
......
...@@ -38,7 +38,7 @@ RSpec.describe 'Incident Detail', :js do ...@@ -38,7 +38,7 @@ RSpec.describe 'Incident Detail', :js do
incident_tabs = find('[data-testid="incident-tabs"]') incident_tabs = find('[data-testid="incident-tabs"]')
aggregate_failures 'shows title and Summary tab' do aggregate_failures 'shows title and Summary tab' do
expect(find('h2')).to have_content(incident.title) expect(find('h1')).to have_content(incident.title)
expect(incident_tabs).to have_content('Summary') expect(incident_tabs).to have_content('Summary')
expect(incident_tabs).to have_content(incident.description) expect(incident_tabs).to have_content(incident.description)
end end
......
...@@ -17,7 +17,7 @@ RSpec.describe 'Issue Detail', :js do ...@@ -17,7 +17,7 @@ RSpec.describe 'Issue Detail', :js do
it 'shows the issue' do it 'shows the issue' do
page.within('.issuable-details') do page.within('.issuable-details') do
expect(find('h2')).to have_content(issue.title) expect(find('h1')).to have_content(issue.title)
end end
end end
end end
...@@ -85,7 +85,7 @@ RSpec.describe 'Issue Detail', :js do ...@@ -85,7 +85,7 @@ RSpec.describe 'Issue Detail', :js do
it 'shows the issue' do it 'shows the issue' do
page.within('.issuable-details') do page.within('.issuable-details') do
expect(find('h2')).to have_content(issue.reload.title) expect(find('h1')).to have_content(issue.reload.title)
end end
end end
end end
......
...@@ -66,7 +66,7 @@ RSpec.describe 'New issue', :js do ...@@ -66,7 +66,7 @@ RSpec.describe 'New issue', :js do
it 'allows issue creation' do it 'allows issue creation' do
click_button 'Create issue' click_button 'Create issue'
expect(page.find('.issue-details h2.title')).to have_content('issue title') expect(page.find('.issue-details h1.title')).to have_content('issue title')
expect(page.find('.issue-details .description')).to have_content('issue description') expect(page.find('.issue-details .description')).to have_content('issue description')
end end
...@@ -111,7 +111,7 @@ RSpec.describe 'New issue', :js do ...@@ -111,7 +111,7 @@ RSpec.describe 'New issue', :js do
click_button 'Create issue' click_button 'Create issue'
expect(page.find('.issue-details h2.title')).to have_content('issue title') expect(page.find('.issue-details h1.title')).to have_content('issue title')
expect(page.find('.issue-details .description')).to have_content('issue description') expect(page.find('.issue-details .description')).to have_content('issue description')
end end
end end
...@@ -126,7 +126,7 @@ RSpec.describe 'New issue', :js do ...@@ -126,7 +126,7 @@ RSpec.describe 'New issue', :js do
click_button 'Create issue' click_button 'Create issue'
expect(page).not_to have_css('.recaptcha') expect(page).not_to have_css('.recaptcha')
expect(page.find('.issue-details h2.title')).to have_content('issue title') expect(page.find('.issue-details h1.title')).to have_content('issue title')
expect(page.find('.issue-details .description')).to have_content('issue description') expect(page.find('.issue-details .description')).to have_content('issue description')
end end
...@@ -152,7 +152,7 @@ RSpec.describe 'New issue', :js do ...@@ -152,7 +152,7 @@ RSpec.describe 'New issue', :js do
click_button 'Create issue' click_button 'Create issue'
expect(page).not_to have_css('.recaptcha') expect(page).not_to have_css('.recaptcha')
expect(page.find('.issue-details h2.title')).to have_content('issue title') expect(page.find('.issue-details h1.title')).to have_content('issue title')
expect(page.find('.issue-details .description')).to have_content('issue description') expect(page.find('.issue-details .description')).to have_content('issue description')
end end
...@@ -181,7 +181,7 @@ RSpec.describe 'New issue', :js do ...@@ -181,7 +181,7 @@ RSpec.describe 'New issue', :js do
click_button 'Create issue' click_button 'Create issue'
expect(page.find('.issue-details h2.title')).to have_content('issue title') expect(page.find('.issue-details h1.title')).to have_content('issue title')
expect(page.find('.issue-details .description')).to have_content('issue description') expect(page.find('.issue-details .description')).to have_content('issue description')
end end
end end
......
...@@ -160,7 +160,7 @@ RSpec.describe 'Labels Hierarchy', :js do ...@@ -160,7 +160,7 @@ RSpec.describe 'Labels Hierarchy', :js do
find('.btn-confirm').click find('.btn-confirm').click
expect(page.find('.issue-details h2.title')).to have_content('new created issue') expect(page.find('.issue-details h1.title')).to have_content('new created issue')
expect(page).to have_selector('span.gl-label-text', text: grandparent_group_label.title) expect(page).to have_selector('span.gl-label-text', text: grandparent_group_label.title)
expect(page).to have_selector('span.gl-label-text', text: parent_group_label.title) expect(page).to have_selector('span.gl-label-text', text: parent_group_label.title)
expect(page).to have_selector('span.gl-label-text', text: project_label_1.title) expect(page).to have_selector('span.gl-label-text', text: project_label_1.title)
......
...@@ -66,10 +66,12 @@ describe('IssuableTitle', () => { ...@@ -66,10 +66,12 @@ describe('IssuableTitle', () => {
}); });
await nextTick(); await nextTick();
const titleEl = wrapperWithTitle.find('h2'); const titleEl = wrapperWithTitle.find('[data-testid="title"]');
expect(titleEl.exists()).toBe(true); expect(titleEl.exists()).toBe(true);
expect(titleEl.html()).toBe('<h2 dir="auto" class="title qa-title"><b>Sample</b> title</h2>'); expect(titleEl.html()).toBe(
'<h1 dir="auto" data-testid="title" class="title qa-title"><b>Sample</b> title</h1>',
);
wrapperWithTitle.destroy(); wrapperWithTitle.destroy();
}); });
......
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