Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def search_key
:name_or_description_cont
end

def actions
def page_actions
render component("ui/button").new(
tag: :a,
text: t('.add'),
Expand Down
10 changes: 9 additions & 1 deletion admin/spec/features/shipping_methods_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
describe "Shipping Methods", :js, type: :feature do
before { sign_in create(:admin_user, email: 'admin@example.com') }

it "lists tax categories and allows deleting them" do
it "lists shipping methods and allows deleting them" do
create(:shipping_method, name: "FAAAST")

visit "/admin/shipping_methods"
Expand All @@ -14,9 +14,17 @@

select_row("FAAAST")
click_on "Delete"

expect(page).to have_content("Shipping methods were successfully removed.")
expect(page).not_to have_content("FAAAST")
expect(Spree::ShippingMethod.count).to eq(0)
expect(page).to be_axe_clean
end

it "shows the link for creating a new shipping method" do
visit "/admin/shipping_methods"

expect(page).to have_content("Add new")
expect(page).to have_selector(:css, 'a[href="/admin/shipping_methods/new"]')
end
end