NAME
Socialtext::WikiFixture::Selenese - Executes wiki tables using Selenium RC
DESCRIPTION
This module is a subclass of Socialtext::WikiFixture::Selenese and includes extra commands specific for testing a Socialtext wiki.
FUNCTIONS
new( %opts )
Create a new fixture object. The same options as Socialtext::WikiFixture::Selenese are required, as well as:
- workspace
-
Mandatory - Specifies which Socialtext workspace will be tested.
- username
-
Mandatory - username to login to the wiki with.
- password
-
Mandatory - password to login to the wiki with.
init()
Creates the Test::WWW::Selenium object, and logs into the Socialtext workspace.
st_login()
Logs into the Socialtext wiki using supplied username and password.
st_logout()
Log out of the Socialtext wiki.
st_logoutin()
Logs out of the workspace, then logs back in.
A username and password are optional parameters, and will be used in place of the configured username and password.
st_page_title( $expected_title )
Verifies that the page title (NOT HTML title) is correct.
st_search( $search_term, $expected_result_title )
Performs a search, and then validates the result page has the correct title.
st_result( $expected_result )
Validates that the search result content contains a correct result.
st_submit()
Submits the current form
st_message()
Verifies an error or message appears.
st_watch_page( $watch_on, $page_name, $verify_only )
Adds/removes a page to the watchlist.
If the first argument is true, the page will be added to the watchlist. If the first argument is false, it will be removed from the watchlist.
If the second argument is not specified, it is assumed that the browser is already open to a wiki page, and the opened page should be watched.
If the second argument is supplied, it is assumed that the browser is on the watchlist page, and only the given page name should be watched.
If the 3rd argument is true, only checks will be performed as to whether the specified page is watched or not.
st_is_watched( $watch_on, $page_name )
Validates that the current page is or is not on the watchlist.
The logic for the second argument are the same as for st_watch_page() above.
st_admin( $command_options )
Runs st_admin command line script with the supplied options.
If the export-workspace command is used, I'll attempt to remove any existing workspace tarballs before running the command.
st_admin_export_workspace_ok( $workspace )
Verifies that a workspace tarball was created.
The workspace parameter is optional.
st_import_workspace( $options, $verify )
Imports a workspace from a tarball. If the import is successful, a test passes, if not, it fails. The output is checked against $verify.
$options
are passed through to st-import-workspace
st_force_confirmation( $email, $password )
Forces confirmation of the supplied email address, and sets the user's password to the second option.
st_open_confirmation_uri
Open the correct url to confirm an email address.
st_should_be_admin( $email, $should_be )
Clicks the admin check box to for the given user.
st_click_reset_password( $email )
Clicks the reset password check box to for the given user.
Also verifies that the checkbox is no longer checked.
AUTHOR
Luke Closs, <luke.closs at socialtext.com>
BUGS
Please report any bugs or feature requests to bug-socialtext-editpage at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Socialtext-WikiTest. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Socialtext::WikiFixture::Socialtext
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Socialtext-WikiTest
Search CPAN
ACKNOWLEDGEMENTS
COPYRIGHT & LICENSE
Copyright 2006 Luke Closs, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.