TestImportComic | ||
open | /comicpress_manager_mu/wordpress-mu/wp-admin/ | |
store | Selenium Hovertext | hovertext |
store | Selenium Transcript | transcript |
clickAndWait | link=ComicPress Config | |
click | folder-s-comic_folder | |
click | folder-s-rss_comic_folder | |
click | folder-s-archive_comic_folder | |
select | select-comic_folder | comics |
select | select-rss_comic_folder | comics-rss |
select | select-archive_comic_folder | comics-archive |
clickAndWait | //input[@value='Update Config'] | |
clickAndWait | link=Manager Config | |
check | cpm-edit-post-integrate | |
check | cpm-archive-generate-thumbnails | |
check | cpm-rss-generate-thumbnails | |
type | cpm-default-override-title | |
type | cpm-default-post-tags | |
uncheck | cpm-default-comic-category-is-last-storyline | |
clickAndWait | //input[@value='Change Configuration'] | |
clickAndWait | //a[contains(@href, 'comicpress-manager') and contains(text(), 'Upload')] | |
type | upload-0 | /home/john/Desktop/comicpress/selenium/1990-01-01-sample-comic.jpeg |
uncheck | multiple-new-post-checkbox | |
clickAndWait | submit | |
assertTextPresent | The following files were uploaded: 1990-01-01-sample-comic.jpeg | |
assertTextPresent | Thumbnails were written for the following files: 1990-01-01-sample-comic.jpeg | |
assertTextPresent | No new posts created. | |
clickAndWait | //li[@id='toplevel_page_comicpress-manager-comicpress_manager_admin']/div[2]/ul/li[2]/a | |
click | count-missing-posts-clicker | |
waitForText | //span[@id='missing-posts-display'] | 1 |
assertText | //span[@id='missing-posts-display'] | 1 |
assertChecked | //div[@id='create-missing-posts-holder']//div[1]//input | |
type | time | 12:00am |
type | hovertext-to-use | ${hovertext} |
type | transcript-to-use | ${transcript} |
clickAndWait | submit | |
assertTextPresent | New thumbnails were not needed for the following files: 1990-01-01-sample-comic.jpeg | |
assertTextPresent | New posts created. View them from the links below: | |
assertTextPresent | Sample Comic (1990-01-01 00:00:00) | |
clickAndWait | //div[@id='cpm-messages']//a[text()='Edit post'] | |
assertTextPresent | ComicPress Manager Edit Post file management is enabled. | |
assertText | //span[@id='timestamp'] | Published on: Jan 1, 1990 @ 0:00 |
assertText | //div[@id='comicdiv']/div[@class='inside']//strong[1] | 1990-01-01-sample-comic.jpeg |
assertValue | comicpress-img-title | ${hovertext} |
assertValue | comicpress-transcript | ${transcript} |
assertChecked | //div[@id='comicdiv']//table[@class='form-table']//tr[2]//div[1]//input | |
click | link=Delete | |
assertConfirmation | You are about to delete this post 'Sample Comic' 'Cancel' to stop, 'OK' to delete. |
|
clickAndWait | //li[@id='toplevel_page_comicpress-manager-comicpress_manager_admin']/div[2]/ul/li[2]/a | |
storeText | //div[@id='import-count-information'] | import_count |
getEval | /safely import ([0-9]+) comics/.test(storedVars['import_count']); storedVars['import_count'] = RegExp.$1 | |
clickAndWait | link=Bulk Edit page | |
assertText | //div[@class='activity-box']/h2 | Bulk Edit |
clickAndWait | //a[contains(@href, 'comicpress-manager') and contains(text(), 'Upload')] | |
type | upload-0 | /home/john/Desktop/comicpress/selenium/good-large-import.zip |
uncheck | multiple-new-post-checkbox | |
type | time | 12:00am |
click | submit | |
waitForPageToLoad | 200000 | |
clickAndWait | //li[@id='toplevel_page_comicpress-manager-comicpress_manager_admin']/div[2]/ul/li[2]/a | |
click | count-missing-posts-clicker | |
waitForText | //span[@id='missing-posts-display'] | 30 |
assertText | //span[@id='missing-posts-display'] | 30 |
clickAndWait | submit | |
assertText | //div[@id='cpm-messages']/ul/li[1] | Import safely exited before you ran out of execution time. Scroll down to continue creating missing posts. |
getEval | storedVars['index'] = storedVars['import_count'] | |
while | storedVars['index'] > 0 | |
assertText | //div[@id='cpm-messages']/ul/li[last()]/ul/li[${index}]/strong | Sample Import Comic |
assertTextPresent | regexp:1990-01-[0-9][0-9] | |
getEval | storedVars['index']-- | |
endWhile | ||
clickAndWait | //input[@value='Continue Creating Posts'] | |
assertText | //div[@id='cpm-messages']/ul/li[1] | Import safely exited before you ran out of execution time. Scroll down to continue creating missing posts. |
getEval | storedVars['index'] = storedVars['import_count'] | |
while | storedVars['index'] > 0 | |
assertTextPresent | Sample Import Comic | |
assertTextPresent | regexp:1990-01-[0-9][0-9] 00:00:00 | |
getEval | storedVars['index']-- | |
endWhile | ||
clickAndWait | //input[@value='Continue Creating Posts'] | |
assertTextPresent | No new posts needed to be created. | |
clickAndWait | link=Bulk Edit | |
select | dates | label=January 1990 |
clickAndWait | dofilter | |
click | toggle-all | |
select | bulk-action | label=Delete Selected |
click | doaction | |
assertConfirmation | You are about to delete the selected posts and comic files. Are you sure? | |
waitForPageToLoad | 30000 | |
click | toggle-all | |
select | bulk-action | label=Delete Selected |
click | doaction | |
assertConfirmation | You are about to delete the selected posts and comic files. Are you sure? | |
waitForPageToLoad | 30000 | |
assertTextPresent | No items to display | |
clickAndWait | //a[contains(@href, 'comicpress-manager') and contains(text(), 'Upload')] | |
click | multiple-new-post-checkbox | |
type | upload-0 | /home/john/Desktop/comicpress/selenium/1990-01-01-UPPERCASE-COMIC.JPG |
clickAndWait | submit | |
clickAndWait | //li[@id='toplevel_page_comicpress-manager-comicpress_manager_admin']/div[2]/ul/li[2]/a | |
click | count-missing-posts-clicker | |
waitForText | //span[@id='missing-posts-display'] | 1 |
assertText | //span[@id='missing-posts-display'] | 1 |
clickAndWait | link=Bulk Edit | |
select | dates | label=January 1990 |
clickAndWait | dofilter | |
click | toggle-all | |
select | bulk-action | label=Delete Selected |
click | doaction | |
assertConfirmation | You are about to delete the selected posts and comic files. Are you sure? | |
waitForPageToLoad | 30000 |