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 | ||
open | +/wp-admin/ | ++ |
clickAndWait | +link=Installed | ++ |
clickAndWait | +//a[contains(@href, 'action=activate') and contains(@href, 'hubblesite-daily-image-wordpress')] | ++ |
assertTextPresent | +Plugin activated. | ++ |
clickAndWait | +link=Widgets | ++ |
storeText | +footer-upgrade | +wp_version | +
getEval | +/Version ([0-9.]+)/.test(storedVars['wp_version']); storedVars['wp_version'] = RegExp.$1; | ++ |
gotoIf | +storedVars['wp_version'] < 2.8 | +wordpress_27 | +
clickAndWait | +//a[contains(@href,'hubblesite-daily-image') and contains(@href,'addnew')] | ++ |
assertTextNotPresent | +Warning: in_array() | ++ |
check | +//input[@name="hubblesite[image]"] | ++ |
check | +//input[@name="hubblesite[title]"] | ++ |
uncheck | +//input[@name="hubblesite[credits]"] | ++ |
clickAndWait | +savewidget | ++ |
assertElementPresent | +//div[@id='widgets-right']//h4[contains(text(),"HubbleSite Daily Image")] | ++ |
clickAndWait | +site-visit-button | ++ |
assertText | +//li[@id='hubblesite-daily-image']/h2 | +HubbleSite 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')]@title | +title | +
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'] | ++ |
clickAndWait | +site-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"] | ++ |
pause | +1000 | ++ |
assertElementNotPresent | +//div[@id='widgets-right']//div[contains(@id, 'hubblesite-daily-image')] | ++ |
label | +wordpress_27 | ++ |
clickAndWait | +link=Installed | ++ |
clickAndWait | +//a[contains(@href,'deactivate') and contains(@href,'hubblesite-daily-image-wordpress')] | ++ |
assertTextPresent | +Plugin deactivated. | ++ |