Sha256: 19eb1ac96070fd1b0bcf5cd7f5936b6a2aee71a0255ff657ca92bc369093614e

Contents?: true

Size: 938 Bytes

Versions: 14

Compression:

Stored size: 938 Bytes

Contents

require 'rails_helper'

describe ActiveAdmin::Views::Popover do

  let(:the_popover) do
    render_arbre_component do
      popover id: "my_awesome_popover" do
        para "Hello World, this is popover content baby."
      end
    end
  end

  it "should have the class of 'sidebar_section'" do
    expect(the_popover.class_list).to include("popover")
  end

  it "should have an inner content element class of 'popover_contents'" do
    expect(the_popover.find_by_tag("div").first.class_list).to include("popover_contents")
  end

  it "should have the popover content in the inner content element" do
    expect(the_popover.find_by_class("popover_contents").first.content).to include("Hello World, this is popover content baby.")
  end

  it "should have an id" do
    expect(the_popover.id).to eq "my_awesome_popover"
  end

  it "should be hidden" do
    expect(the_popover.attributes).to include(style: "display: none");
  end

end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
yousty-activeadmin-1.0.17.pre spec/unit/views/components/popover_spec.rb
yousty-activeadmin-1.0.16.pre spec/unit/views/components/popover_spec.rb
yousty-activeadmin-1.0.15.pre spec/unit/views/components/popover_spec.rb
yousty-activeadmin-1.0.14.pre spec/unit/views/components/popover_spec.rb
yousty-activeadmin-1.0.13.pre spec/unit/views/components/popover_spec.rb
yousty-activeadmin-1.0.12.pre spec/unit/views/components/popover_spec.rb
yousty-activeadmin-1.0.11.pre spec/unit/views/components/popover_spec.rb
yousty-activeadmin-1.0.10.pre spec/unit/views/components/popover_spec.rb
yousty-activeadmin-1.0.9.pre spec/unit/views/components/popover_spec.rb
yousty-activeadmin-1.0.8.pre spec/unit/views/components/popover_spec.rb
activeadmin-1.0.0.pre1 spec/unit/views/components/popover_spec.rb
yousty-activeadmin-1.0.7.pre spec/unit/views/components/popover_spec.rb
yousty-activeadmin-1.0.6.pre spec/unit/views/components/popover_spec.rb
yousty-activeadmin-1.0.5.pre spec/unit/views/components/popover_spec.rb