Sha256: 9ffc150f7b6c45fe5938f8d3544fcfef2ed63d713dffdd926f61cb4dc8aee3a4

Contents?: true

Size: 1.26 KB

Versions: 29

Compression:

Stored size: 1.26 KB

Contents

require 'test_helper'


class GlyphGroupTest < ActionView::TestCase
  include UiBibz::Helpers::Ui::CoreHelper

  test 'create glyph group' do
    actual = ui_glyph_group do |gg|
      gg.glyph 'bookmark'
      gg.glyph 'heart', inverse: true, transform: "shrink-10 up-2"
    end

    expected = "<span class=\"fa-layers fa-fw\"><i class=\"glyph fas fa-bookmark\"></i><i data-fa-transform=\"shrink-10 up-2\" class=\"glyph fas fa-heart fa-inverse\"></i></span>"
    assert_equal expected, actual
  end

  test 'create glyph group with text' do
    actual = ui_glyph_group do |gg|
      gg.glyph 'certificate'
      gg.text 'new', inverse: true, transform: "shrink-11.5 rotate--30"
    end

    expected = "<span class=\"fa-layers fa-fw\"><i class=\"glyph fas fa-certificate\"></i><span data-fa-transform=\"shrink-11.5 rotate--30\" class=\"fa-layers-text fa-inverse\">new</span></span>"
    assert_equal expected, actual
  end

  test 'create glyph group with counter' do
    actual = ui_glyph_group do |gg|
      gg.glyph 'envelope'
      gg.counter "1419", position: 'top-right'
    end

    expected = "<span class=\"fa-layers fa-fw\"><i class=\"glyph fas fa-envelope\"></i><span class=\"fa-layers-counter fa-layers-top-right\">1419</span></span>"
    assert_equal expected, actual
  end

end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
ui_bibz-2.4.0 test/ui/core/icons/glyph_group_test.rb
ui_bibz-2.3.15 test/ui/core/icons/glyph_group_test.rb
ui_bibz-2.3.14 test/ui/core/icons/glyph_group_test.rb
ui_bibz-2.3.13 test/ui/core/icons/glyph_group_test.rb
ui_bibz-2.3.12 test/ui/core/icons/glyph_group_test.rb
ui_bibz-2.3.11 test/ui/core/icons/glyph_group_test.rb
ui_bibz-2.3.10 test/ui/core/icons/glyph_group_test.rb
ui_bibz-2.3.9 test/ui/core/icons/glyph_group_test.rb
ui_bibz-2.3.8 test/ui/core/icons/glyph_group_test.rb
ui_bibz-2.3.7 test/ui/core/icons/glyph_group_test.rb
ui_bibz-2.3.6 test/ui/core/icons/glyph_group_test.rb
ui_bibz-2.3.5 test/ui/core/icons/glyph_group_test.rb
ui_bibz-2.3.4 test/ui/core/icons/glyph_group_test.rb
ui_bibz-2.3.3 test/ui/core/icons/glyph_group_test.rb
ui_bibz-2.3.2 test/ui/core/icons/glyph_group_test.rb
ui_bibz-2.3.1 test/ui/core/icons/glyph_group_test.rb
ui_bibz-2.3.0 test/ui/core/icons/glyph_group_test.rb
ui_bibz-2.2.2 test/ui/core/icons/glyph_group_test.rb
ui_bibz-2.2.1 test/ui/core/icons/glyph_group_test.rb
ui_bibz-2.2.0 test/ui/core/icons/glyph_group_test.rb