@@ -7,10 +7,12 @@ describe Admin::Poll::Officers::OfficersComponent, type: :component do
|
||||
let(:component) { Admin::Poll::Officers::OfficersComponent.new(officers) }
|
||||
|
||||
it "renders as many rows as officers" do
|
||||
within "tbody" do
|
||||
expect(page).to have_css "tr", count: 2
|
||||
expect(page).to have_css "a", count: 2
|
||||
end
|
||||
render_inline component
|
||||
|
||||
tbody = page.find("tbody")
|
||||
|
||||
expect(tbody).to have_css "tr", count: 2
|
||||
expect(tbody).to have_css "a", count: 2
|
||||
end
|
||||
|
||||
it "renders link to destroy for existing officers" do
|
||||
|
||||
@@ -21,10 +21,8 @@ describe SDGManagement::SubnavigationComponent, type: :component do
|
||||
end
|
||||
|
||||
it "renders given block within active panel" do
|
||||
render_inline component
|
||||
render_inline(component) { "Tab content" }
|
||||
|
||||
within "#goals.tabs-panel.is-active" do
|
||||
expect(page).to have_content("Tab content")
|
||||
end
|
||||
expect(page.find(".tabs-panel.is-active")).to have_content("Tab content")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
require 'rails_helper'
|
||||
require "rails_helper"
|
||||
|
||||
describe SDG::GoalsController do
|
||||
context "featured disabled" do
|
||||
|
||||
Reference in New Issue
Block a user