diff --git a/test/DailyImageWidgetTest.html b/test/DailyImageWidgetTest.html new file mode 100644 index 0000000..56d8b7c --- /dev/null +++ b/test/DailyImageWidgetTest.html @@ -0,0 +1,199 @@ + + + + + + +DailyImageWidgetTest + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DailyImageWidgetTest
open/wp-admin/
clickAndWaitlink=Installed
clickAndWait//a[contains(@href, 'action=activate') and contains(@href, 'hubblesite-daily-image-wordpress')]
assertTextPresentPlugin activated.
clickAndWaitlink=Widgets
storeTextfooter-upgradewp_version
getEval/Version ([0-9.]+)/.test(storedVars['wp_version']); storedVars['wp_version'] = RegExp.$1;
gotoIfstoredVars['wp_version'] < 2.8wordpress_27
clickAndWait//a[contains(@href,'hubblesite-daily-image') and contains(@href,'addnew')]
assertTextNotPresentWarning: in_array()
check//input[@name="hubblesite[image]"]
check//input[@name="hubblesite[title]"]
uncheck//input[@name="hubblesite[credits]"]
clickAndWaitsavewidget
assertElementPresent//div[@id='widgets-right']//h4[contains(text(),"HubbleSite Daily Image")]
clickAndWaitsite-visit-button
assertText//li[@id='hubblesite-daily-image']/h2HubbleSite Daily Image
assertElementPresent//li[@id='hubblesite-daily-image']/a[contains(@href,'hubblesite.org/gallery/album')]
storeAttribute//li[@id='hubblesite-daily-image']/a[contains(@href,'hubblesite.org/gallery/album')]@titletitle
assertElementPresent//li[@id='hubblesite-daily-image']//img[contains(@src,'imgsrc.hubblesite.org') and @alt="${title}"]
goBackAndWait
click//div[@id='widgets-right']//div[contains(@id, 'hubblesite-daily-image')]//a[contains(@class, 'widget-action')]
uncheck//input[@name="hubblesite[title]"]
check//input[@name="hubblesite[credits]"]
click//div[contains(@id, 'hubblesite-daily-image')]//input[@type='submit']
clickAndWaitsite-visit-button
assertElementPresent//div[@id="hubblesite-daily-image-credits"]
goBackAndWait
click//div[@id='widgets-right']//div[contains(@id, 'hubblesite-daily-image')]//a[contains(@class, 'widget-action')]
click//div[@id='widgets-right']//div[contains(@id, 'hubblesite-daily-image')]//a[@class="widget-control-remove"]
pause1000
assertElementNotPresent//div[@id='widgets-right']//div[contains(@id, 'hubblesite-daily-image')]
labelwordpress_27
clickAndWaitlink=Installed
clickAndWait//a[contains(@href,'deactivate') and contains(@href,'hubblesite-daily-image-wordpress')]
assertTextPresentPlugin deactivated.
+ +