TestComicPressManagerConfig
open /comicpress_manager_mu/wordpress-mu/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[4]//em[@title='Generation disabled'] not generating
assertElementNotPresent //div[@id='comicpress-details']//li[5]//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[4]//em[@title='Generation disabled']
assertText //div[@id='comicpress-details']//li[5]//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[4]//em[@title='Generation disabled'] not generating
assertText //div[@id='comicpress-details']//li[5]//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[4]//em[@title='Generation disabled']
assertElementNotPresent //div[@id='comicpress-details']//li[5]//em[@title='Generation disabled']