From f665cbf16d796fd5af0c1088c1b8a57dc9d0308b Mon Sep 17 00:00:00 2001 From: John Bintz Date: Thu, 15 Oct 2009 08:16:07 -0400 Subject: [PATCH] improve selenium tests --- test/selenium/TestInlineEditor.html | 204 +++++++++++++++++++++ test/selenium/TestJavaScriptWorking.html | 64 +++++++ test/selenium/TestSuiteWhatDidTheySay.html | 2 + 3 files changed, 270 insertions(+) create mode 100644 test/selenium/TestInlineEditor.html create mode 100644 test/selenium/TestJavaScriptWorking.html diff --git a/test/selenium/TestInlineEditor.html b/test/selenium/TestInlineEditor.html new file mode 100644 index 0000000..48b3b28 --- /dev/null +++ b/test/selenium/TestInlineEditor.html @@ -0,0 +1,204 @@ + + + + + + +TestInlineEditor + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TestInlineEditor
clickAndWaitlink=exact:What Did They Say?!?
clickwdts-tab-misc-options
checkwdts[high_insertion_level]
clickAndWait//input[@value='Change Insertion Level']
assertTextPresentInsertion level updated.
clickAndWaitlink=Edit
clickAndWait//tr[contains(@id,"-${post_id}")]//div[@class="row-actions"]/span[@class="view"]/a
assertElementPresent//div[@class="wdts-transcript-container"]
assertVisible//a[text()="Edit/Add Transcripts"]
assertNotVisible//input[@name="wdts[post_id]"]/../
click//a[text()="Edit/Add Transcripts"]
waitForVisible//input[@name="wdts[post_id]"]/../
assertVisible//h3[contains(text(),"Edit Approved Transcripts:")]
assertNotVisible//h3[contains(text(),"Submit a New Transcript:")]
click//input[@name="wdts[allow_on_post]"]
waitForVisible//h3[contains(text(),"Submit a New Transcript:")]
assertVisible//h3[contains(text(),"Submit a New Transcript:")]
select//h3[contains(text(),"Submit a New Transcript:")]/following-sibling::form//selectlabel=English
typewdts[transcript]This is a test queued transcript.
clickAndWait//h3[contains(text(),"Submit a New Transcript:")]/following-sibling::form//input[@type="submit"]
assertElementPresent//div[@class="wdts-updated"]
assertElementPresent//div[@class="queued-transcript-holder"]
assertText//div[contains(@class,"queued-transcript") and contains(@class,"wdts-transcript")]This is a test queued transcript.
assertTextPresent(1 queued)
click//div[@class="queued-transcript-actions"]/button[text()="Approve"]
assertVisible//h3[contains(text(),"Edit Approved Transcripts:")]
assertVisible//h3[contains(text(),"Submit a New Transcript:")]
waitForElementNotPresent//div[@class="queued-transcript-actions"]
assertValue//textarea[@name="wdts[transcripts][en]"]This is a test queued transcript.
assertConfirmationThis will overwrite the current transcript. Are you sure?
refreshAndWait
assertTextNotPresent(1 queued)
assertText//div[contains(@class,"transcript-holder") and contains(@class,"en")]This is a test queued transcript.
assertNotVisible//input[@name="wdts[post_id]"]/../
assertNotVisible//h3[contains(text(),"Submit a New Transcript:")]
open/wp-admin/
+ + diff --git a/test/selenium/TestJavaScriptWorking.html b/test/selenium/TestJavaScriptWorking.html new file mode 100644 index 0000000..6826d90 --- /dev/null +++ b/test/selenium/TestJavaScriptWorking.html @@ -0,0 +1,64 @@ + + + + + + +TestJavaScriptWorking + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TestJavaScriptWorking
clickAndWaitlink=exact:What Did They Say?!?
assertVisiblewdts-page-introduction
assertElementPresent//a[@id="wdts-tab-how-it-works" and contains(@class,"inactive")]
clickAndWaitlink=Add New
assertNotVisible//div[@class="wdts-embed-warning"]
assertVisible//button[text()="Scene Heading"]
fireEvent//div[@class="wdts-button-holder"]//button[position()=1]click
answerOnNextPromptTest
assertPromptEnter the scene heading:
+ + diff --git a/test/selenium/TestSuiteWhatDidTheySay.html b/test/selenium/TestSuiteWhatDidTheySay.html index ccf2aad..c434f2e 100644 --- a/test/selenium/TestSuiteWhatDidTheySay.html +++ b/test/selenium/TestSuiteWhatDidTheySay.html @@ -9,6 +9,7 @@ + @@ -24,6 +25,7 @@ +
Test Suite
TestActivation
TestJavaScriptWorking
TestResetOptions
TestChangeCapabilities
TestResetOptions
TestResetOptions
TestCreatePost
TestMetaboxApprovedTranscriptEditing
TestInlineEditor
TestDeletePost
TestThemeEditorWorks
TestDeactivate