Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Harden specs #2896

Merged
merged 2 commits into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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