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:
Javi Martín
2021-01-09 15:47:37 +01:00
parent afda9ab3b7
commit c5a6ee74c4
2 changed files with 8 additions and 8 deletions

View File

@@ -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