Sha256: 602bc72df6c426e44533cdf76c92c58fd15da939068437395b1aa903d1c8a7a2

Contents?: true

Size: 1.17 KB

Versions: 29

Compression:

Stored size: 1.17 KB

Contents

# -*- encoding : utf-8 -*-

describe Card::Set::All::RichHtml::Wrapper do
  context "full wrapping" do
    before do
      @ocslot = Card["A"].format
    end

    it "has the appropriate attributes on open" do
      assert_view_select(
        @ocslot.render!(:open),
        'div[class="card-slot open-view ALL TYPE-basic SELF-a"]'
      ) do
        assert_select 'div[class="d0-card-frame card"]' do
          assert_select 'div[class="d0-card-header card-header"]' do
            assert_select 'div[class="d0-card-header-title"]'
          end
          assert_select 'div[class~="d0-card-body"]'
        end
      end
    end

    it "has the appropriate attributes on closed" do
      v = @ocslot.render! :closed
      assert_view_select(
        v, 'div[class="card-slot closed-view ALL TYPE-basic SELF-a"]'
      ) do
        assert_select 'div[class="d0-card-frame card"]' do
          assert_select 'div[class="d0-card-header card-header"]' do
            assert_select 'div[class="d0-card-header-title"]'
          end
          assert_select 'div[class~="d0-card-body d0-card-content"]'
          assert_select 'div[class~="closed-content"]'
        end
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
card-1.96.8 mod/standard/spec/set/all/rich_html/wrapper_spec.rb
card-1.96.7 mod/standard/spec/set/all/rich_html/wrapper_spec.rb
card-1.96.6 mod/standard/spec/set/all/rich_html/wrapper_spec.rb
card-1.96.5 mod/standard/spec/set/all/rich_html/wrapper_spec.rb
card-1.96.4 mod/standard/spec/set/all/rich_html/wrapper_spec.rb
card-1.96.3 mod/standard/spec/set/all/rich_html/wrapper_spec.rb
card-1.96.2 mod/standard/spec/set/all/rich_html/wrapper_spec.rb
card-1.96.1 mod/standard/spec/set/all/rich_html/wrapper_spec.rb
card-1.96.0 mod/standard/spec/set/all/rich_html/wrapper_spec.rb
card-1.95.3 mod/standard/spec/set/all/rich_html/wrapper_spec.rb
card-1.95.2 mod/standard/spec/set/all/rich_html/wrapper_spec.rb
card-1.95.1 mod/standard/spec/set/all/rich_html/wrapper_spec.rb
card-1.95.0 mod/standard/spec/set/all/rich_html/wrapper_spec.rb
card-1.94.1 mod/standard/spec/set/all/rich_html/wrapper_spec.rb
card-1.94.0 mod/standard/spec/set/all/rich_html/wrapper_spec.rb
card-1.93.13 mod/standard/spec/set/all/rich_html/wrapper_spec.rb
card-1.93.12 mod/standard/spec/set/all/rich_html/wrapper_spec.rb
card-1.93.11 mod/standard/spec/set/all/rich_html/wrapper_spec.rb
card-1.93.10 mod/standard/spec/set/all/rich_html/wrapper_spec.rb
card-1.93.9 mod/standard/spec/set/all/rich_html/wrapper_spec.rb