From f0c9e7cd442ed10ad3ede9f38829a2cc21764570 Mon Sep 17 00:00:00 2001 From: Rafael Schouten Date: Sat, 4 Oct 2014 13:12:36 +1000 Subject: [PATCH] fix for tests, remove open in new tab --- app/assets/javascripts/admin/bulk_product_update.js.coffee | 2 +- spec/features/admin/enterprises_spec.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/admin/bulk_product_update.js.coffee b/app/assets/javascripts/admin/bulk_product_update.js.coffee index eee2345b6e..b68e3340e1 100644 --- a/app/assets/javascripts/admin/bulk_product_update.js.coffee +++ b/app/assets/javascripts/admin/bulk_product_update.js.coffee @@ -160,7 +160,7 @@ angular.module("ofn.admin").controller "AdminProductEditCtrl", [ $scope.editWarn = (product, variant) -> if (DirtyProducts.count() > 0 and confirm("Unsaved changes will be lost. Continue anyway?")) or (DirtyProducts.count() == 0) - window.open("/admin/products/" + product.permalink_live + ((if variant then "/variants/" + variant.id else "")) + "/edit") + window.location = "/admin/products/" + product.permalink_live + ((if variant then "/variants/" + variant.id else "")) + "/edit" $scope.addVariant = (product) -> diff --git a/spec/features/admin/enterprises_spec.rb b/spec/features/admin/enterprises_spec.rb index 737dd6bb17..d3d23aabcb 100644 --- a/spec/features/admin/enterprises_spec.rb +++ b/spec/features/admin/enterprises_spec.rb @@ -314,6 +314,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_address_attributes_address1', with: 'z' fill_in 'enterprise_address_attributes_city', with: 'z' fill_in 'enterprise_address_attributes_zipcode', with: 'z'