From b0867499b69358fa1018c70977830ce88e6068e5 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Wed, 15 Jul 2009 13:07:44 -0400 Subject: [PATCH] update selenium test for wp 2.7 --- test/DailyImageWidgetTest.html | 141 +++++++++++++++++++++++++++++++-- 1 file changed, 133 insertions(+), 8 deletions(-) diff --git a/test/DailyImageWidgetTest.html b/test/DailyImageWidgetTest.html index 56d8b7c..c74722d 100644 --- a/test/DailyImageWidgetTest.html +++ b/test/DailyImageWidgetTest.html @@ -3,7 +3,7 @@ - + DailyImageWidgetTest @@ -31,20 +31,25 @@ Plugin activated. - - clickAndWait - link=Widgets - - + + clickAndWait + link=Dashboard + + storeText - footer-upgrade + //span[@id="wp-version-message"]/span[@class="b"] wp_version getEval - /Version ([0-9.]+)/.test(storedVars['wp_version']); storedVars['wp_version'] = RegExp.$1; + /WordPress ([0-9.]+)\./.test(storedVars['wp_version']); storedVars['wp_version'] = RegExp.$1; + + + + clickAndWait + link=Widgets @@ -172,11 +177,131 @@ //div[@id='widgets-right']//div[contains(@id, 'hubblesite-daily-image')] + + goto + widgets_done + + label wordpress_27 + + click + //a[contains(@class, 'widget-control-add') and contains(@href,"add=hubblesite-daily-image")] + + + + click + //a[contains(@class, 'widget-control-edit') and contains(@href,"edit=hubblesite-daily-image")] + + + + check + //input[@name="hubblesite[image]"] + + + + check + //input[@name="hubblesite[title]"] + + + + uncheck + //input[@name="hubblesite[credits]"] + + + + clickAndWait + save-widgets + + + + clickAndWait + //div[@id='wphead']/h1/a/span + + + + 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 + //a[contains(@class, 'widget-control-edit') and contains(@href,"edit=hubblesite-daily-image")] + + + + uncheck + //input[@name="hubblesite[title]"] + + + + check + //input[@name="hubblesite[credits]"] + + + + clickAndWait + save-widgets + + + + clickAndWait + //div[@id='wphead']/h1/a/span + + + + assertElementPresent + //div[@id="hubblesite-daily-image-credits"] + + + + goBackAndWait + + + + + click + //a[contains(@class, 'widget-control-edit') and contains(@href,"edit=hubblesite-daily-image")] + + + + click + //a[contains(@class, 'widget-control-remove') and contains(@href,"remove=hubblesite-daily-image")] + + + + clickAndWait + save-widgets + + + + label + widgets_done + + clickAndWait