I am quite new to BDD, I am trying to use BDD in order to develop a simple signup module for a website.
I have the following scenario:
Scenario: An anonymous visitor successfully signs up with the website
Given the following email address: john.smith@gmail.com and a chosen member status of childminder and the following password: ------
When the anonymous visitor signs up
Then a confirmation email with activation information is sent to the anonymous visitor
I am quite at a loss automating the Then step ("Then a confirmation email with activation information is sent to the anonymous visitor")
Here is what I have undertaken (with JBehave):
@Given("the following email address: $email and a chosen member status of $status and the following password: $password")
public void anonymousVisitorEntersDetails(String email, String status, String password) {
pages.home().open();
pages.home().enterDetails(email, status, password);
}
@When("the anonymous visitor signs up")
public void anonymousVisitorDoesRegister(String login, String password) {
pages.home().doRegister();
}
@Then("a confirmation email with activation information is sent to the anonymous visitor")
public void activationInformationIsSent() {
//TODO ??
}
The issue I have is not so much a tool issue as a design issue. I would be grateful if some experienced BDD practitionner would help me sort this out...