Upgrades and fixes, maintenance

This commit is contained in:
2014-06-09 19:07:46 +02:00
parent 78a894759b
commit 0e4993e8a6
23 changed files with 87 additions and 57 deletions
@@ -29,7 +29,7 @@ end
step "the supplier clicks on the edit product category button" do
within "#product_category_#{@product_category.id}" do
find('.edit-resource-button').click
find('.table-edit').click
end
end
@@ -19,7 +19,7 @@ step "the supplier fills in the new product form selecting the first product cat
end
step "the supplier submits the product form" do
find('.save-product-button').click
find('.form-action-submit').click
end
@@ -38,7 +38,7 @@ end
step "the supplier clicks on the edit product button" do
within ".product-row-#{@product.id}" do
find('.edit-resource-button').click
find('.table-edit').click
end
end
@@ -10,6 +10,7 @@ end
step "the section table should be marked as having an active order" do
table = page.find(".section-table-#{@table.id}")
binding.pry
table['class'].should include 'active_order'
end
@@ -10,7 +10,8 @@ step "the supplier fills in the new table form selecting the first section" do
end
step "the supplier submits the table form" do
find('.save-table-button').click
#find('.save-table-button').click
find('.form-action-submit').click
end
step "the new supplier table with proper properties should have been created" do
@@ -35,12 +35,12 @@ describe ProductCategoryDecorator do
it "shows a dash when it is never visible" do
product_category.stub(:week_days).and_return([0,0,0,0,0,0,0])
subject.visible_on.should include 'icon-eye-close'
subject.visible_on.should include 'product-category-visible-never'
end
it "should display an icon when always visible" do
product_category.stub(:week_days).and_return([1,1,1,1,1,1,1])
subject.visible_on.should include 'icon-refresh'
subject.visible_on.should include 'product-category-visible-always'
end
it "should only display time when all days active and time range given" do
+2
View File
@@ -17,6 +17,7 @@ describe Supplier do
end
it 'cleans counter values if orders are no longer available' do
old_connection = Qwaiter::Counter.connection
# this spec should run on the couchbase database
Qwaiter::Counter.connection = $cb
supplier = create :supplier
@@ -24,6 +25,7 @@ describe Supplier do
supplier.orders_placed_count.should == 9
Supplier.reset_counters!
supplier.orders_placed_count.should == 0
Qwaiter::Counter.connection = old_connection
end
end
+2 -2
View File
@@ -44,8 +44,6 @@ module SpecSelectorHelpers
end
end
# NOT THREADSAFE!!!!!! but good enough for testing since the real couchbase flush is slowwwwww....
Qwaiter::Counter.connection = InMemoryQCounter.new
class Couchbase::View
alias :old_initialize :initialize
def initialize(bucket, endpoint, params = {})
@@ -108,6 +106,8 @@ RSpec.configure do |config|
#config.use_transactional_fixtures = true
config.before :suite do
Qwaiter::Couchbase.load_design_docs!
# NOT THREADSAFE!!!!!! but good enough for testing since the real couchbase flush is slowwwwww....
Qwaiter::Counter.connection = InMemoryQCounter.new
end
config.before :each do