Improve supplier settings logick

This commit is contained in:
2014-10-06 10:20:13 +02:00
parent a23760965e
commit ca0bf64568
11 changed files with 46 additions and 9 deletions
+4
View File
@@ -23,3 +23,7 @@ step "the supplier has a night offset of :minutes minutes" do |minutes|
@supplier.night_offset = minutes
@supplier.save
end
step "the supplier name in the page should be :name" do |name|
page.find('.top-menu .supplier-name').text.should == name
end
@@ -22,3 +22,10 @@ end
step "I visit the supplier settings path" do
visit "/supplier#/settings"
end
## ASSERTIONS
step "the supplier should be redirected to the root path" do
ember_route.should == '/'
end
@@ -27,12 +27,17 @@ step "an email should have been sent to the original supplier email with email c
@confirmation_link = confirmation_link_match[1]
end
step "the supplier changes the name to :name in the settings page" do |new_name|
page.find('input.supplier-name').set new_name
end
step "the supplier clicks on the new email confirmation link" do
visit @confirmation_link
end
step "the supplier gets redirected to the supplier settings path" do
route_should_be 'supplier#edit'
step "the supplier should be redirected to the supplier settings path" do
# route_should_be 'supplier#edit'
ember_route.should == '/settings'
end
step "the supplier email is the new email and the unconfirmed email is empty" do