[logaling-commit] logaling/logaling-server [master] Add scenario for searching term

Back to archive index

SHIMADA Koji null+****@clear*****
Thu Aug 23 02:18:02 JST 2012


SHIMADA Koji	2012-08-23 02:18:02 +0900 (Thu, 23 Aug 2012)

  New Revision: fc27bfc3b730514627d0e8f86a5ca2f506ccea81
  https://github.com/logaling/logaling-server/commit/fc27bfc3b730514627d0e8f86a5ca2f506ccea81

  Log:
    Add scenario for searching term

  Added files:
    features/search_term.feature
  Modified files:
    app/views/layouts/application.html.haml
    features/step_definitions/project_steps.rb

  Modified: app/views/layouts/application.html.haml (+1 -0)
===================================================================
--- app/views/layouts/application.html.haml    2012-08-23 01:38:34 +0900 (b7228e8)
+++ app/views/layouts/application.html.haml    2012-08-23 02:18:02 +0900 (93a66f7)
@@ -26,6 +26,7 @@
           = link_to "logaling", root_path, :class => 'brand'
           = form_tag search_path, :method => :get, :class => 'navbar-search pull-left' do
             = text_field_tag :query, @query, :class => 'search-query', :placeholder => 'Search'
+            = submit_tag 'Search', style: 'display: none'
 
     .container
 

  Added: features/search_term.feature (+12 -0) 100644
===================================================================
--- /dev/null
+++ features/search_term.feature    2012-08-23 02:18:02 +0900 (591d079)
@@ -0,0 +1,12 @@
+#language: ja
+
+フィーチャ: 用語を検索したい
+  翻訳者として
+  訳語を選定中の用語を検索したい
+  なぜなら、他の人たちがどう訳しているか気になるからだ
+
+  シナリオ: 登録されている用語の検索
+    前提 "logaling"ユーザの"logaling-server"プロジェクトが登録済みである
+    かつ トップページを表示している
+    もし "logaling server"と検索する
+    ならば "logaling サーバ"と表示されていること

  Modified: features/step_definitions/project_steps.rb (+5 -0)
===================================================================
--- features/step_definitions/project_steps.rb    2012-08-23 01:38:34 +0900 (a80aebb)
+++ features/step_definitions/project_steps.rb    2012-08-23 02:18:02 +0900 (3fc53a4)
@@ -18,6 +18,11 @@ end
   click_on 'Save'
 end
 
+もし /^"([^"]*)"と検索する$/ do |query|
+  fill_in 'query', with: query
+  click_on 'Search'
+end
+
 ならば /^"([^"]*)"ユーザの"([^"]*)"プロジェクトが登録済みであること$/ do |owner, project|
   visit "/github/#{owner}/#{project}"
   page.should have_content(project)
-------------- next part --------------
An HTML attachment was scrubbed...
Download 



More information about the logaling-commit mailing list
Back to archive index