Skip to content

Instantly share code, notes, and snippets.

@seyyah
Created July 26, 2012 05:37
Show Gist options
  • Save seyyah/3180446 to your computer and use it in GitHub Desktop.
Save seyyah/3180446 to your computer and use it in GitHub Desktop.
# v2: <https://gist.github.com/3180446>
@question_new
Scenario: I should be able to new/create Question
Given I am on the "New Question" form page as "author" with "author, osce_author" roles
When I fill in the form with the "Question" data:
| Id | Type | Value |
| Title TR | textarea | Başlık |
| Description TR | textarea | Açıklama |
| Question Image TR | file | /tmp/test.jpg |
| Answer TR | text | Yanıt |
| Mistake 1 TR | text | Çeldirici 1 |
| Mistake 2 TR | text | Çeldirici 2 |
| Mistake 3 TR | text | Çeldirici 3 |
| Mistake 4 TR | text | Çeldirici 4 |
| Discipline | select | Anatomi |
| Fep | select | Adison Hastalığı |
| Bloom | select | Synthesis |
| Author Bloom | select | Synthesis |
| Image Position | select | Top |
And I click link "Save" titled in the "Page Header Actions" section
Then I should see "Successfully create question"
And Last "Question" should be:
| Name | Value |
| Title TR | Başlık |
| Description TR | Açıklama |
| Question Image TR | /uploads/question/:id/image_tr.jpg |
| Answer TR | Yanıt |
| Mistake 1 TR | Çeldirici 1 |
| Mistake 2 TR | Çeldirici 2 |
| Mistake 3 TR | Çeldirici 3 |
| Mistake 4 TR | Çeldirici 4 |
| Discipline | Anatomi |
| Fep | Adison Hastalığı |
| Bloom | Synthesis |
| Author Bloom | Synthesis |
| Image Position | Top |
# When I fill in "Title TR" with "Başlık"
# And I fill in "Description" with:
# """
# this usefull
# for textareas
# """
# And I upload the picture at "/tmp/test.jpg" as "Question Image TR"
# And I fill in "
# And I fill the form with the question data:
# | title_tr | question_tr |
# | foo | bar |
# And I select "Anatomy" from "Question Discipline"
# And I click link titled "Save" in the "Page Header Actions" section
# Then I should see "Successfully create question"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment