fix for tests, remove open in new tab

This commit is contained in:
Rafael Schouten
2014-10-04 13:12:36 +10:00
parent f3fc70ebf0
commit f0c9e7cd44
2 changed files with 2 additions and 1 deletions

View File

@@ -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) ->

View File

@@ -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'