mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-04 02:31:33 +00:00
Rename AuthenticationWorkflow to AuthenticationHelper
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe Admin::ColumnPreferencesController, type: :controller do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
|
||||
describe "bulk_update" do
|
||||
let!(:user1) { create(:user) }
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe Admin::CustomersController, type: :controller do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
|
||||
describe "index" do
|
||||
let(:enterprise) { create(:distributor_enterprise) }
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe Admin::InventoryItemsController, type: :controller do
|
||||
# include AuthenticationWorkflow
|
||||
# include AuthenticationHelper
|
||||
|
||||
describe "create" do
|
||||
context "json" do
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe Admin::ProxyOrdersController, type: :controller do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
|
||||
describe 'cancel' do
|
||||
let!(:user) { create(:user, enterprise_limit: 10) }
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe Admin::SchedulesController, type: :controller do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
|
||||
describe "index" do
|
||||
let!(:coordinated_order_cycle) { create(:simple_order_cycle) }
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe Admin::SubscriptionLineItemsController, type: :controller do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
|
||||
describe "build" do
|
||||
let(:user) { create(:user) }
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe Admin::SubscriptionsController, type: :controller do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
include OpenFoodNetwork::EmailHelper
|
||||
|
||||
describe 'index' do
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe Admin::VariantOverridesController, type: :controller do
|
||||
# include AuthenticationWorkflow
|
||||
# include AuthenticationHelper
|
||||
|
||||
describe "bulk_update" do
|
||||
context "json" do
|
||||
|
||||
@@ -2,7 +2,7 @@ require 'spec_helper'
|
||||
|
||||
module Api
|
||||
describe CustomersController, type: :controller do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
render_views
|
||||
|
||||
let(:user) { create(:user) }
|
||||
|
||||
@@ -2,7 +2,7 @@ require 'spec_helper'
|
||||
|
||||
module Api
|
||||
describe EnterpriseFeesController, type: :controller do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
|
||||
let!(:unreferenced_fee) { create(:enterprise_fee) }
|
||||
let!(:referenced_fee) { create(:enterprise_fee) }
|
||||
|
||||
@@ -4,7 +4,7 @@ require 'spec_helper'
|
||||
|
||||
module Api
|
||||
describe ExchangeProductsController, type: :controller do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
|
||||
let(:order_cycle) { create(:order_cycle) }
|
||||
let(:exchange) { order_cycle.exchanges.incoming.first }
|
||||
|
||||
@@ -2,7 +2,7 @@ require "spec_helper"
|
||||
|
||||
module Api
|
||||
describe LogosController, type: :controller do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
|
||||
let(:admin_user) { create(:admin_user) }
|
||||
let(:enterprise_owner) { create(:user) }
|
||||
|
||||
@@ -2,7 +2,7 @@ require 'spec_helper'
|
||||
|
||||
module Api
|
||||
describe OrdersController, type: :controller do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
render_views
|
||||
|
||||
let!(:regular_user) { create(:user) }
|
||||
|
||||
@@ -2,7 +2,7 @@ require 'spec_helper'
|
||||
|
||||
module Api
|
||||
describe ProductImagesController, type: :controller do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
render_views
|
||||
|
||||
describe "uploading an image" do
|
||||
|
||||
@@ -2,7 +2,7 @@ require "spec_helper"
|
||||
|
||||
module Api
|
||||
describe PromoImagesController, type: :controller do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
|
||||
let(:admin_user) { create(:admin_user) }
|
||||
let(:enterprise_owner) { create(:user) }
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe Api::ShopsController, type: :controller do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
render_views
|
||||
|
||||
context "as a non-authenticated user" do
|
||||
|
||||
@@ -2,7 +2,7 @@ require 'spec_helper'
|
||||
|
||||
module Spree
|
||||
describe Admin::AdjustmentsController, type: :controller do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
|
||||
before { controller_login_as_admin }
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ require 'spec_helper'
|
||||
module Spree
|
||||
module Admin
|
||||
describe CountriesController, type: :controller do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
|
||||
describe "#update" do
|
||||
before { controller_login_as_admin }
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe Spree::Admin::ImageSettingsController do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
|
||||
before { controller_login_as_admin }
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe Spree::Admin::MailMethodsController do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
|
||||
before { controller_login_as_admin }
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe Spree::Admin::Orders::CustomerDetailsController, type: :controller do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
|
||||
describe "#update" do
|
||||
context "adding customer details via newly created admin order" do
|
||||
|
||||
@@ -5,7 +5,7 @@ require 'spec_helper'
|
||||
module Spree
|
||||
module Admin
|
||||
describe ReturnAuthorizationsController, type: :controller do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
|
||||
let(:order) do
|
||||
create(:order, :with_line_item, :completed,
|
||||
|
||||
@@ -5,7 +5,7 @@ require 'spec_helper'
|
||||
module Spree
|
||||
module Admin
|
||||
describe ShippingCategoriesController, type: :controller do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
|
||||
describe "#create and #update" do
|
||||
before { controller_login_as_admin }
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe Spree::Admin::ShippingMethodsController, type: :controller do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
|
||||
describe "#update" do
|
||||
let(:shipping_method) { create(:shipping_method) }
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe Spree::UsersController, type: :controller do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
|
||||
describe "show" do
|
||||
let!(:u1) { create(:user) }
|
||||
|
||||
@@ -4,7 +4,7 @@ feature '
|
||||
As an administrator
|
||||
I want to manage adjustments on orders
|
||||
', js: true do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
include WebHelper
|
||||
|
||||
let!(:user) { create(:user) }
|
||||
|
||||
@@ -2,7 +2,7 @@ require 'spec_helper'
|
||||
|
||||
feature "Authentication", js: true do
|
||||
include UIComponentHelper
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
include WebHelper
|
||||
|
||||
let(:user) { create(:user, password: "password", password_confirmation: "password") }
|
||||
|
||||
@@ -5,7 +5,7 @@ feature '
|
||||
I want to be able to manage orders in bulk
|
||||
', js: true do
|
||||
include AdminHelper
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
include WebHelper
|
||||
|
||||
context "listing orders" do
|
||||
|
||||
@@ -5,7 +5,7 @@ feature '
|
||||
I want to be able to manage products in bulk
|
||||
', js: true do
|
||||
include AdminHelper
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
include WebHelper
|
||||
|
||||
describe "listing products" do
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe "General Settings" do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
|
||||
before(:each) do
|
||||
login_as_admin_and_visit spree.admin_dashboard_path
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe "image settings" do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
|
||||
before do
|
||||
login_as_admin_and_visit spree.admin_dashboard_path
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe "Mail Methods" do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
|
||||
before(:each) do
|
||||
login_as_admin_and_visit spree.admin_general_settings_path
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe "States" do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
|
||||
let!(:country) { create(:country) }
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe "Tax Categories" do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
|
||||
before(:each) do
|
||||
login_as_admin_and_visit spree.admin_general_settings_path
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe "Tax Rates" do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
|
||||
let!(:calculator) { create(:calculator_per_item, calculable: create(:order)) }
|
||||
let!(:tax_rate) { create(:tax_rate, calculator: calculator) }
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe "Taxonomies" do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
|
||||
before(:each) do
|
||||
login_as_admin_and_visit spree.admin_general_settings_path
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe "Zones" do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
|
||||
before do
|
||||
login_as_admin
|
||||
|
||||
@@ -4,7 +4,7 @@ feature '
|
||||
As a site administrator
|
||||
I want to configure the site content
|
||||
' do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
include WebHelper
|
||||
|
||||
before do
|
||||
|
||||
@@ -2,7 +2,7 @@ require 'spec_helper'
|
||||
|
||||
feature 'Customers' do
|
||||
include AdminHelper
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
include WebHelper
|
||||
|
||||
context "as an enterprise user" do
|
||||
|
||||
@@ -5,7 +5,7 @@ feature '
|
||||
I want to manage enterprise fees
|
||||
', js: true do
|
||||
include WebHelper
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
|
||||
let!(:tax_category_gst) { create(:tax_category, name: 'GST') }
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ feature '
|
||||
I want to manage enterprise groups
|
||||
' do
|
||||
include WebHelper
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
|
||||
before(:each) do
|
||||
login_to_admin_section
|
||||
|
||||
@@ -5,7 +5,7 @@ feature '
|
||||
I want to manage relationships between enterprises
|
||||
', js: true do
|
||||
include WebHelper
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
|
||||
context "as a site administrator" do
|
||||
before { login_as_admin }
|
||||
|
||||
@@ -4,7 +4,7 @@ feature '
|
||||
As an Administrator
|
||||
I want to manage relationships between users and enterprises
|
||||
', js: true do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
include WebHelper
|
||||
include OpenFoodNetwork::EmailHelper
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ feature '
|
||||
I want to setup users to manage an enterprise
|
||||
' do
|
||||
include WebHelper
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
|
||||
let!(:user) { create(:user) }
|
||||
let!(:supplier1) { create(:supplier_enterprise, name: 'Supplier 1') }
|
||||
|
||||
@@ -2,7 +2,7 @@ require "spec_helper"
|
||||
|
||||
feature "Managing enterprise images" do
|
||||
include WebHelper
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
|
||||
context "as an Enterprise user", js: true do
|
||||
let(:enterprise_user) { create(:user, enterprise_limit: 1) }
|
||||
|
||||
@@ -2,7 +2,7 @@ require 'spec_helper'
|
||||
|
||||
feature 'Enterprises Index' do
|
||||
include WebHelper
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
|
||||
context "as an admin user" do
|
||||
scenario "listing enterprises" do
|
||||
|
||||
@@ -5,7 +5,7 @@ feature '
|
||||
I want to manage enterprises
|
||||
' do
|
||||
include WebHelper
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
|
||||
scenario "viewing an enterprise" do
|
||||
e = create(:enterprise)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require 'spec_helper'
|
||||
|
||||
feature 'External services' do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
|
||||
describe "bugherd" do
|
||||
before do
|
||||
|
||||
@@ -4,7 +4,7 @@ feature '
|
||||
As an admin
|
||||
I want to manage image formats
|
||||
' do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
include WebHelper
|
||||
|
||||
before(:all) do
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require 'spec_helper'
|
||||
|
||||
feature 'Multilingual', js: true do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
include WebHelper
|
||||
let(:admin_role) { Spree::Role.find_or_create_by!(name: 'admin') }
|
||||
let(:admin_user) { create(:user) }
|
||||
|
||||
@@ -7,7 +7,7 @@ feature '
|
||||
I want to create/update complex order cycles with a specific time
|
||||
', js: true do
|
||||
include AdminHelper
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
include WebHelper
|
||||
|
||||
let(:order_cycle_opening_time) { Time.zone.local(2040, 11, 0o6, 0o6, 0o0, 0o0).strftime("%F %T %z") }
|
||||
|
||||
@@ -7,7 +7,7 @@ feature '
|
||||
I want to manage complex order cycles
|
||||
', js: true do
|
||||
include AdminHelper
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
include WebHelper
|
||||
|
||||
scenario "editing an order cycle with an exchange between the same enterprise" do
|
||||
|
||||
@@ -7,7 +7,7 @@ feature '
|
||||
I want to manage complex order cycles
|
||||
', js: true do
|
||||
include AdminHelper
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
include WebHelper
|
||||
|
||||
describe "editing an order cycle with multiple pages of products", js: true do
|
||||
|
||||
@@ -7,7 +7,7 @@ feature '
|
||||
I want to manage complex order cycles
|
||||
', js: true do
|
||||
include AdminHelper
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
include WebHelper
|
||||
|
||||
scenario "editing an order cycle" do
|
||||
|
||||
@@ -7,7 +7,7 @@ feature '
|
||||
I want to create/update complex order cycles with a specific time
|
||||
', js: true do
|
||||
include AdminHelper
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
include WebHelper
|
||||
|
||||
let(:order_cycle_opening_time) { Time.zone.local(2040, 11, 0o6, 0o6, 0o0, 0o0).strftime("%F %T %z") }
|
||||
|
||||
@@ -7,7 +7,7 @@ feature '
|
||||
I want to list and filter order cycles
|
||||
', js: true do
|
||||
include AdminHelper
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
include WebHelper
|
||||
|
||||
scenario "listing and filtering order cycles" do
|
||||
|
||||
@@ -7,7 +7,7 @@ feature '
|
||||
I want to manage simple order cycles
|
||||
', js: true do
|
||||
include AdminHelper
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
include WebHelper
|
||||
|
||||
scenario "updating many order cycle opening/closing times at once", js: true do
|
||||
|
||||
@@ -6,7 +6,7 @@ feature '
|
||||
As an administrator
|
||||
I want to be alerted when I navigate away from a dirty order cycle form
|
||||
', js: true do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
|
||||
scenario "alert when navigating away from dirty form" do
|
||||
# Given a 'complex' order cycle form
|
||||
|
||||
@@ -7,7 +7,7 @@ feature '
|
||||
I want to print a ticket for an order
|
||||
', js: true do
|
||||
include CheckoutHelper
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
include ActionView::Helpers::NumberHelper
|
||||
|
||||
context "as an enterprise manager" do
|
||||
|
||||
@@ -7,7 +7,7 @@ feature '
|
||||
I want to create and edit orders
|
||||
', js: true do
|
||||
include WebHelper
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
|
||||
let(:user) { create(:user) }
|
||||
let(:product) { create(:simple_product) }
|
||||
|
||||
@@ -6,7 +6,7 @@ feature '
|
||||
As an administrator
|
||||
I want to manage orders
|
||||
', js: true do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
include WebHelper
|
||||
|
||||
let(:user) { create(:user) }
|
||||
|
||||
@@ -5,7 +5,7 @@ feature '
|
||||
I want to be given information about the state of my enterprises, products and order cycles
|
||||
', js: true do
|
||||
include WebHelper
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
include ::Spree::TestingSupport::AuthorizationHelpers
|
||||
|
||||
context "as an enterprise user" do
|
||||
|
||||
@@ -5,7 +5,7 @@ feature '
|
||||
I want to be able to set a distributor on each payment method
|
||||
' do
|
||||
include WebHelper
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
|
||||
background do
|
||||
@distributors = (1..3).map { create(:distributor_enterprise) }
|
||||
|
||||
@@ -4,7 +4,7 @@ feature '
|
||||
As an admin
|
||||
I want to manage payments
|
||||
' do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
|
||||
let(:order) { create(:completed_order_with_fees) }
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ require 'open_food_network/permissions'
|
||||
|
||||
feature "Product Import", js: true do
|
||||
include AdminHelper
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
include WebHelper
|
||||
|
||||
let!(:admin) { create(:admin_user) }
|
||||
|
||||
@@ -5,7 +5,7 @@ feature '
|
||||
I want to set a supplier and distributor(s) for a product
|
||||
' do
|
||||
include WebHelper
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
|
||||
let!(:taxon) { create(:taxon) }
|
||||
let!(:stock_location) { create(:stock_location, backorderable_default: false) }
|
||||
|
||||
@@ -6,7 +6,7 @@ feature '
|
||||
As an admin
|
||||
I want to manage product properties
|
||||
' do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
|
||||
scenario "creating and editing a property" do
|
||||
login_as_admin_and_visit spree.admin_properties_path
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require "spec_helper"
|
||||
|
||||
feature "Packing Reports", js: true do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
include WebHelper
|
||||
|
||||
let(:distributor) { create(:distributor_enterprise) }
|
||||
|
||||
@@ -5,7 +5,7 @@ feature '
|
||||
I want numbers, all the numbers!
|
||||
' do
|
||||
include WebHelper
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
|
||||
context "Permissions for different reports" do
|
||||
context "As an enterprise user" do
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require 'spec_helper'
|
||||
|
||||
feature 'Schedules', js: true do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
include WebHelper
|
||||
|
||||
context "as an enterprise user" do
|
||||
|
||||
@@ -2,7 +2,7 @@ require 'spec_helper'
|
||||
|
||||
feature 'shipping methods' do
|
||||
include WebHelper
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
|
||||
before :each do
|
||||
@shipping_method = create(:shipping_method)
|
||||
|
||||
@@ -2,7 +2,7 @@ require 'spec_helper'
|
||||
|
||||
feature 'Subscriptions' do
|
||||
include AdminHelper
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
include WebHelper
|
||||
|
||||
context "as an enterprise user", js: true do
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require 'spec_helper'
|
||||
|
||||
feature 'Tag Rules', js: true do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
include WebHelper
|
||||
|
||||
let!(:enterprise) { create(:distributor_enterprise) }
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require 'spec_helper'
|
||||
|
||||
feature 'Account and Billing Settings' do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
include WebHelper
|
||||
|
||||
describe "updating" do
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require "spec_helper"
|
||||
|
||||
feature "Managing users" do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
include OpenFoodNetwork::EmailHelper
|
||||
|
||||
context "as super-admin" do
|
||||
|
||||
@@ -6,7 +6,7 @@ feature "
|
||||
Without affecting other hubs that share the same products
|
||||
", js: true do
|
||||
include AdminHelper
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
include WebHelper
|
||||
|
||||
context "as the manager of a hub" do
|
||||
|
||||
@@ -4,7 +4,7 @@ feature '
|
||||
As an admin
|
||||
I want to manage product variants
|
||||
' do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
include WebHelper
|
||||
|
||||
scenario "creating a new variant" do
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require 'spec_helper'
|
||||
|
||||
feature "Credit Cards", js: true do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
describe "as a logged in user" do
|
||||
let(:user) { create(:user) }
|
||||
let!(:customer) { create(:customer, user: user) }
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require 'spec_helper'
|
||||
|
||||
feature "Account Settings", js: true do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
include OpenFoodNetwork::EmailHelper
|
||||
|
||||
describe "as a logged in user" do
|
||||
|
||||
@@ -6,7 +6,7 @@ feature '
|
||||
and view any outstanding balance.
|
||||
', js: true do
|
||||
include UIComponentHelper
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
|
||||
let(:user) { create(:user) }
|
||||
let!(:distributor1) { create(:distributor_enterprise) }
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require 'spec_helper'
|
||||
|
||||
feature "Authentication", js: true do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
include UIComponentHelper
|
||||
include OpenFoodNetwork::EmailHelper
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require 'spec_helper'
|
||||
|
||||
feature 'Groups', js: true do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
include UIComponentHelper
|
||||
|
||||
let(:enterprise) { create(:distributor_enterprise) }
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require 'spec_helper'
|
||||
|
||||
feature 'Multilingual', js: true do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
include WebHelper
|
||||
include ShopWorkflow
|
||||
include UIComponentHelper
|
||||
|
||||
@@ -5,7 +5,7 @@ feature '
|
||||
I want to see a list of producers
|
||||
So that I can shop at hubs distributing their products
|
||||
', js: true do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
include WebHelper
|
||||
include UIComponentHelper
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require 'spec_helper'
|
||||
|
||||
feature "Registration", js: true do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
include WebHelper
|
||||
|
||||
describe "Registering a Profile" do
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require 'spec_helper'
|
||||
|
||||
feature "full-page cart", js: true do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
include WebHelper
|
||||
include ShopWorkflow
|
||||
include UIComponentHelper
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require 'spec_helper'
|
||||
|
||||
feature "As a consumer I want to check out my cart", js: true do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
include WebHelper
|
||||
include ShopWorkflow
|
||||
include CheckoutWorkflow
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require 'spec_helper'
|
||||
|
||||
feature "As a consumer I want to check out my cart", js: true do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
include ShopWorkflow
|
||||
include CheckoutWorkflow
|
||||
include WebHelper
|
||||
|
||||
@@ -2,7 +2,7 @@ require 'spec_helper'
|
||||
|
||||
feature "Using embedded shopfront functionality", js: true do
|
||||
include OpenFoodNetwork::EmbeddedPagesHelper
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
include WebHelper
|
||||
include ShopWorkflow
|
||||
include CheckoutWorkflow
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require 'spec_helper'
|
||||
|
||||
feature "Order Management", js: true do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
include OpenFoodNetwork::EmailHelper
|
||||
|
||||
describe "viewing a completed order" do
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require 'spec_helper'
|
||||
|
||||
feature "As a consumer I want to view products", js: true do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
include WebHelper
|
||||
include ShopWorkflow
|
||||
include UIComponentHelper
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require 'spec_helper'
|
||||
|
||||
feature "As a consumer I want to shop with a distributor", js: true do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
include WebHelper
|
||||
include ShopWorkflow
|
||||
include UIComponentHelper
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require 'spec_helper'
|
||||
|
||||
feature "shopping with variant overrides defined", js: true do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
include WebHelper
|
||||
include ShopWorkflow
|
||||
include CheckoutWorkflow
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require 'spec_helper'
|
||||
|
||||
feature 'Shops', js: true do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
include UIComponentHelper
|
||||
include WebHelper
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ require 'spec_helper'
|
||||
require 'open_food_network/orders_and_fulfillments_report'
|
||||
|
||||
describe OpenFoodNetwork::OrdersAndFulfillmentsReport do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
|
||||
let(:distributor) { create(:distributor_enterprise) }
|
||||
let(:order_cycle) { create(:simple_order_cycle) }
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require 'spec_helper'
|
||||
require 'open_food_network/packing_report'
|
||||
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
|
||||
module OpenFoodNetwork
|
||||
describe PackingReport do
|
||||
|
||||
@@ -2,7 +2,7 @@ require 'spec_helper'
|
||||
|
||||
describe "checking out an order with a Stripe Connect payment method", type: :request do
|
||||
include ShopWorkflow
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
include OpenFoodNetwork::ApiHelper
|
||||
|
||||
let!(:order_cycle) { create(:simple_order_cycle) }
|
||||
|
||||
@@ -4,7 +4,7 @@ require 'spec_helper'
|
||||
|
||||
describe "checking out an order with a Stripe SCA payment method", type: :request do
|
||||
include ShopWorkflow
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
include OpenFoodNetwork::ApiHelper
|
||||
|
||||
let!(:order_cycle) { create(:simple_order_cycle) }
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe "setting response headers for embedded shopfronts", type: :request do
|
||||
include AuthenticationWorkflow
|
||||
include AuthenticationHelper
|
||||
|
||||
let(:enterprise) { create(:distributor_enterprise) }
|
||||
let(:user) { enterprise.owner }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
module AuthenticationWorkflow
|
||||
module AuthenticationHelper
|
||||
include Warden::Test::Helpers
|
||||
|
||||
def login_as(user)
|
||||
@@ -46,7 +46,7 @@ module AuthenticationWorkflow
|
||||
end
|
||||
|
||||
RSpec.configure do |config|
|
||||
config.extend AuthenticationWorkflow, type: :feature
|
||||
config.extend AuthenticationHelper, type: :feature
|
||||
|
||||
# rspec-rails 3 will no longer automatically infer an example group's spec type
|
||||
# from the file location. You can explicitly opt-in to the feature using this
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user