# frozen_string_literal: true require 'asciidoctor/foodogsquared/converters/html5-extended' describe Asciidoctor::Foodogsquared::Converters::HTML5Modified do it 'should have an image block with multiple ' do input = <<~INPUT image::hello.png[sources="hello.avif,hello.webp"] INPUT expected = <<~HTML
hello
HTML actual = (Asciidoctor.convert input).chomp (expect actual).to eq expected.chomp end it 'should have an image block with interactive SVG images' do input = <<~INPUT image::#{fixtures_file 'hello.svg'}[Interactive, opts=interactive] INPUT # rubocop:disable Layout/TrailingWhitespace expected = <<~HTML
HTML # rubocop:enable Layout/TrailingWhitespace actual = (Asciidoctor.convert input).chomp (expect actual).to eq expected.chomp end it 'should have an image block with interactive SVG images with a caption' do input = <<~INPUT :figure-caption!: .SVG file image::#{fixtures_file 'hello.svg'}[Interactive, opts=interactive] INPUT # rubocop:disable Layout/TrailingWhitespace expected = <<~HTML
SVG file
HTML # rubocop:enable Layout/TrailingWhitespace actual = (Asciidoctor.convert input).chomp (expect actual).to eq expected.chomp end it 'should have an image block with inline SVG images' do input = <<~INPUT image::#{fixtures_file 'hello.svg'}[Inline, opts=inline] INPUT expected = <<~HTML
#{File.read fixtures_file('hello.svg')}
HTML actual = (Asciidoctor.convert input).chomp (expect actual).to eq expected.chomp end it 'should have an image block with inline SVG image with a caption' do input = <<~INPUT :figure-caption!: .Inline SVG file image::#{fixtures_file 'hello.svg'}[Inline, opts=inline] INPUT expected = <<~HTML
#{File.read fixtures_file('hello.svg')}
Inline SVG file
HTML actual = (Asciidoctor.convert input).chomp (expect actual).to eq expected.chomp end it 'should have an image block with multiple with caption' do input = <<~INPUT :figure-caption!: .A figure caption image::hello.png[sources="hello.avif,hello.webp"] INPUT expected = <<~HTML
hello
A figure caption
HTML actual = (Asciidoctor.convert input).chomp (expect actual).to eq expected.chomp end it 'should have an image block with multiple , a caption, an ID, and multiple roles' do input = <<~INPUT :figure-caption!: [#image-id.whoa.there] .A figure caption image::hello.png[sources="hello.avif,hello.webp"] INPUT expected = <<~HTML
hello
A figure caption
HTML actual = (Asciidoctor.convert input).chomp (expect actual).to eq expected.chomp end it 'should have an image block with multiple , a caption, an ID, and multiple roles with some attributes' do input = <<~INPUT :figure-caption!: [#image-id.whoa.there] .A figure caption image::hello.png[sources="hello.avif,hello.webp", width=300, height=100] INPUT expected = <<~HTML
hello
A figure caption
HTML actual = (Asciidoctor.convert input).chomp (expect actual).to eq expected.chomp end end