Fix component specs using "within"
These specs were passing because the `within` method does not work in components specs. We have to use `page.find` instead.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user