Commit 6c7e97e6 by Vi Huynh

init

parents
source 'https://rubygems.org'
group :development, :test do
# gem 'rspec-rails'
# gem 'capybara-webkit'
gem 'poltergeist', '1.6.0'
gem 'turnip'
# gem 'spork'
# gem 'spork-rails'
gem 'guard'
end
GEM
remote: https://rubygems.org/
specs:
capybara (2.4.4)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (~> 2.0)
celluloid (0.16.0)
timers (~> 4.0.0)
cliver (0.3.2)
coderay (1.1.0)
diff-lcs (1.2.5)
ffi (1.9.6)
formatador (0.2.5)
gherkin (2.12.2)
multi_json (~> 1.3)
guard (2.8.0)
formatador (>= 0.2.4)
listen (~> 2.7)
lumberjack (~> 1.0)
pry (>= 0.9.12)
thor (>= 0.18.1)
hitimes (1.2.2)
listen (2.7.11)
celluloid (>= 0.15.2)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
lumberjack (1.0.9)
method_source (0.8.2)
mime-types (2.6.1)
mini_portile (0.6.2)
multi_json (1.10.1)
nokogiri (1.6.6.2)
mini_portile (~> 0.6.0)
poltergeist (1.6.0)
capybara (~> 2.1)
cliver (~> 0.3.1)
multi_json (~> 1.0)
websocket-driver (>= 0.2.0)
pry (0.10.1)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
rack (1.6.4)
rack-test (0.6.3)
rack (>= 1.0)
rb-fsevent (0.9.4)
rb-inotify (0.9.5)
ffi (>= 0.5.0)
rspec (3.1.0)
rspec-core (~> 3.1.0)
rspec-expectations (~> 3.1.0)
rspec-mocks (~> 3.1.0)
rspec-core (3.1.7)
rspec-support (~> 3.1.0)
rspec-expectations (3.1.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.1.0)
rspec-mocks (3.1.3)
rspec-support (~> 3.1.0)
rspec-support (3.1.2)
slop (3.6.0)
thor (0.19.1)
timers (4.0.1)
hitimes
turnip (1.2.4)
gherkin (>= 2.5)
rspec (>= 2.14.0, < 4.0)
websocket-driver (0.6.2)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.2)
xpath (2.0.0)
nokogiri (~> 1.3)
PLATFORMS
ruby
DEPENDENCIES
guard
poltergeist (= 1.6.0)
turnip
BUNDLED WITH
1.10.6
# How to install phantomjs
sudo apt-get install -y build-essential chrpath git-core libssl-dev libfontconfig1-dev
git clone git://github.com/ariya/phantomjs.git
cd phantomjs
git checkout 2.0
echo y | ./build.sh
ln -s /home/vagrant/phantomjs/bin/phantomjs /usr/local/bin/phantomjs
cd ..
# How to run test
```
$ brew install phantomjs
$ cd arubaito-ex/e2e
$ rbenv local 2.1.2
$ bundle install
$ bundle exec rspec spec/features/index.feature
```
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require File.expand_path('../config/application', __FILE__)
ArubaitoE2eTest::Application.load_tasks
#!/usr/bin/env ruby
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
load Gem.bin_path('bundler', 'bundle')
Feature: page
Scenario: visit TOPページ
Given access production
When visit '/'
Then response code is '200'
And response include 'アルバイトEXは日本最大級のアルバイト求人情報サイトです'
Scenario: visit /search_result
Given access production
When visit '/jobs/search_result?area_code=0'
Then response code is '200'
And h1 include '関東のアルバイト'
Scenario: visit /city/13101
Given access production
When visit '/city/13101'
Then response code is '200'
Scenario: visit /city/13101/et/01
Given access production
When visit '/city/13101/et/01'
Then response code is '200'
Scenario: visit /city/13101/o/0100
Given access production
When visit '/city/13101/o/0100'
Then response code is '200'
Scenario: visit /city/13101/oh/04
Given access production
When visit '/city/13101/oh/04'
Then response code is '200'
Scenario: visit /city/13101/pr/01
Given access production
When visit '/city/13101/pr/01'
Then response code is '200'
Scenario: visit /city/13101/salary/0100
Given access production
When visit '/city/13101/salary/0100'
Then response code is '200'
Scenario: visit /city/13101/t/1
Given access production
When visit '/city/13101/t/1'
Then response code is '200'
Scenario: visit /city/13103/word/じげん
Given access production
When visit '/city/13103/word/%E3%81%98%E3%81%92%E3%82%93'
Then response code is '200'
Scenario: visit /employment_type/01
Given access production
When visit '/employment_type/01'
Then response code is '200'
Scenario: visit /kanto
Given access production
When visit '/kanto'
Then response code is '200'
Scenario: visit /kanto/kougaku
Given access production
When visit '/kanto/kougaku'
Then response code is '200'
Scenario: visit /kanto/occupation/1200
Given access production
When visit '/kanto/occupation/1200'
Then response code is '200'
Scenario: visit /kanto/office_hour/01
Given access production
When visit '/kanto/office_hour/01'
Then response code is '200'
Scenario: visit /kanto/partner/an
Given access production
When visit '/kanto/partner/an'
Then response code is '200'
Scenario: visit /kanto/pr/01
Given access production
When visit '/kanto/pr/01'
Then response code is '200'
Scenario: visit /kanto/pref/13/word/じげん
Given access production
When visit '/kanto/pref/13/word/%E3%81%98%E3%81%92%E3%82%93'
Then response code is '200'
Scenario: visit /kanto/resort
Given access production
When visit '/kanto/resort'
Then response code is '200'
Scenario: visit /kanto/resort/word/箱根
Given access production
When visit '/kanto/resort/word/%E7%AE%B1%E6%A0%B9'
Then response code is '200'
Scenario: visit /kanto/salary/hourly/1000
Given access production
When visit '/kanto/salary/hourly/1000'
Then response code is '200'
Scenario: visit /kanto/salary/daily/10000
Given access production
When visit '/kanto/salary/daily/10000'
Then response code is '200'
Scenario: visit /kanto/station/赤坂駅
Given access production
When visit '/kanto/station/%E8%B5%A4%E5%9D%82%E9%A7%85'
Then response code is '200'
Scenario: visit /kanto/tanki
Given access production
When visit '/kanto/tanki'
Then response code is '200'
Scenario: visit /kanto/tanki/station/新宿駅
Given access production
When visit '/kanto/tanki/station/%E6%96%B0%E5%AE%BF%E9%A7%85'
Then response code is '200'
Scenario: visit /kanto/tanki_city/13101
Given access production
When visit '/kanto/tanki_city/13101'
Then response code is '200'
Scenario: visit /kanto/tanki_pref/13
Given access production
When visit '/kanto/tanki_pref/13'
Then response code is '200'
Scenario: visit /kanto/term/1
Given access production
When visit '/kanto/term/1'
Then response code is '200'
Scenario: visit /kanto/term/1/station/赤坂駅
Given access production
When visit '/kanto/term/1/station/%E8%B5%A4%E5%9D%82%E9%A7%85'
Then response code is '200'
Scenario: visit /kanto/word/じげん
Given access production
When visit '/kanto/word/%E3%81%98%E3%81%92%E3%82%93'
Then response code is '200'
Scenario: visit /p/tokyo/employment_type/01
Given access production
When visit '/p/tokyo/employment_type/01'
Then response code is '200'
Scenario: visit /p/tokyo/occupation/0100
Given access production
When visit '/p/tokyo/occupation/0100'
Then response code is '200'
Scenario: visit /p/tokyo/office_hour/01
Given access production
When visit '/p/tokyo/office_hour/01'
Then response code is '200'
Scenario: visit /p/tokyo/pr/01
Given access production
When visit '/p/tokyo/pr/01'
Then response code is '200'
Scenario: visit /p/tokyo/term/1
Given access production
When visit '/p/tokyo/term/1'
Then response code is '200'
Scenario: visit /pr/01
Given access production
When visit '/pr/01'
Then response code is '200'
Scenario: visit /s/gunma/resort
Given access production
When visit '/s/gunma/resort'
Then response code is '200'
Scenario: visit /tanki
Given access production
When visit '/tanki'
Then response code is '200'
Scenario: visit /town/13101/飯田橋
Given access production
When visit '/town/13101/%E9%A3%AF%E7%94%B0%E6%A9%8B'
Then response code is '200'
Scenario: visit /search/kw/居酒屋/loc/新宿
Given access production
When visit '/search/kw/%E5%B1%85%E9%85%92%E5%B1%8B/loc/%E6%96%B0%E5%AE%BF'
Then response code is '200'
Scenario: visit /search/kw/居酒屋
Given access production
When visit '/search/kw/%E5%B1%85%E9%85%92%E5%B1%8B'
Then response code is '200'
Scenario: visit /search/loc/新宿
Given access production
When visit '/search/loc/%E6%96%B0%E5%AE%BF'
Then response code is '200'
Scenario: visit /search/loc/新宿
Given access production
When visit '/search/loc/%E6%96%B0%E5%AE%BF'
Then response code is '200'
Scenario: visit /search/kw/ファミリーレストラン/loc/新宿
Given access production
When visit '/search/kw/%E3%83%95%E3%82%A1%E3%83%9F%E3%83%AA%E3%83%BC%E3%83%AC%E3%82%B9%E3%83%88%E3%83%A9%E3%83%B3/loc/%E6%96%B0%E5%AE%BF'
Then response code is '200'
Scenario: visit /search/loc/東京都?occupations[]=アパレル
Given access production
When visit '/search/loc/%E6%9D%B1%E4%BA%AC%E9%83%BD?occupations%5B%5D=%E3%82%A2%E3%83%91%E3%83%AC%E3%83%AB'
Then response code is '200'
Scenario: visit /search/loc/東京都?terms[]=単発
Given access production
When visit '/search/loc/%E6%9D%B1%E4%BA%AC%E9%83%BD?terms%5B%5D=%E5%8D%98%E7%99%BA'
Then response code is '200'
Scenario: visit /search/loc/東京都?preferences[]=友達同士
Given access production
When visit '/search/loc/%E6%9D%B1%E4%BA%AC%E9%83%BD?preferences%5B%5D=%E5%8F%8B%E9%81%94%E5%90%8C%E5%A3%AB'
Then response code is '200'
Scenario: visit /search/loc/東京都?shifts%5B%5D=土日のみ
Given access production
When visit '/search/loc/%E6%9D%B1%E4%BA%AC%E9%83%BD?shifts%5B%5D=%E5%9C%9F%E6%97%A5%E3%81%AE%E3%81%BF'
Then response code is '200'
Scenario: visit /search/loc/東京都?employments%5B%5D=アルバイト
Given access production
When visit '/search/loc/%E6%9D%B1%E4%BA%AC%E9%83%BD?employments%5B%5D=%E3%82%A2%E3%83%AB%E3%83%90%E3%82%A4%E3%83%88'
Then response code is '200'
Scenario: visit /search/loc/東京都?min_salary_hourly=時給700円〜
Given access production
When visit '/search/loc/%E6%9D%B1%E4%BA%AC%E9%83%BD?min_salary_hourly=%E6%99%82%E7%B5%A6700%E5%86%86%E3%80%9C'
Then response code is '200'
Scenario: visit /search/loc/東京都?publications[]=掲載終了間近
Given access production
When visit '/search/loc/%E6%9D%B1%E4%BA%AC%E9%83%BD?publications%5B%5D=%E6%8E%B2%E8%BC%89%E7%B5%82%E4%BA%86%E9%96%93%E8%BF%91'
Then response code is '200'
Scenario: visit /search/loc/東京都?exceptions[]=医療系求人を除く
Given access production
When visit '/search/loc/%E6%9D%B1%E4%BA%AC%E9%83%BD?exceptions%5B%5D=%E5%8C%BB%E7%99%82%E7%B3%BB%E6%B1%82%E4%BA%BA%E3%82%92%E9%99%A4%E3%81%8F'
Then response code is '200'
# # 固定ID部分を修正したい
# Scenario: visit /jobs/history
# Given access production
# Given get_sample_job_id
# When visit_sample_job_page
# And click link '/jobs/history'
# Then response code is '200'
# And check_cookies_has_sample_job
# And have_link_with_sample_job
Scenario: visit /temporary
Given access production
When visit '/temporary'
Then response code is '200'
Scenario: visit /jobs/search
Given access production
When visit '/jobs/search'
Then response code is '200'
Scenario: visit job page
Given access production
Given get_sample_job_id
When visit_sample_job_page
Then response code is '200'
# 固定IP部分を修正したい
Scenario: visit entry page
Given access production
Given get_sample_job_id
When visit_sample_entry_page
Then response code is '200'
# Scenario: visit /entries/confirm
# Given access production
# When visit '/entries/confirm'
# Then response code is '200'
# Scenario: visit /account/login, login with email not exists
# Given access production
# When visit '/account/login'
# And fill in 'zusers[email]' with 'email@example.com'
# And fill in 'zusers[password]' with 'password'
# And click button by class 'btnLogin'
# Then response code is '200'
# And response include '登録されていないメールアドレスです'
# Scenario: visit /account/login with email and password correct
# Given access production
# When visit '/account/login'
# And fill in 'zusers[email]' with 'vihc@zigexn.vn'
# And fill in 'zusers[password]' with '123456789'
# And click button by class 'btnLogin'
# Then response code is '200'
# And response include '応募履歴'
# 絞込検索
# 勤務地絞込
Scenario: visit /search/filter?selected_location[]=渋谷マークシティ
Given access production
Given use smartphone
When visit '/search/filter?selected_location[]=%E6%B8%8B%E8%B0%B7%E3%83%9E%E3%83%BC%E3%82%AF%E3%82%B7%E3%83%86%E3%82%A3'
Then response code is '200'
And textbox include '渋谷マークシティ'
Scenario: visit /search/refine?screen_code=1
Given access production
Given use smartphone
When visit '/search/refine?screen_code=1'
Then response code is '200'
And response include '関東'
Scenario: visit /search/refine?keywords=&locations=&min_salary_hourly=&screen_code=3&selected=神奈川県
Given access production
Given use smartphone
When visit '/search/refine?keywords=&locations=&min_salary_hourly=&screen_code=3&selected=%E7%A5%9E%E5%A5%88%E5%B7%9D%E7%9C%8C'
Then response code is '200'
And response include '横浜市'
Scenario: visit /search/refine?screen_code=5&selected=渋谷
Given access production
Given use smartphone
When visit '/search/refine?screen_code=5&selected=%E6%B8%8B%E8%B0%B7'
Then response code is '200'
And response include '渋谷マークシティ'
Scenario: visit /search/loc/歌舞伎町
Given access production
Given use smartphone
When visit '/search/loc/%E6%AD%8C%E8%88%9E%E4%BC%8E%E7%94%BA'
Then response code is '200'
And response include '歌舞伎町'
Scenario: visit /search/filter?locations=歌舞伎町&keywords=
Given access production
Given use smartphone
When visit '/search/filter?locations=%E6%AD%8C%E8%88%9E%E4%BC%8E%E7%94%BA&keywords=&selected_location[]=%E6%AD%8C%E8%88%9E%E4%BC%8E%E7%94%BA'
Then response code is '200'
And textbox include '歌舞伎町'
Scenario: visit /search/refine?locations=歌舞伎町&keywords=&min_salary_hourly=&screen_code=1&selected=
Given access production
Given use smartphone
When visit '/search/refine?locations=%E6%AD%8C%E8%88%9E%E4%BC%8E%E7%94%BA&keywords=&min_salary_hourly=&screen_code=1&selected='
Then response code is '200'
And response include '関東'
Scenario: visit /search/refine?keywords=&locations=歌舞伎町&min_salary_hourly=&screen_code=3&selected=神奈川県
Given access production
Given use smartphone
When visit '/search/refine?keywords=&locations=%E6%AD%8C%E8%88%9E%E4%BC%8E%E7%94%BA&min_salary_hourly=&screen_code=3&selected=%E7%A5%9E%E5%A5%88%E5%B7%9D%E7%9C%8C'
Then response code is '200'
And response include '横浜市'
# ジャンプ機能
Scenario: visit '/search/refine?locations=横浜市鶴見区&screen_code=2'
Given access production
Given use smartphone
When visit '/search/refine?locations=%E6%A8%AA%E6%B5%9C%E5%B8%82%E9%B6%B4%E8%A6%8B%E5%8C%BA&screen_code=2'
Then response code is '200'
And response include '横浜市鶴見区'
Scenario: visit '/search/refine?locations=横浜市&screen_code=2'
Given access production
Given use smartphone
When visit '/search/refine?locations=%E6%A8%AA%E6%B5%9C%E5%B8%82&screen_code=2'
Then response code is '200'
And response include '横浜市'
Scenario: visit '/search/refine?locations=新宿&screen_code=2'
Given access production
Given use smartphone
When visit '/search/refine?locations=%E6%96%B0%E5%AE%BF&screen_code=2'
Then response code is '200'
And response include '新宿'
Scenario: visit '/search/refine?locations=新宿西口駅&screen_code=2'
Given access production
Given use smartphone
When visit '/search/refine?locations=%E6%96%B0%E5%AE%BF%E8%A5%BF%E5%8F%A3%E9%A7%85&screen_code=2'
Then response code is '200'
And response include '新宿西口駅'
# 職種絞込
Scenario: visit /search/refine?keywords=&locations=東京都&min_salary_hourly=&screen_code=8&selected=アパレル
Given access production
Given use smartphone
When visit '/search/refine?keywords=&locations=%E6%9D%B1%E4%BA%AC%E9%83%BD&min_salary_hourly=&screen_code=8&selected=%E3%82%A2%E3%83%91%E3%83%AC%E3%83%AB'
Then response code is '200'
And response include 'セレクトショップ'
Scenario: visit /search/refine?locations=東京都&keywords=&min_salary_hourly=&screen_code=9&selected=
Given access production
Given use smartphone
When visit '/search/refine?locations=%E6%9D%B1%E4%BA%AC%E9%83%BD&keywords=&min_salary_hourly=&screen_code=9&selected='
Then response code is '200'
And response include '単発'
Scenario: visit /search/refine?locations=東京都&keywords=&min_salary_hourly=&screen_code=11&selected=
Given access production
Given use smartphone
When visit '/search/refine?locations=%E6%9D%B1%E4%BA%AC%E9%83%BD&keywords=&min_salary_hourly=&screen_code=11&selected='
Then response code is '200'
And response include '土日のみ'
Scenario: visit /search/refine?locations=東京都&keywords=&min_salary_hourly=&screen_code=12&selected=
Given access production
Given use smartphone
When visit '/search/refine?locations=%E6%9D%B1%E4%BA%AC%E9%83%BD&keywords=&min_salary_hourly=&screen_code=12&selected='
Then response code is '200'
And response include 'アルバイト'
Scenario: visit /search/filter?locations=歌舞伎町&keywords=居酒屋
Given access production
Given use smartphone
When visit '/search/filter?locations=%E6%AD%8C%E8%88%9E%E4%BC%8E%E7%94%BA&keywords=%E5%B1%85%E9%85%92%E5%B1%8B'
Then response code is '200'
And textbox include '歌舞伎町'
And textbox include '居酒屋'
Scenario: visit /search/kw/居酒屋/loc/歌舞伎町
Given access production
Given use smartphone
When visit '/search/kw/%E5%B1%85%E9%85%92%E5%B1%8B/loc/%E6%AD%8C%E8%88%9E%E4%BC%8E%E7%94%BA'
Then response code is '200'
And textbox include '歌舞伎町'
And textbox include '居酒屋'
Scenario: visit /search/filter?locations=東京都&keywords=&occupations[]=SHIPS
Given access production
Given use smartphone
When visit '/search/filter?locations=%E6%9D%B1%E4%BA%AC%E9%83%BD&keywords=&occupations[]=SHIPS'
Then response code is '200'
And textbox include '東京都'
And response include 'SHIPS'
Scenario: visit /search/loc/東京都?occupations[]=SHIPS
Given access production
Given use smartphone
When visit '/search/loc/%E6%9D%B1%E4%BA%AC%E9%83%BD?occupations[]=SHIPS'
Then response code is '200'
And textbox include '東京都'
And response include 'SHIPS'
Scenario: visit /search/filter?locations=東京都&terms[]=単発
Given access production
Given use smartphone
When visit '/search/filter?locations=%E6%9D%B1%E4%BA%AC%E9%83%BD&terms[]=%E5%8D%98%E7%99%BA'
Then response code is '200'
And textbox include '東京都'
And response include '単発'
Scenario: visit /search/loc/東京都?terms[]=単発
Given access production
Given use smartphone
When visit '/search/loc/%E6%9D%B1%E4%BA%AC%E9%83%BD?terms[]=%E5%8D%98%E7%99%BA'
Then response code is '200'
And textbox include '東京都'
And response include '単発'
Scenario: visit /search/filter?locations=東京都&preferences[]=友達同士
Given access production
Given use smartphone
When visit '/search/filter?locations=%E6%9D%B1%E4%BA%AC%E9%83%BD&preferences[]=%E5%8F%8B%E9%81%94%E5%90%8C%E5%A3%AB'
Then response code is '200'
And textbox include '東京都'
And response include '友達同士の応募OK'
Scenario: visit /search/loc/東京都?preferences[]=友達同士
Given access production
Given use smartphone
When visit '/search/loc/%E6%9D%B1%E4%BA%AC%E9%83%BD?preferences[]=%E5%8F%8B%E9%81%94%E5%90%8C%E5%A3%AB'
Then response code is '200'
And textbox include '東京都'
And response include '友達同士の応募OK'
Scenario: visit /search/filter?locations=東京都&min_salary_hourly=&shifts[]=土日のみ
Given access production
Given use smartphone
When visit '/search/filter?locations=%E6%9D%B1%E4%BA%AC%E9%83%BD&min_salary_hourly=&shifts[]=%E5%9C%9F%E6%97%A5%E3%81%AE%E3%81%BF'
Then response code is '200'
And textbox include '東京都'
And response include '土日のみ'
Scenario: visit /search/loc/東京都?shifts[]=土日のみ
Given access production
Given use smartphone
When visit '/search/loc/%E6%9D%B1%E4%BA%AC%E9%83%BD?shifts[]=%E5%9C%9F%E6%97%A5%E3%81%AE%E3%81%BF'
Then response code is '200'
And textbox include '東京都'
And response include '土日のみ'
Scenario: visit /search/filter?locations=東京都&employments[]=アルバイト
Given access production
Given use smartphone
When visit '/search/filter?locations=%E6%9D%B1%E4%BA%AC%E9%83%BD&employments[]=%E3%82%A2%E3%83%AB%E3%83%90%E3%82%A4%E3%83%88'
Then response code is '200'
And textbox include '東京都'
And response include 'アルバイト'
Scenario: visit /search/loc/東京都?employments[]=アルバイト
Given access production
Given use smartphone
When visit '/search/loc/%E6%9D%B1%E4%BA%AC%E9%83%BD?employments[]=%E3%82%A2%E3%83%AB%E3%83%90%E3%82%A4%E3%83%88'
Then response code is '200'
And textbox include '東京都'
And response include 'アルバイト'
Scenario: visit /search/loc/東京都?min_salary_hourly=時給700円〜
Given access production
Given use smartphone
When visit '/search/loc/%E6%9D%B1%E4%BA%AC%E9%83%BD?min_salary_hourly=%E6%99%82%E7%B5%A6700%E5%86%86%E3%80%9C'
Then response code is '200'
And textbox include '東京都'
Scenario: visit /search/loc/東京都?publications[]=掲載終了間近
Given access production
Given use smartphone
When visit '/search/loc/%E6%9D%B1%E4%BA%AC%E9%83%BD?publications[]=%E6%8E%B2%E8%BC%89%E7%B5%82%E4%BA%86%E9%96%93%E8%BF%91'
Then response code is '200'
And textbox include '東京都'
And response include '掲載終了間近'
Scenario: visit /search/loc/東京都?exceptions[]=医療系求人を除く
Given access production
Given use smartphone
When visit '/search/loc/%E6%9D%B1%E4%BA%AC%E9%83%BD?exceptions[]=%E5%8C%BB%E7%99%82%E7%B3%BB%E6%B1%82%E4%BA%BA%E3%82%92%E9%99%A4%E3%81%8F'
Then response code is '200'
And textbox include '東京都'
And response include '医療系求人を除く'
Scenario: visit /search/refine?locations=東京都&keywords=&min_salary_hourly=&screen_code=10&selected=
Given access production
Given use smartphone
When visit '/search/refine?locations=%E6%9D%B1%E4%BA%AC%E9%83%BD&keywords=&min_salary_hourly=&screen_code=10&selected='
Then response code is '200'
And response include '人気条件'
And response include '友達同士の応募OK'
And response include 'お金'
And response include '日払い・週払いOK'
Scenario: visit /search/filter?locations=&keywords=
Given access production
Given use smartphone
When visit '/search/filter?locations=&keywords='
Then response code is '200'
And response include '勤務地'
And response include 'キーワード'
And response include '職種'
And response include '短期指定'
And response include 'こだわり条件'
And response include 'シフト'
And response include '雇用形態'
And response include '給与'
And response include '掲載期間'
And response include '新着'
And response include '除外条件'
And response include '医療系求人を除く'
# CAUTION: 実際に応募してしまうので、stagingで実行すること
# Scenario: visit /account/register/input
# Given access staging
# When visit '/account/register/input'
# And fill in 'user_data[name_sei]' with 'abc'
# And fill in 'user_data[name_mei]' with '123'
# And fill in 'user_data[name_sei_kana]' with 'キ'
# And fill in 'user_data[name_mei_kana]' with 'ヤマ'
# And checked with id 'user_data_sex_0'
# And selected 'user_data_birthday_1i' with '1996'
# And selected 'user_data_birthday_2i' with '4'
# And selected 'user_data_birthday_3i' with '1'
# And selected 'user_data_current_job_code' with 'フリーター'
# And fill in email
# And fill in 'user_data[password]' with 'abc123'
# And fill in 'user_data[telephone]' with '09012345678'
# And fill in 'user_data[zip_code]' with '1600022'
# And selected 'user_data[prefecture_code]' with '北海道'
# And selected 'user_data_city_code' with '札幌市中央区'
# And fill in 'user_data[town]' with '62730'
# And fill in 'user_data[address]' with 'abc123'
# And click input button by text '規約に同意して入力内容を確認する'
# Then response code is '200'
# And response include '入力内容の確認'
# And click input button by text '上記の内容で登録する'
# And visit '/'
# And response include '応募履歴'
Feature: page
Scenario: PC city_town/:prefecture_code
Given access development
When visit '/city_town/13'
Then response code is '200'
And check metatag 'robots' with 'noindex,follow'
Scenario: PC town_list/:city_code
Given access development
When visit '/town_list/13101'
Then response code is '200'
And check metatag 'robots' with 'noindex,follow'
Scenario: SP city_town/:prefecture_code
Given access development
Given use smartphone
When visit '/city_town/13'
Then response code is '200'
Scenario: SP town_list/:city_code
Given access development
Given use smartphone
When visit '/town_list/13101'
Then response code is '200'
Dir.glob("spec/steps/*_steps.rb") { |f| load f, true }
require 'capybara/dsl'
require 'capybara/rspec'
require 'capybara/poltergeist'
require 'turnip'
require 'turnip/capybara'
Capybara.register_driver :poltergeist do |app|
Capybara::Poltergeist::Driver.new(app,
phantomjs: 'phantomjs',
js_errors: false,
debug: false,
phantomjs_options: ['--load-images=no', '--disk-cache=true'],
timeout: 10
)
end
Capybara.run_server = false
Capybara.default_driver = :poltergeist
Capybara.javascript_driver = :poltergeist
# Capybara.default_driver = :webkit
RSpec.configure do |config|
end
step 'access production' do
Capybara.app_host = 'http://arubaito-ex.jp'
end
step 'access production_ssl' do
Capybara.app_host = 'https://arubaito-ex.jp'
end
step 'access staging' do
Capybara.app_host = 'http://staging.arubaito-ex.jp'
end
step 'access development' do
Capybara.app_host = 'http://localhost:3001'
end
# Get ZIGExN's job item and get it ID
step 'get_sample_job_id' do
visit "http://arubaito-ex.jp/jobs/search_result?keywords=%E6%A0%AA%E5%BC%8F%E4%BC%9A%E7%A4%BE%E3%81%98%E3%81%92%E3%82%93" #=> 株式会社じげん
first(:css, '.jobsResult .jobInfo h2 a')[:href] =~ %r{/jobs/(\d+)}
@latest_job_id = $1.to_i
end
# entry page
step 'visit_sample_entry_page' do
visit "/entries/new?job_ids%5B%5D=#{@latest_job_id}"
end
# jobs page
step 'visit_sample_job_page' do
visit "/jobs/#{@latest_job_id}"
end
step 'check_cookies_has_sample_job' do
expect(page.driver.cookies["history"].value.to_i).to eq(@latest_job_id)
end
step 'have_link_with_sample_job' do
expect(page).to have_selector(%Q{a[href="/jobs/#{@latest_job_id}"]})
end
step 'visit :path' do |path|
visit path
end
step 'response code is :code' do |code|
expect(page.status_code).to eq(code.to_i)
end
step 'response include :string' do |string|
expect(page).to have_content(string)
end
step 'h1 include :string' do |string|
expect(page.find('h1')).to have_content(string)
end
step 'h2 include :string' do |string|
expect(page.find('h2')).to have_content(string)
end
step 'textbox include :string' do |string|
expect(page).to have_selector("input[value=#{string}]")
end
step 'table include :string' do |string|
expect(page).to have_selector("li[value=#{string}]")
end
step 'click link :link' do |link|
first(:xpath, "//a[@href='" + link + "']").click
end
step 'fill in :field_name with :value' do |field_name, value|
fill_in field_name, with: value, :match => :first
end
step 'click button by class :class_name' do |class_name|
first(:xpath, '//input[@class="' + class_name + '"]').click
end
step 'click input button by text :text' do |text|
first(:xpath, '//input[@value="' + text + '"]').click
end
step 'checked with id :id' do |id|
find("##{id}").set(true)
end
step 'selected :field with :value' do |field, value|
select(value, from: field)
end
step 'fill in email' do
fill_in 'user_data[email]', with: "abc#{Time.now.to_i}@gmail.com"
end
step 'use smartphone' do
page.driver.headers = { "User-Agent" => "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" }
end
step 'check metatag :field with :value' do |field, value|
tag = %Q(meta[name="#{field}"][content="#{value}"])
expect(page).to have_css(tag, visible: false)
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment