Play now for visitors
This commit is contained in:
parent
441242a044
commit
2c3d69dffa
@ -13,7 +13,7 @@ Rails.application.routes.draw do
|
|||||||
|
|
||||||
mount Upmin::Engine => '/admin'
|
mount Upmin::Engine => '/admin'
|
||||||
root to: 'visitors#index'
|
root to: 'visitors#index'
|
||||||
get '/quick-play', to: 'games#play_now', as: 'play_now'
|
get '/play-now', to: 'games#play_now', as: 'play_now'
|
||||||
devise_for :users, controllers: { registrations: "users/registrations" }
|
devise_for :users, controllers: { registrations: "users/registrations" }
|
||||||
resources :users
|
resources :users
|
||||||
get '/loaderio-456644f4db1fcd1e8578be882d2fc476.txt', to: redirect('/assets/loaderio-456644f4db1fcd1e8578be882d2fc476.txt')
|
get '/loaderio-456644f4db1fcd1e8578be882d2fc476.txt', to: redirect('/assets/loaderio-456644f4db1fcd1e8578be882d2fc476.txt')
|
||||||
|
|||||||
@ -12,4 +12,25 @@ feature 'Navigation links', :devise do
|
|||||||
expect(page).to have_content 'Sign in'
|
expect(page).to have_content 'Sign in'
|
||||||
expect(page).to have_content 'Sign up'
|
expect(page).to have_content 'Sign up'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Scenario: Follow navigation links
|
||||||
|
# Given I am a visitor
|
||||||
|
# When I click a navigation link
|
||||||
|
# Then I see the proper web page
|
||||||
|
scenario 'follow navigation links', js: :true do
|
||||||
|
visit root_path
|
||||||
|
@links = {
|
||||||
|
'Play Now': '"/games/1"',
|
||||||
|
'Browse Tables': 'tables_path',
|
||||||
|
#'Tutorial': 'tutorial_path'
|
||||||
|
}
|
||||||
|
@links.each do |link|
|
||||||
|
click_link link[0]
|
||||||
|
#TODO: Remove race condition
|
||||||
|
sleep 1
|
||||||
|
expect(page.current_path).to eq(eval(link[1]))
|
||||||
|
visit root_path
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user