features/surveyor.feature in surveyor-1.1.0 vs features/surveyor.feature in surveyor-1.2.0
- old
+ new
@@ -332,11 +332,11 @@
And I change "r_1_string_value" to ""
Then the "other" radiobutton should not be checked
# Issue 259 - substitution of the text with Mustache
- @javascript
+ @javascript @mustache
Scenario: Creating a question with an mustache syntax
Given I have survey context of "FakeMustacheContext"
Given I parse
"""
survey "Overall info" do
@@ -362,11 +362,41 @@
And I should see "If you don't know where Santa Claus lives, skip the question"
And I should see "Santa Claus lives on North Pole"
And I should see "Santa Claus lives on South Pole"
And I should see "Santa Claus doesn't exist"
+ # Issue 296 - Mustache rendering doesn't work with simple hash contexts
+ @javascript @mustache
+ Scenario: Creating a question with an mustache syntax
+ Given I have a simple hash context
+ Given I parse
+ """
+ survey "Overall info" do
+ section "Group of questions" do
+ group "Information on {{name}}?", :help_text => "Answer all you know on {{name}}" do
+ label "{{name}} does not work for {{site}}!", :help_text => "Make sure you sure {{name}} doesn't work for {{site}}"
+ q "Where does {{name}} live?", :pick => :one,
+ :help_text => "If you don't know where {{name}} lives, skip the question"
+ a "{{name}} lives on North Pole"
+ a "{{name}} lives on South Pole"
+ a "{{name}} doesn't exist"
+ end
+ end
+ end
+ """
+ When I start the "Overall info" survey
+ Then I should see "Information on Moses"
+ And I should see "Answer all you know on Moses"
+ And I should see "Moses does not work for Northwestern!"
+ And I should see "Make sure you sure Moses doesn't work for Northwestern"
+ And I should see "Where does Moses live?"
+ And I should see "If you don't know where Moses lives, skip the question"
+ And I should see "Moses lives on North Pole"
+ And I should see "Moses lives on South Pole"
+ And I should see "Moses doesn't exist"
+
Scenario: Creating and saving grids
Given I parse
"""
survey "Grid" do
section "One" do
@@ -689,5 +719,61 @@
When I start the "Sesame Street" survey
Then I should see "AH AH AH AH AH!"
And I should see "1) What is your favorite number?"
And I should not see "What is your name?"
+ @numbers
+ Scenario: hidden numbers
+ Given I parse
+ """
+ survey "Alpha" do
+ section "A-C" do
+ q "Aligator"
+ q "Barber"
+ q "Camel"
+ end
+ end
+ """
+ And I replace question numbers with letters
+ When I start the "Alpha" survey
+ Then I should see "A. Aligator"
+ And I should see "B. Barber"
+ And I should see "C. Camel"
+
+ Scenario: help text
+ Given I parse
+ """
+ survey "Help!" do
+ section "Songs" do
+ q "Do you need anybody?", :pick => :one, :help_text => "select one of the following"
+ a "I need somebody to love", :help_text => "like The Beatles"
+ a "I am a rock, I am an island", :help_text => "like Simon and Garfunkel"
+
+ grid "How would these artists respond to 'Do you need anybody?'", :help_text => "in your opinion" do
+ a "Yes", :help_text => "would say yes"
+ a "No", :help_text => "would say no"
+ q "Bobby Darrin", :pick => :one
+ q "Kurt Cobain", :pick => :one
+ q "Ella Fitzgerald", :pick => :one
+ q "Kanye West", :pick => :one
+ end
+
+ repeater "Over and over" do
+ q "Row row row your boat", :pick => :any, :help_text => "the 1st part of a round"
+ a "gently down the stream", :help_text => "the 2nd part of a round"
+ a "merrily merrily merrily merrily", :help_text => "the 3rd part of a round"
+ a "life is but a dream", :help_text => "the 4th part of a round"
+ end
+ end
+ end
+ """
+ When I start the "Help!" survey
+ Then I should see "select one of the following"
+ And I should see "like The Beatles"
+ And I should see "like Simon and Garfunkel"
+ And I should see "in your opinion"
+ And I should see "would say yes"
+ And I should see "would say no"
+ And I should see "the 1st part of a round"
+ And I should see "the 2nd part of a round"
+ And I should see "the 3rd part of a round"
+ And I should see "the 4th part of a round"