diff options
author | Denys Mishunov <dmishunov@gitlab.com> | 2019-07-24 15:31:26 +0200 |
---|---|---|
committer | Denys Mishunov <dmishunov@gitlab.com> | 2019-08-07 11:57:38 +0200 |
commit | 5b5fc580f38174154af314b2e4c41f0c5d8c8b38 (patch) | |
tree | 4793b03800b46cd44ac165ee483badb83886c847 /spec/views | |
parent | 4bb8a4e3d3cd74e6e7a40c5e7805dd3670fdfc37 (diff) | |
download | gitlab-ce-5b5fc580f38174154af314b2e4c41f0c5d8c8b38.tar.gz |
Properly labelling fields on Search page
Adding proper <label>s while removing labels from the fields themselves.
This gives more space for the field's content
Diffstat (limited to 'spec/views')
-rw-r--r-- | spec/views/search/_filter.html.haml_spec.rb | 17 | ||||
-rw-r--r-- | spec/views/search/_form.html.haml_spec.rb | 14 |
2 files changed, 31 insertions, 0 deletions
diff --git a/spec/views/search/_filter.html.haml_spec.rb b/spec/views/search/_filter.html.haml_spec.rb new file mode 100644 index 00000000000..d2cd636f8c6 --- /dev/null +++ b/spec/views/search/_filter.html.haml_spec.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +require 'spec_helper' + +describe 'search/_filter' do + context 'when the search page is opened' do + it 'displays the correct elements' do + render + + expect(rendered).to have_selector('label[for="dashboard_search_group"]') + expect(rendered).to have_selector('button#dashboard_search_group') + + expect(rendered).to have_selector('label[for="dashboard_search_project"]') + expect(rendered).to have_selector('button#dashboard_search_project') + end + end +end diff --git a/spec/views/search/_form.html.haml_spec.rb b/spec/views/search/_form.html.haml_spec.rb new file mode 100644 index 00000000000..69f40895d86 --- /dev/null +++ b/spec/views/search/_form.html.haml_spec.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +require 'spec_helper' + +describe 'search/_form' do + context 'when the search page is opened' do + it 'displays the correct elements' do + render + + expect(rendered).to have_selector('.search-field-holder.form-group') + expect(rendered).to have_selector('label[for="dashboard_search"]') + end + end +end |