Skip to content

Instantly share code, notes, and snippets.

@johnwards
Created February 18, 2011 16:25

Revisions

  1. johnwards revised this gist Feb 21, 2011. 1 changed file with 18 additions and 13 deletions.
    31 changes: 18 additions & 13 deletions new_study.feature
    Original file line number Diff line number Diff line change
    @@ -4,20 +4,25 @@ Feature: New Study
    I must be able to enter information about the study and save it

    Scenario Outline: Researcher adds new study
    When I enter <study name>, <short url>, <welcome text> and set self registration to <self registration>
    When I enter a study name of <study name>
    And I enter a short url of <short url>
    And I enter a some welcome text of <welcome text>
    And I set self registration to <self registration>
    When I press "Add study" in user form
    Then I should be redirected to /study/list
    And I should see "New Study <study name> created"

    Examples:
    |study name|short url|welcome text|self registration|
    | Study 1| study-1|"""
    Hello This is some welcome
    Text
    """
    | false|
    | Study 1| study-1|"""
    Hello This is some more
    welcome
    Text
    """
    | true|
    |study name|short url|welcome text|self registration|
    | Study 1| study-1|Hello some text| false|
    | Study 2| study2|This is a study| true|

    Scenario: Adding an image to a new study
    When I enter a study name of Study with Image
    And I enter a short url of study-test
    And I enter a some welcome text of Hello this is a study
    And I set self registration to false
    And I upload an image called logo.png
    When I press "Add study" in user form
    Then I should be redirected to /study/list
    And I should see "New Study Study with Image created"
  2. johnwards revised this gist Feb 18, 2011. 1 changed file with 7 additions and 7 deletions.
    14 changes: 7 additions & 7 deletions new_study.feature
    Original file line number Diff line number Diff line change
    @@ -11,13 +11,13 @@ Feature: New Study
    Examples:
    |study name|short url|welcome text|self registration|
    | Study 1| study-1|"""
    Hello This is some welcome
    Text
    """
    Hello This is some welcome
    Text
    """
    | false|
    | Study 1| study-1|"""
    Hello This is some more
    welcome
    Text
    """
    Hello This is some more
    welcome
    Text
    """
    | true|
  3. johnwards created this gist Feb 18, 2011.
    23 changes: 23 additions & 0 deletions new_study.feature
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    Feature: New Study
    In order to create a new Study
    As a Researcher
    I must be able to enter information about the study and save it

    Scenario Outline: Researcher adds new study
    When I enter <study name>, <short url>, <welcome text> and set self registration to <self registration>
    Then I should be redirected to /study/list
    And I should see "New Study <study name> created"

    Examples:
    |study name|short url|welcome text|self registration|
    | Study 1| study-1|"""
    Hello This is some welcome
    Text
    """
    | false|
    | Study 1| study-1|"""
    Hello This is some more
    welcome
    Text
    """
    | true|