Skip to content

Commit

Permalink
Reintroduce test for acronyms in Legislative Lists
Browse files Browse the repository at this point in the history
This test currently fails as the code to support this has been commented
out.

Work to fix the issue will be done in a later commit.
  • Loading branch information
brucebolt committed Aug 21, 2023
1 parent 4f9a54b commit 9ca47bb
Showing 1 changed file with 37 additions and 38 deletions.
75 changes: 37 additions & 38 deletions test/govspeak_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1105,44 +1105,43 @@ class GovspeakTest < Minitest::Test
)
end

# FIXME: this code is buggy and replaces abbreviations in HTML tags - removing the functionality for now
# test_given_govspeak "
# $LegislativeList
# * 1. Item 1[^1] with an ACRONYM
# * 2. Item 2[^2]
# * 3. Item 3
# $EndLegislativeList
#
# [^1]: Footnote definition one
# [^2]: Footnote definition two with an ACRONYM
#
# *[ACRONYM]: This is the acronym explanation
# " do
# assert_html_output %(
# <ol class="legislative-list">
# <li>1. Item 1<sup id="fnref:1" role="doc-noteref"><a href="#fn:1" class="footnote" rel="footnote">[footnote 1]</a></sup> with an <abbr title="This is the acronym explanation">ACRONYM</abbr>
# </li>
# <li>2. Item 2<sup id="fnref:2" role="doc-noteref"><a href="#fn:2" class="footnote" rel="footnote">[footnote 2]</a></sup>
# </li>
# <li>3. Item 3</li>
# </ol>
#
# <div class="footnotes" role="doc-endnotes">
# <ol>
# <li id="fn:1" role="doc-endnote">
# <p>
# Footnote definition one<a href="#fnref:1" class="reversefootnote" role="doc-backlink" aria-label="go to where this is referenced">↩</a>
# </p>
# </li>
# <li id="fn:2" role="doc-endnote">
# <p>
# Footnote definition two with an <abbr title="This is the acronym explanation">ACRONYM</abbr><a href="#fnref:2" class="reversefootnote" role="doc-backlink" aria-label="go to where this is referenced">↩</a>
# </p>
# </li>
# </ol>
# </div>
# )
# end
test_given_govspeak "
$LegislativeList
* 1. Item 1[^1] with an ACRONYM
* 2. Item 2[^2]
* 3. Item 3
$EndLegislativeList
[^1]: Footnote definition one
[^2]: Footnote definition two with an ACRONYM
*[ACRONYM]: This is the acronym explanation
" do
assert_html_output %(
<ol class="legislative-list">
<li>1. Item 1<sup id="fnref:1" role="doc-noteref"><a href="#fn:1" class="footnote" rel="footnote">[footnote 1]</a></sup> with an <abbr title="This is the acronym explanation">ACRONYM</abbr>
</li>
<li>2. Item 2<sup id="fnref:2" role="doc-noteref"><a href="#fn:2" class="footnote" rel="footnote">[footnote 2]</a></sup>
</li>
<li>3. Item 3</li>
</ol>
<div class="footnotes" role="doc-endnotes">
<ol>
<li id="fn:1" role="doc-endnote">
<p>
Footnote definition one<a href="#fnref:1" class="reversefootnote" role="doc-backlink" aria-label="go to where this is referenced">↩</a>
</p>
</li>
<li id="fn:2" role="doc-endnote">
<p>
Footnote definition two with an <abbr title="This is the acronym explanation">ACRONYM</abbr><a href="#fnref:2" class="reversefootnote" role="doc-backlink" aria-label="go to where this is referenced">↩</a>
</p>
</li>
</ol>
</div>
)
end

test_given_govspeak "
The quick brown
Expand Down

0 comments on commit 9ca47bb

Please sign in to comment.