Merge pull request #8440 from filipefurtad0/admin_into_system

Admin into system
This commit is contained in:
Matt-Yorkley
2021-11-02 19:22:13 +00:00
committed by GitHub
10 changed files with 13 additions and 12 deletions

View File

@@ -7,6 +7,7 @@ ENV["RAILS_ENV"] ||= 'test'
require 'simplecov' if ENV["COVERAGE"]
require 'rubygems'
require 'pry' unless ENV['CI']
require 'view_component/test_helpers'
require_relative "../config/environment"
require 'rspec/rails'

View File

@@ -1,6 +1,6 @@
# frozen_string_literal: true
require 'spec_helper'
require 'system_helper'
describe 'Multilingual', js: true do
include AuthenticationHelper

View File

@@ -1,6 +1,6 @@
# frozen_string_literal: true
require 'spec_helper'
require 'system_helper'
describe '
As an administrator

View File

@@ -1,6 +1,6 @@
# frozen_string_literal: true
require "spec_helper"
require "system_helper"
describe '
As an administrator

View File

@@ -1,6 +1,6 @@
# frozen_string_literal: true
require "spec_helper"
require "system_helper"
describe '
As an administrator
@@ -90,7 +90,7 @@ describe '
select2_select product.name, from: 'add_variant_id', search: true
find('button.add_variant').click
page.has_selector? "table.index tbody[data-hook='admin_order_form_line_items'] tr" # Wait for JS
expect(page).to have_selector 'td', text: product.name
expect(order.line_items.reload.map(&:product)).to include product
end

View File

@@ -1,6 +1,6 @@
# frozen_string_literal: true
require 'spec_helper'
require 'system_helper'
describe '
As a backend user

View File

@@ -1,6 +1,6 @@
# frozen_string_literal: true
require "spec_helper"
require "system_helper"
describe '
As a Super Admin

View File

@@ -1,6 +1,6 @@
# frozen_string_literal: true
require 'spec_helper'
require 'system_helper'
describe '
As an admin

View File

@@ -1,6 +1,6 @@
# frozen_string_literal: true
require 'spec_helper'
require 'system_helper'
describe '
As an hub manager

View File

@@ -1,6 +1,6 @@
# frozen_string_literal: false
require 'spec_helper'
require 'system_helper'
require 'open_food_network/permissions'
describe "Product Import", js: true do
@@ -661,7 +661,7 @@ describe "Product Import", js: true do
let!(:tax_category) { create(:tax_category, name: "Tax Category Name") }
let!(:shipping_category) { create(:shipping_category, name: "Shipping Category Name") }
let!(:csv_file) { file_fixture('sample_file_120_products.csv') }
let!(:csv_file) { Rails.root.join('spec/fixtures/files/sample_file_120_products.csv') }
before do
login_as admin
@@ -715,7 +715,7 @@ describe "Product Import", js: true do
def expect_progress_percentages(*percentages)
percentages.each do |percentage|
expect(page).to have_selector ".progress-interface", text: percentage
page.has_selector? ".progress-interface", text: percentage # Waits for progress bar
end
end