Commit 03b14597 by Stephen Sanchez

First pass at creating BDD tests for the Problem Creation stories on the backlog.

These tests are a first attempt at defining the story. The underlying methods are all empty, and will be filled out with the implementation.  I believe some steps may overlap and need to be refactored, and perhaps some of the stories belong in common_grading instead of peer_grading. I want Will to review this and see if I'm going down the correct path before I fill out any more of these for the first sprint.
parent 4ec216fd
Feature: Bootstrap
In order to verify that lettuce is working in Travis.
As a Test Engineer
I want to run a dummy BDD spec.
Scenario: Dummy spec
Given: I have defined a step
And: I have implemented the step in lettuce
Then: The spec should run in Travis
Feature: As an author I can create a rubric
As an author
I want to create a rubric
In order to give feedback on Submissions
Scenario: As an author I create a rubric
Given: I have created a rubric for a problem
When: I review the problem
Then: I should see the rubric.
Feature: Bootstrap
In order to verify that lettuce is working in Travis.
As a Test Engineer
I want to run a dummy BDD spec.
Scenario: Dummy spec
Given: I have defined a step
And: I have implemented the step in lettuce
Then: The spec should run in Travis
Feature: An author can configured required reviewers per submission.
As an author
I can configure a number of required reviewers per submission.
Scenario: Author configures required reviewers per submission
Given: I am an author
And: I configure <RequiredReviews> required reviewers per submissions
And: I submit a submission
And: I review <RequiredPeerReviews> peer submissions
When: <RequiredReviews> students review the submission
Then: I receive my reviews.
Examples:
| RequiredReviews | RequiredPeerReviews |
| 1 | 2 |
| 3 | 5 |
| 7 | 12 |
# -*- coding: utf-8 -*-
from lettuce import step
@step(u'Given: I am an author')
def given_i_am_an_author(step):
pass
@step(u'And: I configure "([^"]*)" required reviewers per submissions')
def and_i_configure_required_reviewers_per_submission(step):
pass
@step(u'And: I submit a submission')
def and_i_submit_a_submission(step):
pass
@step(u'And: I review "([^"]*)" peer submissions')
def and_i_review_peer_submissions(step):
pass
@step(u'When: "([^"]*)" students review the submission')
def when_students_review_the_submission(step):
pass
@step(u'Then: I receive my reviews.')
def then_i_receive_my_reviews(step):
pass
\ No newline at end of file
Feature: An author can configured required reviews per student.
As an author
I can configure a number of required reviews per student
Before the student can see their reviewed submission.
Scenario: Author configures required reviewers per submission
Given: I am an author
And: I configure <RequiredPeerReviews> required reviews per student
And: A student submits a submission
And: A student reviews <RequiredPeerReviews> peer submissions
When: <RequiredReviews> students review the submission
Then: The student receives reviews.
Examples:
| RequiredReviews | RequiredPeerReviews |
| 1 | 2 |
| 3 | 5 |
| 7 | 12 |
# -*- coding: utf-8 -*-
from lettuce import step
@step(u'Given: I am an author')
def given_i_am_an_author(step):
pass
@step(u'And: I configure "([^"]*)" required reviews per student')
def and_i_configure_required_reviews_per_student(step):
pass
@step(u'And: A student submits a submission')
def and_a_student_submits_a_submission(step):
pass
@step(u'And: A student reviews "([^"]*)" peer submissions')
def and_a_student_reviews_peer_submissions(step):
pass
@step(u'When: "([^"]*)" students review the submission')
def when_students_review_the_submission(step):
pass
@step(u'Then: The student receives reviews.')
def then_the_student_receives_reviews(step):
pass
\ No newline at end of file
Feature: An author is required to configure less reviews than reviewers
As an author
I can configure a number of required reviews per student
I can configure the number of reviews required per submission
The reviews required per submission is validated to be less
than the number of reviews required per student
Scenario: An author is required to configure less reviews than reviewers
Given: I am an author
And: I configure <RequiredPeerReviews> required reviews per student
And: I configure <RequiredReviews> required reviews per submission
Then: The validation <Result>
Examples:
| RequiredReviews | RequiredPeerReviews | Result |
| 1 | 2 | passes |
| 3 | 5 | passes |
| 7 | 12 | passes |
| 3 | 3 | fails |
| 3 | 2 | fails |
| 0 | 0 | fails |
| 0 | 1 | fails |
# -*- coding: utf-8 -*-
from lettuce import step
@step(u'Given: I am an author')
def given_i_am_an_author(step):
pass
@step(u'And: I configure "([^"]*)" required reviewers per student')
def and_i_configure_required_reviewers_per_student(step):
pass
@step(u'And: I configure "([^"]*)" required reviewers per submission')
def and_i_configure_required_reviewers_per_student(step):
pass
@step(u'Then: The validation "([^"]*)"')
def then_the_validation(step):
pass
Feature: An author can configure the peer review start and end dates
As an author
I can configure the date when a question is open for peer review
I can configure the date when a question is closed for peer review
Scenario: An author can configure the peer review start and end dates
Given: I am an author
And: I configure a start date in the <RelativeStartTime>
And: I configure an end date in the <RelativeEndTime>
When: I attempt to review a peer submission
Then: My attempt to review a peer submission <Result>
Examples:
| RelativeStartTime | RelativeEndTime | Result |
| past | future | passes |
| future | future | fails |
| future | past | fails |
| past | past | fails |
# -*- coding: utf-8 -*-
from lettuce import step
@step(u'Given: I am an author')
def given_i_am_an_author(step):
pass
@step(u'And: I configure a start date in the "([^"]*)"')
def and_i_configure_a_start_date(step):
pass
@step(u'And: I configure an end date in the "([^"]*)"')
def and_i_configure_an_end_date(step):
pass
@step(u'When: I attempt to review a peer submission')
def when_i_attempt_to_submit_a_submission(step):
pass
@step(u'Then: My attempt to review a peer submission "([^"]*)"')
def then_my_attempt_to_submit_a_submission(step):
pass
# -*- coding: utf-8 -*-
from lettuce import step
@step(u'Given: I have defined a step')
def given_i_have_defined_a_step(step):
pass
@step(u'And: I have implemented the step in lettuce')
def and_i_have_implemented_the_step_in_lettuce(step):
pass
@step(u'Then: The spec should run in Travis')
def then_the_spec_should_run_in_travis(step):
pass
Feature: An author can configure the submission start and end dates
As an author
I can configure the date when a question is open for submissions
I can configure the date when a question is closed for submissions
Scenario: An author can configure the submission start and end dates
Given: I am an author
And: I configure a start date in the <RelativeStartTime>
And: I configure an end date in the <RelativeEndTime>
When: I attempt to submit a submission
Then: My attempt to submit a submission <Result>
Examples:
| RelativeStartTime | RelativeEndTime | Result |
| past | future | passes |
| future | future | fails |
| future | past | fails |
| past | past | fails |
# -*- coding: utf-8 -*-
from lettuce import step
@step(u'Given: I am an author')
def given_i_am_an_author(step):
pass
@step(u'And: I configure a start date in the "([^"]*)"')
def and_i_configure_a_start_date(step):
pass
@step(u'And: I configure an end date in the "([^"]*)"')
def and_i_configure_an_end_date(step):
pass
@step(u'When: I attempt to submit a submission')
def when_i_attempt_to_submit_a_submission(step):
pass
@step(u'Then: My attempt to submit a submission "([^"]*)"')
def then_my_attempt_to_submit_a_submission(step):
pass
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment