summaryrefslogtreecommitdiff
path: root/spec/section_spec.rb
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2020-11-18 23:44:03 -0700
committerDan Allen <dan.j.allen@gmail.com>2020-11-18 23:44:03 -0700
commit1f0d19cbcd18a314940e5ccfff4df03cb9a01d16 (patch)
tree349e06c7061af04f601d1459a09e7b5e02f9f4c3 /spec/section_spec.rb
parent846bfd3977490da92bda5e8564e8a6c2e2a6f475 (diff)
move floating title (aka discrete heading) tests to dedicated file
Diffstat (limited to 'spec/section_spec.rb')
-rw-r--r--spec/section_spec.rb64
1 files changed, 0 insertions, 64 deletions
diff --git a/spec/section_spec.rb b/spec/section_spec.rb
index f1e9f92b..decb964e 100644
--- a/spec/section_spec.rb
+++ b/spec/section_spec.rb
@@ -937,70 +937,6 @@ describe 'Asciidoctor::PDF::Converter - Section' do
(expect section_body_text[:x]).to eql 84.24
end
- it 'should outdent discrete heading' do
- pdf = to_pdf <<~'EOS', pdf_theme: { section_indent: 36 }, analyze: true
- = Document Title
-
- == Section
-
- paragraph
-
- [discrete]
- === Discrete Heading
-
- paragraph
-
- === Nested Section
-
- paragraph
-
- [discrete]
- ==== Another Discrete Heading
-
- paragraph
- EOS
-
- discrete_heading_texts = pdf.find_text %r/Discrete/
- (expect discrete_heading_texts).to have_size 2
- (expect discrete_heading_texts[0][:x]).to eql 48.24
- (expect discrete_heading_texts[1][:x]).to eql 48.24
- paragraph_texts = pdf.find_text 'paragraph'
- (expect paragraph_texts.map {|it| it[:x] }.uniq).to eql [84.24]
- end
-
- it 'should not outdent discrete heading inside block' do
- pdf = to_pdf <<~'EOS', pdf_theme: { section_indent: 36 }, analyze: true
- == Section
-
- ****
- sidebar content
-
- [discrete]
- == Discrete Heading
- ****
- EOS
-
- sidebar_content_text = (pdf.find_text 'sidebar content')[0]
- discrete_heading_text = (pdf.find_text 'Discrete Heading')[0]
- (expect sidebar_content_text[:x]).to eql discrete_heading_text[:x]
- end
-
- it 'should honor text alignment role on discrete heading' do
- pdf = to_pdf <<~'EOS', analyze: true
- [discrete]
- == Discrete Heading
- EOS
- left_x = (pdf.find_text 'Discrete Heading')[0][:x]
-
- pdf = to_pdf <<~'EOS', analyze: true
- [discrete.text-right]
- == Discrete Heading
- EOS
- right_x = (pdf.find_text 'Discrete Heading')[0][:x]
-
- (expect right_x).to be > left_x
- end
-
it 'should outdent footnotes in article' do
pdf = to_pdf <<~'EOS', pdf_theme: { section_indent: 36 }, analyze: true
= Document Title