Skip to content

Commit

Permalink
Merge pull request #2896 from tvdeyen/harden-specs
Browse files Browse the repository at this point in the history
Harden specs
  • Loading branch information
tvdeyen authored May 27, 2024
2 parents 682f201 + 2fad69d commit 4bf0fa9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
6 changes: 4 additions & 2 deletions spec/features/admin/ingredient_pictures_feature_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
end

scenario "Picture description is used as default for ingredient picture alt text" do
visit alchemy.edit_admin_ingredient_path(ingredient_picture)
expect(page).to have_field("Alternative text", placeholder: "A nice picture")
Alchemy::Deprecation.silence do
visit alchemy.edit_admin_ingredient_path(ingredient_picture)
expect(page).to have_field("Alternative text", placeholder: "A nice picture")
end
end
end
4 changes: 2 additions & 2 deletions spec/features/admin/nodes_management_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def add_menu_item
add_menu_item

within "#page_nodes table" do
expect(page).to have_content("Menu node MenuA Page 1")
expect(page).to have_content("Menu node Menu#{a_page.name}")
end
within "[panel='nodes']" do
expect(page).to have_content("(1) Menu node")
Expand Down Expand Up @@ -59,7 +59,7 @@ def add_menu_item
end

within "#page_nodes table" do
expect(page).to_not have_content("Menu node MenuA Page 1")
expect(page).to_not have_content("Menu node Menu#{a_page.name}")
expect(page).to have_content(Alchemy.t("No menu node for this page found"))
end
within "[panel='nodes']" do
Expand Down
6 changes: 6 additions & 0 deletions spec/views/alchemy/admin/ingredients/edit_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
view.instance_variable_set(:@ingredient, ingredient)
end

around do |example|
Alchemy::Deprecation.silence do
example.run
end
end

context "for a picture ingredient" do
let(:image) do
fixture_file_upload(
Expand Down

0 comments on commit 4bf0fa9

Please sign in to comment.