update selenium test for wp 2.7
This commit is contained in:
parent
5510d9c84e
commit
b0867499b6
@ -3,7 +3,7 @@
|
|||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
|
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
<link rel="selenium.base" href="http://comicpress.local/" />
|
<link rel="selenium.base" href="http://wordpress27.local/" />
|
||||||
<title>DailyImageWidgetTest</title>
|
<title>DailyImageWidgetTest</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
@ -31,20 +31,25 @@
|
|||||||
<td>Plugin activated.</td>
|
<td>Plugin activated.</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td>clickAndWait</td>
|
|
||||||
<td>link=Widgets</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<!--Version check-->
|
<!--Version check-->
|
||||||
|
<tr>
|
||||||
|
<td>clickAndWait</td>
|
||||||
|
<td>link=Dashboard</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>storeText</td>
|
<td>storeText</td>
|
||||||
<td>footer-upgrade</td>
|
<td>//span[@id="wp-version-message"]/span[@class="b"]</td>
|
||||||
<td>wp_version</td>
|
<td>wp_version</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>getEval</td>
|
<td>getEval</td>
|
||||||
<td>/Version ([0-9.]+)/.test(storedVars['wp_version']); storedVars['wp_version'] = RegExp.$1;</td>
|
<td>/WordPress ([0-9.]+)\./.test(storedVars['wp_version']); storedVars['wp_version'] = RegExp.$1;</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>clickAndWait</td>
|
||||||
|
<td>link=Widgets</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -172,11 +177,131 @@
|
|||||||
<td>//div[@id='widgets-right']//div[contains(@id, 'hubblesite-daily-image')]</td>
|
<td>//div[@id='widgets-right']//div[contains(@id, 'hubblesite-daily-image')]</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>goto</td>
|
||||||
|
<td>widgets_done</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>label</td>
|
<td>label</td>
|
||||||
<td>wordpress_27</td>
|
<td>wordpress_27</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>click</td>
|
||||||
|
<td>//a[contains(@class, 'widget-control-add') and contains(@href,"add=hubblesite-daily-image")]</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>click</td>
|
||||||
|
<td>//a[contains(@class, 'widget-control-edit') and contains(@href,"edit=hubblesite-daily-image")]</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>check</td>
|
||||||
|
<td>//input[@name="hubblesite[image]"]</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>check</td>
|
||||||
|
<td>//input[@name="hubblesite[title]"]</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>uncheck</td>
|
||||||
|
<td>//input[@name="hubblesite[credits]"]</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>clickAndWait</td>
|
||||||
|
<td>save-widgets</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>clickAndWait</td>
|
||||||
|
<td>//div[@id='wphead']/h1/a/span</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>assertText</td>
|
||||||
|
<td>//li[@id='hubblesite-daily-image']/h2</td>
|
||||||
|
<td>HubbleSite Daily Image</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>assertElementPresent</td>
|
||||||
|
<td>//li[@id='hubblesite-daily-image']/a[contains(@href,'hubblesite.org/gallery/album')]</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>storeAttribute</td>
|
||||||
|
<td>//li[@id='hubblesite-daily-image']/a[contains(@href,'hubblesite.org/gallery/album')]@title</td>
|
||||||
|
<td>title</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>assertElementPresent</td>
|
||||||
|
<td>//li[@id='hubblesite-daily-image']//img[contains(@src,'imgsrc.hubblesite.org') and @alt="${title}"]</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>goBackAndWait</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>click</td>
|
||||||
|
<td>//a[contains(@class, 'widget-control-edit') and contains(@href,"edit=hubblesite-daily-image")]</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>uncheck</td>
|
||||||
|
<td>//input[@name="hubblesite[title]"]</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>check</td>
|
||||||
|
<td>//input[@name="hubblesite[credits]"]</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>clickAndWait</td>
|
||||||
|
<td>save-widgets</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>clickAndWait</td>
|
||||||
|
<td>//div[@id='wphead']/h1/a/span</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>assertElementPresent</td>
|
||||||
|
<td>//div[@id="hubblesite-daily-image-credits"]</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>goBackAndWait</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>click</td>
|
||||||
|
<td>//a[contains(@class, 'widget-control-edit') and contains(@href,"edit=hubblesite-daily-image")]</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>click</td>
|
||||||
|
<td>//a[contains(@class, 'widget-control-remove') and contains(@href,"remove=hubblesite-daily-image")]</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>clickAndWait</td>
|
||||||
|
<td>save-widgets</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>label</td>
|
||||||
|
<td>widgets_done</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
<!--Deactivate plugin-->
|
<!--Deactivate plugin-->
|
||||||
<tr>
|
<tr>
|
||||||
<td>clickAndWait</td>
|
<td>clickAndWait</td>
|
||||||
|
Loading…
Reference in New Issue
Block a user