Commit e01e812c by Stephen Sanchez

Latest additions to BDD testing

parent 03b14597
......@@ -6,9 +6,12 @@ Feature: As an author I can create a rubric
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.
Then: I should see the rubric
Scenario: As an author I update a rubric
Given: I am an author
When: I review a published rubric
Then: I should see the rubric
And: I update a rubric for a problem
When: I review the problem
Then: I should see the changes to the rubric
# -*- coding: utf-8 -*-
from lettuce import step
@step(u'Given: I have defined a step')
def given_i_have_defined_a_step(step):
@step(u'Given: I am an author')
def given_i_am_an_author(step):
pass
@step(u'And: I have implemented the step in lettuce')
def and_i_have_implemented_the_step_in_lettuce(step):
@step(u'Given: I have created a rubric for a problem')
def given_i_have_created_a_rubric_for_a_problem(step):
pass
@step(u'Then: The spec should run in Travis')
def then_the_spec_should_run_in_travis(step):
@step(u'When: I review the problem')
def when_i_review_the_problem(step):
pass
@step(u'Then: I should see the rubric')
def then_i_should_see_the_rubric(step):
pass
@step(u'When: I review a published rubric')
def when_i_review_a_published_rubric(step):
pass
@step(u'And: I update a rubric for a problem')
def and_i_update_a_rubric_for_a_problem(step):
pass
@step(u'When: I review the problem')
def when_i_review_the_problem(step):
pass
@step(u'Then: I should see the changes to the rubric')
def then_i_should_see_the_changes_to_the_rubric(step):
pass
\ No newline at end of file
......@@ -5,10 +5,10 @@ Feature: An author can configure the submission start and end dates
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>
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>
Then: My attempt to submit a submission "<Result>"
Examples:
| RelativeStartTime | RelativeEndTime | Result |
......
......@@ -6,11 +6,11 @@ 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):
def and_i_configure_a_start_date(step, start_date):
pass
@step(u'And: I configure an end date in the "([^"]*)"')
def and_i_configure_an_end_date(step):
def and_i_configure_an_end_date(step, end_date):
pass
@step(u'When: I attempt to submit a submission')
......@@ -18,5 +18,5 @@ 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):
def then_my_attempt_to_submit_a_submission(step, result):
pass
Feature: Students will not accidentally submit a submission
As a student
When I submit my submission
I will need to confirm my action.
Scenario: A student will not accidentally submit a submission
Given: I am a student
When: I submit a submission for peer review
Then: I am prompted to confirm my decision
# -*- coding: utf-8 -*-
from lettuce import step
@step(u'Given: I am a student')
def given_i_am_a_student(step):
pass
@step(u'When: I submit a submission for peer review')
def when_i_submit_a_submission_for_peer_review(step):
pass
@step(u'Then: I am prompted to confirm my decision')
def then_i_am_prompted_to_confirm_my_decision(step):
pass
......@@ -4,14 +4,14 @@ Feature: An author can configured 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 configure "<RequiredReviews>" required reviewers per submissions
And: I submit a submission
And: I review <RequiredPeerReviews> peer submissions
When: <RequiredReviews> students review the submission
And: I review enough peer submissions
When: "<RequiredReviews>" students review the submission
Then: I receive my reviews.
Examples:
| RequiredReviews | RequiredPeerReviews |
| 1 | 2 |
| 3 | 5 |
| 7 | 12 |
| RequiredReviews |
| 1 |
| 3 |
| 7 |
......@@ -6,19 +6,19 @@ 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):
def and_i_configure_required_reviewers_per_submission(step, required):
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):
@step(u'And: I review enough peer submissions')
def and_i_review_enough_peer_submissions(step):
pass
@step(u'When: "([^"]*)" students review the submission')
def when_students_review_the_submission(step):
def when_students_review_the_submission(step, required):
pass
@step(u'Then: I receive my reviews.')
......
......@@ -5,14 +5,16 @@ Feature: An author can configured required reviews per student.
Scenario: Author configures required reviewers per submission
Given: I am an author
And: I configure <RequiredPeerReviews> required reviews per student
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
When: Enough students review the submission
And: The student requests a grade
Then: The student is notified they did not review enough peer submissions
And: A student reviews "<RequiredPeerReviews>" peer submissions
Then: The student receives reviews.
Examples:
| RequiredReviews | RequiredPeerReviews |
| 1 | 2 |
| 3 | 5 |
| 7 | 12 |
| RequiredPeerReviews |
| 2 |
| 5 |
| 12 |
\ No newline at end of file
......@@ -6,7 +6,7 @@ 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):
def and_i_configure_required_reviews_per_student(step, required):
pass
@step(u'And: A student submits a submission')
......@@ -14,11 +14,19 @@ 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):
def and_a_student_reviews_peer_submissions(step, required):
pass
@step(u'When: "([^"]*)" students review the submission')
def when_students_review_the_submission(step):
@step(u'When: Enough students review the submission')
def when_enough_students_review_the_submission(step):
pass
@step(u'And: The student requests a grade')
def and_the_student_requests_a_grade(step):
pass
@step(u'Then: The student is notified they did not review enough peer submissions')
def then_the_student_is_notified_they_did_not_review_enough_peer_submissions(step):
pass
@step(u'Then: The student receives reviews.')
......
......@@ -7,9 +7,9 @@ Feature: An author is required to configure less reviews than reviewers
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>
And: I configure "<RequiredPeerReviews>" required reviews per student
And: I configure "<RequiredReviews>" required reviews per submission
Then: The validation "<Result>"
Examples:
| RequiredReviews | RequiredPeerReviews | Result |
......
......@@ -6,13 +6,13 @@ 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):
def and_i_configure_required_reviewers_per_student(step, required):
pass
@step(u'And: I configure "([^"]*)" required reviewers per submission')
def and_i_configure_required_reviewers_per_student(step):
def and_i_configure_required_reviewers_per_student(step, required):
pass
@step(u'Then: The validation "([^"]*)"')
def then_the_validation(step):
def then_the_validation(step, result):
pass
......@@ -5,10 +5,10 @@ Feature: An author can configure the peer review start and end dates
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>
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>
Then: My attempt to review a peer submission "<Result>"
Examples:
| RelativeStartTime | RelativeEndTime | Result |
......
Feature: Submissions are fixed once reviews have begun
As a student
Once review of my submission has begun
I cannot modify my submission
Scenario: A student can modify a submission if reviewing has not begun
Given: I am a student
When: I submit a submission for peer review
And: I modify my submission
Then: I successfully save changes to my submission
Scenario: A student cannot modify a submission once reviewing has begun
Given: I am a student
When: I submit a submission for peer review
And: A peer begins to review my submission
Then: I cannot modify my submission
# -*- coding: utf-8 -*-
from lettuce import step
@step(u'Given: I am a student')
def given_i_am_a_student(step):
pass
@step(u'When: I submit a submission for peer review')
def when_i_submit_a_submission_for_peer_review(step):
pass
@step(u'And: A peer begins to review my submission')
def and_a_peer_begins_to_review_my_submission(step):
pass
@step(u'Then: I cannot modify my submission')
def then_i_cannot_modify_my_submission(step):
pass
@step(u'And: I modify my submission')
def and_i_modify_my_submission(step):
pass
@step(u'Then: I successfully save changes to my submission')
def then_i_successfully_save_changes_to_my_submission(step):
pass
Feature: A student can submit a submission
As a student
I can submit a submission for peer review
Scenario: A student can submit a submission for peer review
Given: I am a student
When: I submit a submission for peer review
Then: I am notified that my submission has been submitted
Scenario: A student can submit a submission with unicode characters
Given: I am a student
When: I submit a submission for peer review with unicode characters
Then: My submission is submitted and the unicode characters are preserved
# -*- coding: utf-8 -*-
from lettuce import step
@step(u'Given: I am a student')
def given_i_am_a_student(step):
pass
@step(u'When: I submit a submission for peer review')
def when_i_submit_a_submission_for_peer_review(step):
pass
@step(u'Then: I am notified that my submission has been submitted')
def then_i_am_notified_that_my_submission_has_been_submitted(step):
pass
@step(u'When: I submit a submission for peer review with unicode characters')
def when_i_submit_a_submission_for_peer_review_with_unicode_characters(step):
pass
@step(u'Then: My submission is submitted and the unicode characters are preserved')
def then_my_submission_is_submitted_and_the_unicode_characters_are_preserved(step):
pass
\ No newline at end of file
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