summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2014-01-20 22:30:42 -0700
committerDan Allen <dan.j.allen@gmail.com>2014-01-20 22:30:42 -0700
commit8915b4614fac4e9e82e9478bfb30640cc421dc05 (patch)
tree24efa9e7b6bfb8443b4fce9fcbc3bf615d2588a3 /test
parenta83061aeeebbbc174af311bc535dab97e8666bee (diff)
Opal compatibility fixes
Diffstat (limited to 'test')
-rw-r--r--test/lists_test.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/lists_test.rb b/test/lists_test.rb
index 07844772..1c2de4ad 100644
--- a/test/lists_test.rb
+++ b/test/lists_test.rb
@@ -2448,8 +2448,8 @@ term:: def
assert_css 'table', output, 1
assert_css 'table > colgroup', output, 1
assert_css 'table > colgroup > col', output, 2
- assert_xpath '(//table/colgroup/col)[1][@style="width:25%;"]', output, 1
- assert_xpath '(//table/colgroup/col)[2][@style="width:75%;"]', output, 1
+ assert_xpath '(//table/colgroup/col)[1][@style="width: 25%;"]', output, 1
+ assert_xpath '(//table/colgroup/col)[2][@style="width: 75%;"]', output, 1
end
test 'should set col widths of item and label in docbook if specified' do
@@ -2540,6 +2540,8 @@ Question 1::
Answer 1.
Question 2::
Answer 2.
++
+NOTE: A note about Answer 2.
EOS
output = render_embedded_string input
assert_css '.qlist.qanda', output, 1
@@ -2552,6 +2554,7 @@ Question 2::
assert_css ".qanda > ol > li:nth-child(#{idx}) > p:last-child > *", output, 0
assert_xpath "/*[@class = 'qlist qanda']/ol/li[#{idx}]/p[2][normalize-space(text()) = 'Answer #{idx}.']", output, 1
end
+ assert_xpath "/*[@class = 'qlist qanda']/ol/li[2]/p[2]/following-sibling::div[@class='admonitionblock note']", output, 1
end
test 'should render qanda list in DocBook with proper semantics' do
@@ -2561,6 +2564,8 @@ Question 1::
Answer 1.
Question 2::
Answer 2.
++
+NOTE: A note about Answer 2.
EOS
output = render_embedded_string input, :backend => 'docbook'
assert_css 'qandaset', output, 1
@@ -2573,6 +2578,7 @@ Question 2::
assert_css "qandaset > qandaentry:nth-child(#{idx}) > answer > simpara", output, 1
assert_xpath "/qandaset/qandaentry[#{idx}]/answer/simpara[normalize-space(text()) = 'Answer #{idx}.']", output, 1
end
+ assert_xpath "/qandaset/qandaentry[2]/answer/simpara/following-sibling::note", output, 1
end
test 'consecutive questions should share same question element in docbook' do