Creating blog entry with details
As a blogger I should be able to create blog entries that appear on the home page so that users can read it.
We have already created a workflow to create a new blog entry.
Blog Creation:
- create a new blog entry
Instead of creating a new workflow step for our requirement, we could rephrase the workflow step and add necessary parameters.
- Select the workflow step create a new blog entry, and click Rephrase workflow step from Context menu.
- Modify the workflow step such that the dialog box now displays create a new blog entry with title "title" subtitle "subtitle" and text "text". Press OK.
- Modify the underlying code in BlogCreation to:
public void createANewBlogEntryWithTitleSubTitleAndText(String title, String subtitle, String text) { selenium.type("title", title); selenium.type("subtitle", subtitle); selenium.type("name=body", text); selenium.click("//button[@value='Save']"); }
Rephrasing a workflow step can be done from both the scenario and the underlying code:
- From the scenario: Use Rephrase workflow step from Context menu
- From the underlying Java code: Use change method signature to add/remove parameters
Proceed to Guidelines for writing tests.