mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-13 04:00:21 +00:00
Merge branch 'master' into products-caching
Conflicts: spec/features/admin/variant_overrides_spec.rb
This commit is contained in:
@@ -47,7 +47,7 @@ feature %q{
|
||||
|
||||
fill_in 'enterprise_contact', :with => 'Kirsten or Ren'
|
||||
fill_in 'enterprise_phone', :with => '0413 897 321'
|
||||
fill_in 'enterprise_email', :with => 'info@eaterprises.com.au'
|
||||
fill_in 'enterprise_email_address', :with => 'info@eaterprises.com.au'
|
||||
fill_in 'enterprise_website', :with => 'http://eaterprises.com.au'
|
||||
|
||||
fill_in 'enterprise_address_attributes_address1', :with => '35 Ballantyne St'
|
||||
@@ -130,7 +130,7 @@ feature %q{
|
||||
click_link "Contact"
|
||||
fill_in 'enterprise_contact', :with => 'Kirsten or Ren'
|
||||
fill_in 'enterprise_phone', :with => '0413 897 321'
|
||||
fill_in 'enterprise_email', :with => 'info@eaterprises.com.au'
|
||||
fill_in 'enterprise_email_address', :with => 'info@eaterprises.com.au'
|
||||
fill_in 'enterprise_website', :with => 'http://eaterprises.com.au'
|
||||
|
||||
click_link "Social"
|
||||
@@ -312,7 +312,7 @@ feature %q{
|
||||
click_link 'Enterprises'
|
||||
click_link 'New Enterprise'
|
||||
fill_in 'enterprise_name', with: 'zzz'
|
||||
fill_in 'enterprise_email', with: 'bob@example.com'
|
||||
fill_in 'enterprise_email_address', with: 'bob@example.com'
|
||||
fill_in 'enterprise_address_attributes_address1', with: 'z'
|
||||
fill_in 'enterprise_address_attributes_city', with: 'z'
|
||||
fill_in 'enterprise_address_attributes_zipcode', with: 'z'
|
||||
|
||||
@@ -44,7 +44,7 @@ feature %q{
|
||||
select2_select "PayPal Express", from: "payment_method_type"
|
||||
click_button 'Update'
|
||||
|
||||
expect(flash_message).to eq 'Payment Method has been successfully updated!'
|
||||
flash_message.should eq 'Payment Method has been successfully updated!'
|
||||
|
||||
payment_method = Spree::PaymentMethod.find_by_name('New PM Name')
|
||||
expect(payment_method.distributors).to include @distributors[1], @distributors[2]
|
||||
|
||||
@@ -84,7 +84,7 @@ feature %q{
|
||||
expect(page).to have_selector "#v_#{variant_related.id}"
|
||||
select2_select producer.name, from: 'producer_filter'
|
||||
expect(page).to have_selector "#v_#{variant.id}"
|
||||
expect(page).to_not have_selector "#v_#{variant_related.id}"
|
||||
expect(page).to have_no_selector "#v_#{variant_related.id}"
|
||||
select2_select 'All', from: 'producer_filter'
|
||||
|
||||
# Filters based on the quick search box
|
||||
@@ -92,7 +92,7 @@ feature %q{
|
||||
expect(page).to have_selector "#v_#{variant_related.id}"
|
||||
fill_in 'query', with: product.name
|
||||
expect(page).to have_selector "#v_#{variant.id}"
|
||||
expect(page).to_not have_selector "#v_#{variant_related.id}"
|
||||
expect(page).to have_no_selector "#v_#{variant_related.id}"
|
||||
fill_in 'query', with: ''
|
||||
|
||||
# Clears the filters
|
||||
@@ -100,8 +100,8 @@ feature %q{
|
||||
expect(page).to have_selector "tr#v_#{variant_related.id}"
|
||||
select2_select producer.name, from: 'producer_filter'
|
||||
fill_in 'query', with: product_related.name
|
||||
expect(page).to_not have_selector "tr#v_#{variant.id}"
|
||||
expect(page).to_not have_selector "tr#v_#{variant_related.id}"
|
||||
expect(page).to have_no_selector "tr#v_#{variant.id}"
|
||||
expect(page).to have_no_selector "tr#v_#{variant_related.id}"
|
||||
click_button 'Clear All'
|
||||
expect(page).to have_selector "tr#v_#{variant.id}"
|
||||
expect(page).to have_selector "tr#v_#{variant_related.id}"
|
||||
@@ -113,15 +113,15 @@ feature %q{
|
||||
expect(page).to have_selector "tr#v_#{variant.id}"
|
||||
expect(page).to have_selector "tr#v_#{variant_related.id}"
|
||||
within "tr#v_#{variant.id}" do click_button 'Hide' end
|
||||
expect(page).to_not have_selector "tr#v_#{variant.id}"
|
||||
expect(page).to have_no_selector "tr#v_#{variant.id}"
|
||||
expect(page).to have_selector "tr#v_#{variant_related.id}"
|
||||
first("div#views-dropdown").click
|
||||
first("div#views-dropdown div.menu div.menu_item", text: "Hidden Products").click
|
||||
expect(page).to have_selector "tr#v_#{variant.id}"
|
||||
expect(page).to_not have_selector "tr#v_#{variant_related.id}"
|
||||
expect(page).to have_no_selector "tr#v_#{variant_related.id}"
|
||||
within "tr#v_#{variant.id}" do click_button 'Add' end
|
||||
expect(page).to_not have_selector "tr#v_#{variant.id}"
|
||||
expect(page).to_not have_selector "tr#v_#{variant_related.id}"
|
||||
expect(page).to have_no_selector "tr#v_#{variant.id}"
|
||||
expect(page).to have_no_selector "tr#v_#{variant_related.id}"
|
||||
first("div#views-dropdown").click
|
||||
first("div#views-dropdown div.menu div.menu_item", text: "Inventory Products").click
|
||||
expect(page).to have_selector "tr#v_#{variant.id}"
|
||||
@@ -319,8 +319,8 @@ feature %q{
|
||||
end
|
||||
|
||||
it "alerts the user to the presence of new products, and allows them to be added or hidden", retry: 3 do
|
||||
expect(page).to_not have_selector "table#variant-overrides tr#v_#{variant1.id}"
|
||||
expect(page).to_not have_selector "table#variant-overrides tr#v_#{variant2.id}"
|
||||
expect(page).to have_no_selector "table#variant-overrides tr#v_#{variant1.id}"
|
||||
expect(page).to have_no_selector "table#variant-overrides tr#v_#{variant2.id}"
|
||||
|
||||
expect(page).to have_selector '.alert-row span.message', text: "There are 1 new products available to add to your inventory."
|
||||
click_button "Review Now"
|
||||
@@ -330,17 +330,17 @@ feature %q{
|
||||
expect(page).to have_selector "table#new-products tr#v_#{variant2.id}"
|
||||
within "table#new-products tr#v_#{variant1.id}" do click_button 'Add' end
|
||||
within "table#new-products tr#v_#{variant2.id}" do click_button 'Hide' end
|
||||
expect(page).to_not have_selector "table#new-products tr#v_#{variant1.id}"
|
||||
expect(page).to_not have_selector "table#new-products tr#v_#{variant2.id}"
|
||||
expect(page).to have_no_selector "table#new-products tr#v_#{variant1.id}"
|
||||
expect(page).to have_no_selector "table#new-products tr#v_#{variant2.id}"
|
||||
click_button "Back to my inventory"
|
||||
|
||||
expect(page).to have_selector "table#variant-overrides tr#v_#{variant1.id}"
|
||||
expect(page).to_not have_selector "table#variant-overrides tr#v_#{variant2.id}"
|
||||
expect(page).to have_no_selector "table#variant-overrides tr#v_#{variant2.id}"
|
||||
|
||||
first("div#views-dropdown").click
|
||||
first("div#views-dropdown div.menu div.menu_item", text: "Hidden Products").click
|
||||
|
||||
expect(page).to_not have_selector "table#hidden-products tr#v_#{variant1.id}"
|
||||
expect(page).to have_no_selector "table#hidden-products tr#v_#{variant1.id}"
|
||||
expect(page).to have_selector "table#hidden-products tr#v_#{variant2.id}"
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user