TestComicPressManagerConfig
open /wp-admin/
clickAndWait link=Manager Config
storeValue cpm-default-post-time original_time
storeValue cpm-default-override-title original_title
storeValue cpm-default-post-tags original_tags
store Selenium Title title
store Selenium Tags tags
store 7:38am time
type cpm-default-post-time ${time}
type cpm-default-override-title ${title}
type cpm-default-post-tags ${tags}
check cpm-archive-generate-thumbnails
check cpm-rss-generate-thumbnails
clickAndWait //input[@value='Change Configuration']
assertTextPresent ComicPress Manager configuration updated.
assertValue cpm-default-post-time ${time}
assertValue cpm-default-override-title ${title}
assertValue cpm-default-post-tags ${tags}
type cpm-default-post-time ${original_time}
type cpm-default-override-title ${original_title}
type cpm-default-post-tags ${original_tags}
clickAndWait //input[@value='Change Configuration']
assertTextPresent ComicPress Manager configuration updated.
type cpm-default-post-time meow123
type cpm-default-override-title ${title}
clickAndWait //input[@value='Change Configuration']
assertNotValue cpm-default-post-time meow123
assertNotValue cpm-default-post-time ${title}
assertTextPresent You entered invalid data into your configuration.
uncheck cpm-default-comic-category-is-last-storyline
clickAndWait //input[@value='Change Configuration']
assertTextPresent ComicPress Manager configuration updated.
clickAndWait //a[contains(@href, 'comicpress-manager') and contains(text(), 'Upload')]
assertChecked //div[@id='multiple-new-post-holder']/table[@class='form-table'][2]//td[1]//div[1]//input
assertNotChecked //div[@id='multiple-new-post-holder']/table[@class='form-table'][2]//td[1]//div[last()]//input
clickAndWait link=Manager Config
check cpm-default-comic-category-is-last-storyline
clickAndWait //input[@value='Change Configuration']
assertTextPresent ComicPress Manager configuration updated.
clickAndWait //a[contains(@href, 'comicpress-manager') and contains(text(), 'Upload')]
assertNotChecked //div[@id='multiple-new-post-holder']/table[@class='form-table'][2]//td[1]//div[1]//input
assertChecked //div[@id='multiple-new-post-holder']/table[@class='form-table'][2]//td[1]//div[last()]//input
clickAndWait link=Manager Config
uncheck cpm-default-comic-category-is-last-storyline
check //input[@name='cpm-default-additional-categories[]'][1]
clickAndWait //input[@value='Change Configuration']
assertTextPresent ComicPress Manager configuration updated.
clickAndWait //a[contains(@href, 'comicpress-manager') and contains(text(), 'Upload')]
assertChecked //input[@name='additional-categories[]'][1]
clickAndWait link=Manager Config
uncheck //input[@name='cpm-default-additional-categories[]'][1]
clickAndWait //input[@value='Change Configuration']
assertTextPresent ComicPress Manager configuration updated.
clickAndWait //a[contains(@href, 'comicpress-manager') and contains(text(), 'Upload')]
assertNotChecked //input[@name='additional-categories[]'][1]
clickAndWait link=Manager Config
select cpm-sidebar-type label=ComicPress Status and Help
uncheck cpm-edit-post-integrate
clickAndWait //input[@value='Change Configuration']
assertTextPresent ComicPress Manager configuration updated.
clickAndWait //a[@href='post-new.php']
assertTextNotPresent ComicPress Manager Edit Post file management is enabled.
clickAndWait link=Manager Config
check cpm-edit-post-integrate
clickAndWait //input[@value='Change Configuration']
clickAndWait //a[@href='post-new.php']
assertTextPresent ComicPress Manager Edit Post file management is enabled.
clickAndWait link=Manager Config
check cpm-perform-gd-check
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-not-jpeg.jpeg
clickAndWait //input[@id='top-submit']
assertTextPresent According to GD, the following files were invalid image files
clickAndWait link=Manager Config
uncheck cpm-perform-gd-check
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-not-jpeg.jpeg
clickAndWait //input[@id='top-submit']
assertTextPresent The following files were uploaded
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
assertTextPresent 1990-01-01-sample-comic-not-jpeg.jpeg
clickAndWait link=Manager Config
check cpm-perform-gd-check
clickAndWait //input[@value='Change Configuration']
clickAndWait link=Manager Config
uncheck cpm-archive-generate-thumbnails
check cpm-rss-generate-thumbnails
clickAndWait //input[@value='Change Configuration']
assertText //div[@id='comicpress-details']//li[3]//em[@title='Generation disabled'] not generating
assertElementNotPresent //div[@id='comicpress-details']//li[4]//em[@title='Generation disabled']
clickAndWait link=Dashboard
assertTextPresent rss thumbnails that are
assertTextNotPresent archive thumbnails that are
clickAndWait //a[contains(@href, 'comicpress-manager') and contains(text(), 'Upload')]
assertTextPresent If enabled, you'll be writing thumbnails to: rss
clickAndWait link=Add New
assertTextPresent (thumbnails will be generated)
clickAndWait link=Manager Config
check cpm-archive-generate-thumbnails
uncheck cpm-rss-generate-thumbnails
clickAndWait //input[@value='Change Configuration']
assertElementNotPresent //div[@id='comicpress-details']//li[3]//em[@title='Generation disabled']
assertText //div[@id='comicpress-details']//li[4]//em[@title='Generation disabled'] not generating
clickAndWait link=Dashboard
assertTextNotPresent rss thumbnails that are
assertTextPresent archive thumbnails that are
clickAndWait //a[contains(@href, 'comicpress-manager') and contains(text(), 'Upload')]
assertTextPresent If enabled, you'll be writing thumbnails to: archive
clickAndWait link=Add New
assertTextPresent (thumbnails will be generated)
clickAndWait link=Manager Config
uncheck cpm-archive-generate-thumbnails
uncheck cpm-rss-generate-thumbnails
clickAndWait //input[@value='Change Configuration']
assertText //div[@id='comicpress-details']//li[3]//em[@title='Generation disabled'] not generating
assertText //div[@id='comicpress-details']//li[4]//em[@title='Generation disabled'] not generating
clickAndWait link=Dashboard
assertTextNotPresent rss thumbnails that are
assertTextNotPresent archive thumbnails that are
clickAndWait //a[contains(@href, 'comicpress-manager') and contains(text(), 'Upload')]
assertTextNotPresent Generate thumbnails:
clickAndWait link=Add New
assertTextNotPresent (thumbnails will be generated)
clickAndWait link=Manager Config
check cpm-archive-generate-thumbnails
check cpm-rss-generate-thumbnails
clickAndWait //input[@value='Change Configuration']
assertElementNotPresent //div[@id='comicpress-details']//li[3]//em[@title='Generation disabled']
assertElementNotPresent //div[@id='comicpress-details']//li[4]//em[@title='Generation disabled']
clickAndWait link=Manager Config
type cpm-default-post-time now
clickAndWait //input[@value='Change Configuration']
assertTextPresent ComicPress Manager configuration updated.
clickAndWait //a[contains(@href, 'comicpress-manager') and contains(text(), 'Upload')]
assertValue time now
type upload-0 /home/john/Desktop/comicpress/selenium/1990-01-01-sample-comic.jpeg
clickAndWait top-submit
assertTextPresent New posts created. View them from the links below:
assertTextPresent regexp:Sample Comic \(1990-01-01 [0-9][0-9]:[0-9][0-9]:[0-9][0-9]\)
clickAndWait link=Dashboard
assertTextPresent Your post will be going live now
type upload /home/john/Desktop/comicpress/selenium/1990-01-01-sample-comic.jpeg
type override-date 1990-01-02
clickAndWait //input[@value='Upload Comic File and Edit Post']
assertTextPresent regexp:Publish on: Jan 2, 1990 @ [0-9]{1,2}:[0-9][0-9]
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
clickAndWait link=Manager Config
type cpm-default-post-time ${original_time}
clickAndWait //input[@value='Change Configuration']
assertTextPresent ComicPress Manager configuration updated.
clickAndWait link=Manager Config
check cpm-strip-icc-profiles
clickAndWait //input[@value='Change Configuration']
assertTextPresent ComicPress Manager configuration updated.
clickAndWait //a[contains(@href, 'comicpress-manager') and contains(text(), 'Upload')]
type upload-0 /home/john/Desktop/comicpress/selenium/1990-01-01-sample-comic-profile.jpg
clickAndWait submit
assertTextPresent The following files were uploaded: 1990-01-01-sample-comic-profile.jpg
assertTextPresent Thumbnails were written for the following files: 1990-01-01-sample-comic-profile.jpg
clickAndWait link=Bulk Edit
select dates label=January 1990
clickAndWait dofilter
click toggle-all
assertAttribute //img[@id='comic-icon-0']@src *1990-01-01-sample-comic-profile.jpg
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 The following comic files and their associated thumbnails were deleted: 1990-01-01-sample-comic-profile.jpg
clickAndWait link=Manager Config
uncheck cpm-strip-icc-profiles
clickAndWait //input[@value='Change Configuration']
assertTextPresent ComicPress Manager configuration updated.