Files
mozo-backend/spec/acceptance_steps/suppliers/navigation_steps.rb
T
2015-02-24 13:43:44 +01:00

39 lines
910 B
Ruby

step 'visit the supplier sign in path' do
visit '/suppliers/sign_in'
end
step "I visit the supplier root path" do
visit '/supplier' unless page.current_path == '/supplier'
end
step "I visit the supplier section path" do
visit "/supplier#/sections/#{@section.id}"
end
step "I visit the supplier last section path" do
visit "/supplier#/sections/#{@sections.last.id}"
end
step "I should be redirected to the supplier settings page" do
#page.current_path.should == supplier_settings_path
route_should_be 'supplier#edit'
end
step "I visit the supplier settings path" do
visit "/supplier#/settings"
end
step "the supplier visits the menu page" do
visit "/supplier#/menu"
end
## ASSERTIONS
step "the supplier should be redirected to the root path" do
ember_route_should_be '/'
end
step "the supplier employee visits the :path_spec path" do |path_spec|
visit "/supplier#/#{path_spec}"
end