Writing a Poll Test Plan
This plan exercises the code used to create and edit polls. All test cases assume you're on the Write Poll page, which is in the administration panel under Write > Write Poll. In general, editing a poll should feel very much like editing a post. If behavior deviates from that in an unexpected way, it is considered a bug.
Adding an option
- Press the Write > Write Poll tab.
- Enter a title for the new poll.
- Type an option in the option field.
- Press enter or press the 'Add' button.
Verify:
- Poll was saved, with correct title and option.
- 'Poll Updated' message is displayed.
- Poll Preview is shown at the bottom of the page.
- Your poll is shown in the 'Your Drafts:' section at the top.
- A 'Delete this poll' button shows up.
- Attempting to add an option with no text does not add the option.
Creating new poll
- Click on Write > Write Poll tab to create a new poll.
- Enter a poll title.
- Press enter or press the 'Save and continue editing' button.
Verify:
- Verify the same things as under 'Adding an option' above.
Clicking on a draft
- Click on the draft created in the 'Adding an option' testcase inside the 'Your drafts' section.
Verify:
- The poll created in the 'Adding an option' testcase is brought up.
- The option and title are the same as before.
Changing all the settings
-
Change the various settings listed here, to whatever you'd like.
- Discussion (e.g. check 'Allow Pings')
- Password-Protect Post (e.g. fred)
- Post slug (e.g. bob)
- Categories (e.g. add a category named 'bubba' and check it)
- Post Status (e.g. select 'Private')
- Post Timestamp (e.g. Check 'Edit timestamp' and enter March 19, 1978)
- Post author (you might have to add another user)
- Trackbacks (e.g. http://www.losingfight.com/blog/)
- Press 'Save and continue editing'
Verify:
- All the settings you changed, stuck.
Adding custom field
- Type in a key and value (e.g. flintstone, fred) in the custom field section
- Press 'Add custom field'
Verify:
- The new custom field shows up in the custom field box, in editable text fields.
- The message 'Custom field updating' shows up at the top of the page.
Editing custom field
- Change the previously entered custom field to something new (e.g. rubble, barney)
- Press the corresponding 'Update' button.
Verify:
- The custom field has the new key and value.
- The message 'Custom field updating' shows up at the top of the page.
Deleting custom field
- Press the 'Delete' button next to the custom field
Verify:
- The custom field is deleted.
- The message 'Custom field deleted' shows up at the top of the page.
Save
- Change the poll title
- Press the 'Save' button.
Verify:
- The message 'Poll Updated' is displayed at the top.
- The poll still shows up in the 'Your Drafts' section.
- When you click on the poll in the 'Your Drafts' section, the poll comes up.
- The new poll title was saved.
Editing an option
- Click the 'Edit' button on a poll option. Verify the 'Edit Poll Option' page is brought up.
- Change the text and votes.
- Press 'Cancel'. Verify that you are taken back to the 'Write Poll' page, with the option unchanged.
- Click the 'Edit' button on a poll option. Verify the 'Edit Poll Option' page is brought up.
- Change the text and votes.
- Press 'Save' or hit enter.
Verify:
- The text and votes of the option have been updated on the 'Write Poll' page.
- The votes field only accepts numbers. Anything else and the change is not taken.
- The text field requires some text. Blank entries are not taken.
Reordering an option
- Enter at least four options.
- Press the 'Up' button next to an option, once.
- Press the 'Down' button next to an option, twice.
Verify:
- That for each press of 'Up' the option moves up exactly one space.
- That for each press of 'Down' the option moves down exactly one space.
- Pressing 'Up' on an option at the top of the list does nothing.
- Pressing 'Down' on an option at the bottom of the list does nothing.
Deleting an option
- Press the 'Delete' button next to an option.
- When asked to confirm the delete, press Cancel.
- Press the 'Delete' button next to an option.
- When asked to confirm the delete, press OK.
Verify:
- Each time 'Delete' is pressed, a confirmation dialog is displayed.
- When canceled the delete operation does not happen.
- When OK'd, the delete operation does happen, and the option is removed.
Publish
- Press the 'Publish' button.
Verify:
- The message 'Poll saved. View Site' is displayed at the top.
- The poll is no longer in the 'Your drafts' section.
- A new poll is brought up.
- The poll is shown the voting booth, and on the archives page.
Deleting a poll
- Select your second draft from the 'Your drafts' section.
- Press 'Delete this poll'.
- When asked to confirm the delete, press Cancel.
- Press 'Delete this poll'.
- When asked to confirm the delete, press OK.
Verify:
- Each time 'Delete this poll' is pressed, a confirmation dialog is displayed.
- When canceled the delete operation does not happen.
- When OK'd, the delete operation does happen, and the poll is removed.
Back to Main Test Plan