OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
adapt to autocomplete="off" being default on hidden input
ulfertsf69b32820c49
diff --git a/spec/lib/open_project/form_tag_helper_spec.rb b/spec/lib/open_project/form_tag_helper_spec.rbindex 925549136f2..90d6eb9f994 100644--- a/spec/lib/open_project/form_tag_helper_spec.rb+++ b/spec/lib/open_project/form_tag_helper_spec.rb@@ -40,11 +40,11 @@ describe OpenProject::FormTagHelper, type: :helper doit_behaves_like 'not wrapped in container', 'form-container'- it 'should output element' do+ it 'outputs element' doexpect(output).to be_html_eql(%{<form accept-charset="UTF-8" action="/feedback" class="form"method="post"><input name="utf8"- type="hidden" value="✓" /><p>Form content</p></form>+ type="hidden" value="✓" autocomplete="off"/><p>Form content</p></form>})endend@@ -56,7 +56,7 @@ describe OpenProject::FormTagHelper, type: :helper doit_behaves_like 'wrapped in container', 'select-container'- it 'should output element' do+ it 'outputs element' doexpect(output).to be_html_eql(%{<select class="form--select"id="field" name="field"><option value="33">FUN</option></select>@@ -73,7 +73,7 @@ describe OpenProject::FormTagHelper, type: :helper doit_behaves_like 'wrapped in container', 'text-field-container'- it 'should output element' do+ it 'outputs element' doexpect(output).to be_html_eql(%{<input class="form--text-field"id="field" name="field" type="text" value="Something to be seen" />@@ -91,7 +91,7 @@ describe OpenProject::FormTagHelper, type: :helper doit_behaves_like 'not wrapped in container', 'label-container'- it 'should output element' do+ it 'outputs element' doexpect(output).to be_html_eql(%{<label class="form--label" for="field" title="Label content">Label content</label>})@@ -105,29 +105,29 @@ describe OpenProject::FormTagHelper, type: :helper doit_behaves_like 'not wrapped in container', 'label-container'- it 'should output element' do+ it 'outputs element' doexpect(output).to be_html_eql(%{<label class="form--label" for="field" title="Label content">Label content</label>})endend- context 'titles' do- it 'should use the title from the options if given' do+ context 'for titles' do+ it 'uses the title from the options if given' dolabel = helper.styled_label_tag 'field', 'Lautrec', title: 'Carim'expect(label).to be_html_eql(%{<label for="field" class="form--label" title="Carim">Lautrec</label>})end- it 'should prefer the title given in the options over the content' do+ it 'prefers the title given in the options over the content' dolabel = helper.styled_label_tag('field', nil, title: 'Carim') { 'Lordvessel' }expect(label).to be_html_eql(%{<label for="field" class="form--label" title="Carim">Lordvessel</label>})end- it 'should strip any given inline HTML from the title tag (with block)' do+ it 'strips any given inline HTML from the title tag (with block)' dolabel = helper.styled_label_tag('field') dohelper.content_tag :span, 'Sif'end@@ -136,7 +136,7 @@ describe OpenProject::FormTagHelper, type: :helper do})end- it 'should strip any given inline HTML from the title tag (with content arg)' do+ it 'strips any given inline HTML from the title tag (with content arg)' dolabel = helper.styled_label_tag('field', helper.content_tag(:span, 'Sif'))expect(label).to be_html_eql(%{<label for="field" class="form--label" title="Sif"><span>Sif</span></label>@@ -152,7 +152,7 @@ describe OpenProject::FormTagHelper, type: :helper doit_behaves_like 'wrapped in container', 'file-field-container'- it 'should output element' do+ it 'outputs element' doexpect(output).to be_html_eql(%{<input class="form--file-field"id="file_field" name="file_field" type="file" />@@ -167,7 +167,7 @@ describe OpenProject::FormTagHelper, type: :helper doit_behaves_like 'wrapped in container', 'text-field-container'- it 'should output element' do+ it 'outputs element' doexpect(output).to be_html_eql(%{<input class="form--text-field -password"id="password" name="password" type="password" value="nopE3king!" />@@ -182,7 +182,7 @@ describe OpenProject::FormTagHelper, type: :helper doit_behaves_like 'wrapped in container', 'text-area-container'- it 'should output element' do+ it 'outputs element' doexpect(output).to be_html_eql(%{<textarea class="form--text-area" id="field" name="field">Words are important</textarea>@@ -197,7 +197,7 @@ Words are important</textarea>it_behaves_like 'wrapped in container', 'check-box-container'- it 'should output element' do+ it 'outputs element' doexpect(output).to be_html_eql(%{<input class="form--check-box"id="field" name="field" type="checkbox" value="1" />@@ -214,7 +214,7 @@ Words are important</textarea>it_behaves_like 'wrapped in container', 'radio-button-container'- it 'should output element' do+ it 'outputs element' doexpect(output).to be_html_eql(%{<input class="form--radio-button"id="field_good_choice" name="field" type="radio" value="good choice" />@@ -223,16 +223,17 @@ Words are important</textarea>enddescribe '#styled_submit_tag' do- subject(:output) do+ let(:output) dohelper.styled_submit_tag('Save it!', options)end+subject(:html) doCapybara::Node::Simple.new(output)endit_behaves_like 'not wrapped in container', 'submit-container'- it 'should output element' do+ it 'outputs element' doexpect(html).to have_selector('input[type=submit]')endend@@ -246,7 +247,7 @@ Words are important</textarea>it_behaves_like 'not wrapped in container', 'button-container'- it 'should output element' do+ it 'outputs element' doexpect(output).to be_html_eql %{<button class="button" name="button" type="submit">Don't save!</button>}@@ -262,7 +263,7 @@ Words are important</textarea>it_behaves_like 'not wrapped in container', 'fieldset-container'- it 'should output element' do+ it 'outputs element' doexpect(output).to be_html_eql %{<fieldsetclass="form--fieldset"><legend>Fieldset Legend</legend>@@ -280,7 +281,7 @@ Words are important</textarea>it_behaves_like 'wrapped in container', 'search-field-container'- it 'should output element' do+ it 'outputs element' doexpect(output).to be_html_eql(%{<input class="form--search-field"id="field" name="field" type="search" value="Find me" />@@ -297,7 +298,7 @@ Words are important</textarea>it_behaves_like 'wrapped in container', 'text-field-container'- it 'should output element' do+ it 'outputs element' doexpect(output).to be_html_eql(%{<input class="form--text-field -telephone"id="field" name="field" type="tel" value="+49 555 111 999" />@@ -314,7 +315,7 @@ Words are important</textarea>it_behaves_like 'wrapped in container', 'text-field-container'- it 'should output element' do+ it 'outputs element' doexpect(output).to be_html_eql(%{<input class="form--text-field -url"id="field" name="field" type="url" value="https://blogger.org/" />@@ -331,7 +332,7 @@ Words are important</textarea>it_behaves_like 'wrapped in container', 'text-field-container'- it 'should output element' do+ it 'outputs element' doexpect(output).to be_html_eql(%{<input class="form--text-field -email"id="field" name="field" type="email" value="[email protected]" />@@ -348,7 +349,7 @@ Words are important</textarea>it_behaves_like 'wrapped in container', 'text-field-container'- it 'should output element' do+ it 'outputs element' doexpect(output).to be_html_eql(%{<input class="form--text-field -number" id="field" name="field" type="number" value="2" />}).at_path('input')@@ -364,7 +365,7 @@ Words are important</textarea>it_behaves_like 'wrapped in container', 'range-field-container'- it 'should output element' do+ it 'outputs element' doexpect(output).to be_html_eql(%{<input class="form--range-field" id="field" name="field" type="range" value="2" />}).at_path('input')