Commit 7b0ab75a authored by Olena Horal-Koretska's avatar Olena Horal-Koretska

Merge branch '233548-requirement-form-with-issuable-show' into 'master'

Use `issuable_show` for requirement show & create

See merge request gitlab-org/gitlab!48325
parents b4cba152 853ed8f5
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
// See: https://gitlab.com/gitlab-org/gitlab/-/issues/216102 // See: https://gitlab.com/gitlab-org/gitlab/-/issues/216102
export const BACKSPACE_KEY_CODE = 8; export const BACKSPACE_KEY_CODE = 8;
export const TAB_KEY_CODE = 9;
export const ENTER_KEY_CODE = 13; export const ENTER_KEY_CODE = 13;
export const ESC_KEY_CODE = 27; export const ESC_KEY_CODE = 27;
export const UP_KEY_CODE = 38; export const UP_KEY_CODE = 38;
......
...@@ -21,10 +21,42 @@ ...@@ -21,10 +21,42 @@
} }
} }
.requirement-form-drawer.zen-mode { .requirement-form-drawer {
// We need to override `z-index` provided to GlDrawer &.zen-mode {
// in Zen mode to enable full-screen editing. // We need to override `z-index` provided to GlDrawer
z-index: auto !important; // in Zen mode to enable full-screen editing.
z-index: auto !important;
}
// Following overrides are done to
// elements within `issuable_body.vue`
// and are specific to requirements.
.title-container {
@include gl-border-b-solid;
@include gl-border-b-gray-100;
@include gl-border-b-1;
&,
.title {
@include gl-mb-3;
}
.title {
@include gl-font-size-markdown-h2;
}
}
.issuable-details {
@include gl-py-0;
li.md-header-toolbar {
@include gl-py-3;
}
.detail-page-description {
@include gl-border-none;
}
}
} }
} }
......
---
title: Improve accessibility of keyboard navigation for Requirements
merge_request: 48325
author:
type: added
...@@ -16,8 +16,8 @@ RSpec.describe 'Requirements list', :js do ...@@ -16,8 +16,8 @@ RSpec.describe 'Requirements list', :js do
find('button.js-new-requirement').click find('button.js-new-requirement').click
end end
page.within('.requirements-list-container') do page.within('.requirement-form-drawer') do
find('textarea#requirementTitle').native.send_keys title find('input#issuable-title').native.send_keys title
find('button.js-requirement-save').click find('button.js-requirement-save').click
wait_for_all_requests wait_for_all_requests
...@@ -66,7 +66,7 @@ RSpec.describe 'Requirements list', :js do ...@@ -66,7 +66,7 @@ RSpec.describe 'Requirements list', :js do
end end
page.within('.requirements-list-container') do page.within('.requirements-list-container') do
expect(page).to have_selector('.requirement-form') expect(page).to have_selector('.requirement-form-drawer')
end end
end end
...@@ -137,7 +137,7 @@ RSpec.describe 'Requirements list', :js do ...@@ -137,7 +137,7 @@ RSpec.describe 'Requirements list', :js do
page.within('.requirement-form-drawer') do page.within('.requirement-form-drawer') do
expect(page.find('.title-container')).to have_content(requirement1.title) expect(page.find('.title-container')).to have_content(requirement1.title)
expect(page.find('.title-container')).to have_selector('button.btn-edit') expect(page.find('.title-container')).to have_selector('button.btn-edit')
expect(page.find('.description-container')).to have_content(requirement1.description) expect(page.find('.description')).to have_content(requirement1.description)
end end
end end
...@@ -148,8 +148,8 @@ RSpec.describe 'Requirements list', :js do ...@@ -148,8 +148,8 @@ RSpec.describe 'Requirements list', :js do
page.within('.requirement-form-drawer') do page.within('.requirement-form-drawer') do
expect(page.find('.gl-drawer-header span', match: :first)).to have_content("REQ-#{requirement1.iid}") expect(page.find('.gl-drawer-header span', match: :first)).to have_content("REQ-#{requirement1.iid}")
expect(page.find('textarea#requirementTitle')['value']).to have_content("#{requirement1.title}") expect(page.find('input#issuable-title')['value']).to have_content("#{requirement1.title}")
expect(page.find('textarea#requirementDescription')['value']).to have_content("#{requirement1.description}") expect(page.find('textarea#issuable-description')['value']).to have_content("#{requirement1.description}")
expect(page.find('input[type="checkbox"]')['checked']).to eq(requirement1.last_test_report_state) expect(page.find('input[type="checkbox"]')['checked']).to eq(requirement1.last_test_report_state)
expect(page.find('.js-requirement-save')).to have_content('Save changes') expect(page.find('.js-requirement-save')).to have_content('Save changes')
end end
...@@ -164,8 +164,8 @@ RSpec.describe 'Requirements list', :js do ...@@ -164,8 +164,8 @@ RSpec.describe 'Requirements list', :js do
end end
page.within('.requirement-form-drawer') do page.within('.requirement-form-drawer') do
find('textarea#requirementTitle').native.send_keys requirement_title find('input#issuable-title').native.send_keys requirement_title
find('textarea#requirementDescription').native.send_keys requirement_description find('textarea#issuable-description').native.send_keys requirement_description
find('input[type="checkbox"]').click find('input[type="checkbox"]').click
click_button 'Save changes' click_button 'Save changes'
......
...@@ -9433,9 +9433,6 @@ msgstr "" ...@@ -9433,9 +9433,6 @@ msgstr ""
msgid "Describe the goal of the changes and what reviewers should be aware of." msgid "Describe the goal of the changes and what reviewers should be aware of."
msgstr "" msgstr ""
msgid "Describe the requirement here"
msgstr ""
msgid "Description" msgid "Description"
msgstr "" msgstr ""
...@@ -23573,9 +23570,6 @@ msgstr "" ...@@ -23573,9 +23570,6 @@ msgstr ""
msgid "Requirement %{reference} has been updated" msgid "Requirement %{reference} has been updated"
msgstr "" msgstr ""
msgid "Requirement title"
msgstr ""
msgid "Requirement title cannot have more than %{limit} characters." msgid "Requirement title cannot have more than %{limit} characters."
msgstr "" msgstr ""
......
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