<commit_before>require 'spec_helper'

feature %q{
  As an Administrator
  I want to be able to manage orders in bulk
} , js: true do
  include AuthenticationWorkflow
  include AuthorizationHelpers
  include WebHelper
  after { Warden.test_reset! }
  stub_authorization!

  context "listing orders" do
    before :each do
      admin_user = quick_login_as_admin
    end

    it "displays a message when number of line items is zero" do
      visit '/admin/orders/bulk_management'
      page.should have_text "No orders found."

    end

    context "displaying the list of line items" do
      let!(:o1) { FactoryGirl.create(:order, state: 'complete', completed_at: Time.now ) }
      let!(:o2) { FactoryGirl.create(:order, state: 'complete', completed_at: Time.now ) }
      let!(:o3) { FactoryGirl.create(:order, state: 'address', completed_at: nil ) }<commit_msg>Pulling out obsolete setup in BOM spec to make it more like BPE spec, see if that helps with intermittent fails<commit_after>require 'spec_helper'

feature %q{
  As an Administrator
  I want to be able to manage orders in bulk
} , js: true do
  include AuthenticationWorkflow
  include WebHelper

  context "listing orders" do
    before :each do
      login_to_admin_section
    end

    it "displays a message when number of line items is zero" do
      visit '/admin/orders/bulk_management'
      page.should have_text "No orders found."
    end

    context "displaying the list of line items" do
      let!(:o1) { FactoryGirl.create(:order, state: 'complete', completed_at: Time.now ) }
      let!(:o2) { FactoryGirl.create(:order, state: 'complete', completed_at: Time.now ) }
      let!(:o3) { FactoryGirl.create(:order, state: 'address', completed_at: nil ) }
{'fraction_non_alphanumeric': 0.0918013856812933, 'fraction_numerical': 0.003464203233256351, 'mean_word_length': 3.609042553191489, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1363972', 'n_tokens_mistral': 535, 'n_tokens_neox': 513, 'n_words': 184}