TestStorylineStructure
open /comicpress_manager_mu/wordpress-mu/wp-admin/
clickAndWait link=Storyline Structure
uncheck enable-storyline-support
click enable-storyline-support
assertVisible //div[@id='storyline-holder']
click enable-storyline-support
assertNotVisible //div[@id='storyline-holder']
clickAndWait //input[@value='Save Structure and Modify Categories']
assertNotVisible //div[@id='storyline-holder']
click enable-storyline-support
clickAndWait //input[@value='Save Structure and Modify Categories']
assertVisible //div[@id='storyline-holder']
store Selenium Test Category 123 catname1
store Selenium Test Category 234 catname2
click //div[@id='storyline-holder']/div[1]//a
type //div[@id='storyline-holder']/div[2]/input ${catname1}
clickAndWait //input[@value='Save Structure and Modify Categories']
assertElementPresent //div[@id='storyline-holder']/div[2]/input[@value='${catname1}']
click //div[@id='storyline-holder']/div[2]//a[1]
type //div[@id='storyline-holder']/div[3]/input ${catname2}
clickAndWait //input[@value='Save Structure and Modify Categories']
assertElementPresent //div[@id='storyline-holder']/div[3]/input[@value='${catname2}']
click //div[@id='storyline-holder']/div[3]//a[@class='up']
assertElementPresent //div[@id='storyline-holder']/div[2]/input[@value='${catname2}']
assertElementPresent //div[@id='storyline-holder']/div[3]/input[@value='${catname1}']
click //div[@id='storyline-holder']/div[3]//a[@class='delete']
click //div[@id='storyline-holder']/div[2]//a[@class='delete']
clickAndWait //input[@value='Save Structure and Modify Categories']
assertElementNotPresent //div[@id='storyline-holder']/div[3]/input[@value='${catname1}']
assertElementNotPresent //div[@id='storyline-holder']/div[2]/input[@value='${catname2}']