Sha256: 3790058f2ac57c4dd4d8dff3eb36cd8af62f3b43da07a7edf97ca8a81eceabac
Contents?: true
Size: 1.59 KB
Versions: 1
Compression:
Stored size: 1.59 KB
Contents
# frozen_string_literal: true module Capybara module ActiveAdmin module Matchers # Matchers for common Active Admin components. module Layout def have_action_item(text, options = {}) opts = Util.options_with_text(text, options) have_selector(action_item_selector, opts) end def have_page_title(text, options = {}) opts = Util.options_with_text(text, options) have_selector(page_title_selector, opts) end def have_flash_message(text, options = {}) type = options.delete(:type) opts = Util.options_with_text(text, options) selector = flash_message_selector(type) have_selector(selector, opts) end def have_footer(options = {}) selector = footer_selector have_selector(selector, options) end def have_panel(title, options = {}) title_selector = "#{panel_selector} > #{panel_title_selector}" opts = Util.options_with_text(title, options) have_selector(title_selector, opts) end def have_sidebar(title, options = {}) title_selector = "#{sidebar_selector} #{panel_selector} > #{panel_title_selector}" opts = Util.options_with_text(title, options) have_selector(title_selector, opts) end def have_batch_action(title, exact: true) selector = "#{dropdown_list_selector} #{batch_action_selector}" opts = Util.options_with_text(title, exact: exact) have_selector(selector, opts) end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
capybara_active_admin-0.3.3 | lib/capybara/active_admin/matchers/layout.rb |