diff options
author | Joachim Filip Ignacy Bartosik <jbartosik@gmail.com> | 2010-07-15 16:01:46 +0200 |
---|---|---|
committer | Joachim Filip Ignacy Bartosik <jbartosik@gmail.com> | 2010-07-29 19:49:16 +0200 |
commit | 0603ae0d1a6536e5b7f451316a234750f246efc5 (patch) | |
tree | bd9f86a826c3daf2053398ab768ad24c4e86b458 | |
parent | Cover editing questions content with cucumber features (diff) | |
download | recruiting-webapp-0603ae0d1a6536e5b7f451316a234750f246efc5.tar.gz recruiting-webapp-0603ae0d1a6536e5b7f451316a234750f246efc5.tar.bz2 recruiting-webapp-0603ae0d1a6536e5b7f451316a234750f246efc5.zip |
Show instructions when creating new question email content
-rw-r--r-- | app/viewhints/question_content_email_hints.rb | 5 | ||||
-rw-r--r-- | features/answer_text_question.feature | 3 | ||||
-rw-r--r-- | features/clean_ui.feature | 8 | ||||
-rw-r--r-- | features/email_answers.feature | 3 | ||||
-rw-r--r-- | features/support/paths.rb | 3 |
5 files changed, 18 insertions, 4 deletions
diff --git a/app/viewhints/question_content_email_hints.rb b/app/viewhints/question_content_email_hints.rb new file mode 100644 index 0000000..37189ea --- /dev/null +++ b/app/viewhints/question_content_email_hints.rb @@ -0,0 +1,5 @@ +class QuestionContentEmailHints < Hobo::ViewHints + field_help :req_text => "Enter one requirement per line. + Each requirement should be 'Field : regexp to match' (including spaces around colon). + If you want to use colon in field and regexp then escape it with backslash." +end diff --git a/features/answer_text_question.feature b/features/answer_text_question.feature index 79c8ba8..7e17268 100644 --- a/features/answer_text_question.feature +++ b/features/answer_text_question.feature @@ -17,8 +17,7 @@ Feature: Answering text question Scenario: Create and edit text question Given I am logged in as administrator - When I follow "Suggestion questions" - And I follow "New question" + When I follow "New Question" And I fill in "some question" for "question[title]" And I press "Create Question" Then I should see "The question was created successfully" within ".flash.notice" diff --git a/features/clean_ui.feature b/features/clean_ui.feature index c718756..6513ff5 100644 --- a/features/clean_ui.feature +++ b/features/clean_ui.feature @@ -79,3 +79,11 @@ Feature: Clean UI When I am logged in as "recruit" When I am on show "question" question page Then I should not see "Answer it" + + Scenario: Instructions when creating new email question content + Given I am logged in as administrator + And a question "question" + And I am on new email question content for "question" page + Then I should see "Enter one requirement per line." + And I should see "Each requirement should be 'Field : regexp to match' (including spaces around colon)." + And I should see "If you want to use colon in field and regexp then escape it with backslash." diff --git a/features/email_answers.feature b/features/email_answers.feature index 34a4a25..dd23a99 100644 --- a/features/email_answers.feature +++ b/features/email_answers.feature @@ -41,8 +41,7 @@ Feature: gentoo-dev-announce Scenario: Create and edit email question Given I am logged in as administrator - When I follow "Suggestion questions" - And I follow "New question" + When I follow "New Question" And I fill in "some question" for "question[title]" And I press "Create Question" Then I should see "The question was created successfully" within ".flash.notice" diff --git a/features/support/paths.rb b/features/support/paths.rb index d35fb62..95843cc 100644 --- a/features/support/paths.rb +++ b/features/support/paths.rb @@ -52,6 +52,9 @@ module NavigationHelpers when /show "([^\"]*)" question page/ question_path(Question.find_by_title($1)) + + when /new email question content for "([^\"]*)" page/ + new_question_content_email_for_question_path(Question.find_by_title($1)) # Add more mappings here. # Here is an example that pulls values out of the Regexp: # |