require 'test_helper' class TabGroupTest < ActionView::TestCase include UiBibz::Helpers::Ui::CoreHelper test 'Tab group' do actual = ui_tab_group do |n| n.tab 'Home', state: :active, url: "#Home", selector: 'home' n.tab 'Profile', url: "#profile", selector: 'profile' n.tab 'Messages', url: "#messages", selector: 'messages' end expected = "
" assert_equal expected, actual end test 'Type' do actual = ui_tab_group type: :links do |n| n.tab 'Home', state: :active, url: "#Home", selector: 'home' n.tab 'Profile', url: "#profile", selector: 'profile' n.tab 'Messages', url: "#messages", selector: 'messages' end expected = "" assert_equal expected, actual end test 'Position' do actual = ui_tab_group(position: :right) do |n| n.tab 'Home', state: :active, url: "#Home", selector: 'home' n.tab 'Profile', url: "#profile", selector: 'profile', label: 16 n.tab 'Messages', url: "#messages", selector: 'messages', state: :disabled end expected = "" assert_equal expected, actual end test 'Justified' do actual = ui_tab_group(justified: true) do |n| n.tab 'Home', state: :active, url: "#Home", selector: 'home' n.tab 'Profile', url: "#profile", selector: 'profile', label: 16 n.tab 'Messages', url: "#messages", selector: 'messages', state: :disabled end expected = "" assert_equal expected, actual end end