mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Merge pull request #7909 from shen-sat/7470-add-shipping-category-feature-test
7470 add shipping category feature test
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
|
||||
- content_for :page_actions do
|
||||
%li
|
||||
= button_link_to Spree.t(:back_to_shipping_categories_list), spree.admin_shipping_categories_path, :icon => 'icon-arrow-left'
|
||||
= button_link_to Spree.t(:back_to_shipping_categories), spree.admin_shipping_categories_path, :icon => 'icon-arrow-left'
|
||||
|
||||
= render :partial => 'spree/shared/error_messages', :locals => { :target => @shipping_category }
|
||||
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'spec_helper'
|
||||
|
||||
describe "Shipping Categories" do
|
||||
include AuthenticationHelper
|
||||
|
||||
context 'user adds a new shipping category with temperature control' do
|
||||
it 'user sees new shipping category with temperature control' do
|
||||
login_as_admin_and_visit spree.admin_shipping_categories_path
|
||||
click_link "New Shipping Category"
|
||||
|
||||
fill_in "shipping_category_name", with: "freeze"
|
||||
check "shipping_category_temperature_controlled"
|
||||
click_button "Create"
|
||||
|
||||
expect(page).to have_content("successfully created!")
|
||||
expect(page).to have_content("freeze")
|
||||
row = find('tr', text: 'freeze')
|
||||
within row do
|
||||
expect(page).to have_content "Yes"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user