improve selenium tests
This commit is contained in:
parent
86722f94e0
commit
f665cbf16d
204
test/selenium/TestInlineEditor.html
Normal file
204
test/selenium/TestInlineEditor.html
Normal file
@ -0,0 +1,204 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
|
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
|
<link rel="selenium.base" href="" />
|
||||||
|
<title>TestInlineEditor</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<table cellpadding="1" cellspacing="1" border="1">
|
||||||
|
<thead>
|
||||||
|
<tr><td rowspan="1" colspan="3">TestInlineEditor</td></tr>
|
||||||
|
</thead><tbody>
|
||||||
|
<!--In case we're testing w/ a funky theme...-->
|
||||||
|
<tr>
|
||||||
|
<td>clickAndWait</td>
|
||||||
|
<td>link=exact:What Did They Say?!?</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>click</td>
|
||||||
|
<td>wdts-tab-misc-options</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>check</td>
|
||||||
|
<td>wdts[high_insertion_level]</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>clickAndWait</td>
|
||||||
|
<td>//input[@value='Change Insertion Level']</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>assertTextPresent</td>
|
||||||
|
<td>Insertion level updated.</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<!--Start testing-->
|
||||||
|
<tr>
|
||||||
|
<td>clickAndWait</td>
|
||||||
|
<td>link=Edit</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>clickAndWait</td>
|
||||||
|
<td>//tr[contains(@id,"-${post_id}")]//div[@class="row-actions"]/span[@class="view"]/a</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<!--Initial Sanity Checks-->
|
||||||
|
<tr>
|
||||||
|
<td>assertElementPresent</td>
|
||||||
|
<td>//div[@class="wdts-transcript-container"]</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>assertVisible</td>
|
||||||
|
<td>//a[text()="Edit/Add Transcripts"]</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>assertNotVisible</td>
|
||||||
|
<td>//input[@name="wdts[post_id]"]/../</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<!--Start Editing-->
|
||||||
|
<tr>
|
||||||
|
<td>click</td>
|
||||||
|
<td>//a[text()="Edit/Add Transcripts"]</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>waitForVisible</td>
|
||||||
|
<td>//input[@name="wdts[post_id]"]/../</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>assertVisible</td>
|
||||||
|
<td>//h3[contains(text(),"Edit Approved Transcripts:")]</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>assertNotVisible</td>
|
||||||
|
<td>//h3[contains(text(),"Submit a New Transcript:")]</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<!--Enable Queued Transcripts-->
|
||||||
|
<tr>
|
||||||
|
<td>click</td>
|
||||||
|
<td>//input[@name="wdts[allow_on_post]"]</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>waitForVisible</td>
|
||||||
|
<td>//h3[contains(text(),"Submit a New Transcript:")]</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>assertVisible</td>
|
||||||
|
<td>//h3[contains(text(),"Submit a New Transcript:")]</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>select</td>
|
||||||
|
<td>//h3[contains(text(),"Submit a New Transcript:")]/following-sibling::form//select</td>
|
||||||
|
<td>label=English</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>type</td>
|
||||||
|
<td>wdts[transcript]</td>
|
||||||
|
<td>This is a test queued transcript.</td>
|
||||||
|
</tr>
|
||||||
|
<!--Submit a Transcript-->
|
||||||
|
<tr>
|
||||||
|
<td>clickAndWait</td>
|
||||||
|
<td>//h3[contains(text(),"Submit a New Transcript:")]/following-sibling::form//input[@type="submit"]</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>assertElementPresent</td>
|
||||||
|
<td>//div[@class="wdts-updated"]</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>assertElementPresent</td>
|
||||||
|
<td>//div[@class="queued-transcript-holder"]</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>assertText</td>
|
||||||
|
<td>//div[contains(@class,"queued-transcript") and contains(@class,"wdts-transcript")]</td>
|
||||||
|
<td>This is a test queued transcript.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>assertTextPresent</td>
|
||||||
|
<td>(1 queued)</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<!--Approve the Transcript-->
|
||||||
|
<tr>
|
||||||
|
<td>click</td>
|
||||||
|
<td>//div[@class="queued-transcript-actions"]/button[text()="Approve"]</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>assertVisible</td>
|
||||||
|
<td>//h3[contains(text(),"Edit Approved Transcripts:")]</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>assertVisible</td>
|
||||||
|
<td>//h3[contains(text(),"Submit a New Transcript:")]</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>waitForElementNotPresent</td>
|
||||||
|
<td>//div[@class="queued-transcript-actions"]</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>assertValue</td>
|
||||||
|
<td>//textarea[@name="wdts[transcripts][en]"]</td>
|
||||||
|
<td>This is a test queued transcript.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>assertConfirmation</td>
|
||||||
|
<td>This will overwrite the current transcript. Are you sure?</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>refreshAndWait</td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>assertTextNotPresent</td>
|
||||||
|
<td>(1 queued)</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>assertText</td>
|
||||||
|
<td>//div[contains(@class,"transcript-holder") and contains(@class,"en")]</td>
|
||||||
|
<td>This is a test queued transcript.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>assertNotVisible</td>
|
||||||
|
<td>//input[@name="wdts[post_id]"]/../</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>assertNotVisible</td>
|
||||||
|
<td>//h3[contains(text(),"Submit a New Transcript:")]</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>open</td>
|
||||||
|
<td>/wp-admin/</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</tbody></table>
|
||||||
|
</body>
|
||||||
|
</html>
|
64
test/selenium/TestJavaScriptWorking.html
Normal file
64
test/selenium/TestJavaScriptWorking.html
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
|
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
|
<link rel="selenium.base" href="" />
|
||||||
|
<title>TestJavaScriptWorking</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<table cellpadding="1" cellspacing="1" border="1">
|
||||||
|
<thead>
|
||||||
|
<tr><td rowspan="1" colspan="3">TestJavaScriptWorking</td></tr>
|
||||||
|
</thead><tbody>
|
||||||
|
<!--WDTS? Main Page-->
|
||||||
|
<tr>
|
||||||
|
<td>clickAndWait</td>
|
||||||
|
<td>link=exact:What Did They Say?!?</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>assertVisible</td>
|
||||||
|
<td>wdts-page-introduction</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>assertElementPresent</td>
|
||||||
|
<td>//a[@id="wdts-tab-how-it-works" and contains(@class,"inactive")]</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<!--Edit Approved Transcripts-->
|
||||||
|
<tr>
|
||||||
|
<td>clickAndWait</td>
|
||||||
|
<td>link=Add New</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>assertNotVisible</td>
|
||||||
|
<td>//div[@class="wdts-embed-warning"]</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>assertVisible</td>
|
||||||
|
<td>//button[text()="Scene Heading"]</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>fireEvent</td>
|
||||||
|
<td>//div[@class="wdts-button-holder"]//button[position()=1]</td>
|
||||||
|
<td>click</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>answerOnNextPrompt</td>
|
||||||
|
<td>Test</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>assertPrompt</td>
|
||||||
|
<td>Enter the scene heading:</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</tbody></table>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -9,6 +9,7 @@
|
|||||||
<table id="suiteTable" cellpadding="1" cellspacing="1" border="1" class="selenium"><tbody>
|
<table id="suiteTable" cellpadding="1" cellspacing="1" border="1" class="selenium"><tbody>
|
||||||
<tr><td><b>Test Suite</b></td></tr>
|
<tr><td><b>Test Suite</b></td></tr>
|
||||||
<tr><td><a href="TestActivation.html">TestActivation</a></td></tr>
|
<tr><td><a href="TestActivation.html">TestActivation</a></td></tr>
|
||||||
|
<tr><td><a href="TestJavaScriptWorking.html">TestJavaScriptWorking</a></td></tr>
|
||||||
<tr><td><a href="TestResetOptions.html">TestResetOptions</a></td></tr>
|
<tr><td><a href="TestResetOptions.html">TestResetOptions</a></td></tr>
|
||||||
<tr><td><a href="TestChangeCapabilities.html">TestChangeCapabilities</a></td></tr>
|
<tr><td><a href="TestChangeCapabilities.html">TestChangeCapabilities</a></td></tr>
|
||||||
<tr><td><a href="TestResetOptions.html">TestResetOptions</a></td></tr>
|
<tr><td><a href="TestResetOptions.html">TestResetOptions</a></td></tr>
|
||||||
@ -24,6 +25,7 @@
|
|||||||
<tr><td><a href="TestResetOptions.html">TestResetOptions</a></td></tr>
|
<tr><td><a href="TestResetOptions.html">TestResetOptions</a></td></tr>
|
||||||
<tr><td><a href="TestCreatePost.html">TestCreatePost</a></td></tr>
|
<tr><td><a href="TestCreatePost.html">TestCreatePost</a></td></tr>
|
||||||
<tr><td><a href="TestMetaboxApprovedTranscriptEditing.html">TestMetaboxApprovedTranscriptEditing</a></td></tr>
|
<tr><td><a href="TestMetaboxApprovedTranscriptEditing.html">TestMetaboxApprovedTranscriptEditing</a></td></tr>
|
||||||
|
<tr><td><a href="TestInlineEditor.html">TestInlineEditor</a></td></tr>
|
||||||
<tr><td><a href="TestDeletePost.html">TestDeletePost</a></td></tr>
|
<tr><td><a href="TestDeletePost.html">TestDeletePost</a></td></tr>
|
||||||
<tr><td><a href="TestThemeEditorWorks.html">TestThemeEditorWorks</a></td></tr>
|
<tr><td><a href="TestThemeEditorWorks.html">TestThemeEditorWorks</a></td></tr>
|
||||||
<tr><td><a href="TestDeactivate.html">TestDeactivate</a></td></tr>
|
<tr><td><a href="TestDeactivate.html">TestDeactivate</a></td></tr>
|
||||||
|
Loading…
Reference in New Issue
Block a user