Commit 2e14569a authored by Gabriel L. Oliveira's avatar Gabriel L. Oliveira

2011-05-16 gabriel.oliveira

* add more property asserts when naming and renaming
parent 4dbf566a
......@@ -7,7 +7,7 @@ class TestUNGChangeTitle(BaseUNGTest):
self.init()
self.login_as_default_user()
#New web illustration
#New Web Illustration
sel.open("ERP5Site_createNewWebDocument?template=web_illustration_template")
sel.wait_for_page_to_load("30000")
self.assertEqual("Web Illustration", sel.get_text("//a[@name=\"document_title\"]"))
......@@ -59,7 +59,7 @@ class TestUNGChangeTitle(BaseUNGTest):
self.assertEqual("", sel.get_text("//input[@id='language']"))
sel.type("language", "fr")
self.assertEqual("", sel.get_text("//input[@id='sort_index']"))
sel.type("sort_index", "0")
sel.type("sort_index", "1")
self.assertEqual("", sel.get_text("//textarea[@id='keyword_list']"))
sel.type("keyword_list", "Functional UNG Test\nUNG Test")
sel.click("//div[@class=\"ui-dialog-buttonset\"]/button[1]/span")
......@@ -72,6 +72,21 @@ class TestUNGChangeTitle(BaseUNGTest):
sel.open("")
sel.wait_for_page_to_load("30000")
self.assertEqual("Functional UNG Test - Web Illustration", sel.get_text("//tr[@class='your_listbox-data-line-0 DataA']/td[3]"))
sel.click("//tr[@class='your_listbox-data-line-0 DataA']/td[3]/a")
sel.wait_for_page_to_load("30000")
self.assertEqual("Functional UNG Test - Web Illu...", sel.get_text("//a[@name=\"document_title\"]"))
sel.click("//a[@name=\"document_title\"]")
self.assertEqual("Rename Document", sel.get_text("//span[@id=\"ui-dialog-title-edit_document\"]"))
self.assertEqual("Functional UNG Test - Web Illustration", sel.get_value("//input[@id='name']"))
self.assertEqual("Edit More Properties", sel.get_text("//p[@id=\"more_properties\"]"))
sel.click("//p[@id=\"more_properties\"]")
self.assertEqual("Func. UNG Test - Web Illustration", sel.get_value("//input[@id='short_title']"))
self.assertEqual("002", sel.get_value("//input[@id='version']"))
self.assertEqual("fr", sel.get_value("//input[@id='language']"))
self.assertEqual("1", sel.get_value("//input[@id='sort_index']"))
self.assertEqual("Functional UNG Test\nUNG Test", sel.get_value("//textarea[@id='keyword_list']"))
sel.open("")
sel.wait_for_page_to_load("30000")
sel.type("//input[@name=\"field_your_search_text\"]", "\"Functional UNG Test - Web Illustration\"")
sel.click("//input[@value=\"Search Docs\"]")
sel.wait_for_page_to_load("30000")
......@@ -96,7 +111,7 @@ class TestUNGChangeTitle(BaseUNGTest):
self.assertEqual("", sel.get_text("//input[@id='language']"))
sel.type("language", "en")
self.assertEqual("", sel.get_text("//input[@id='sort_index']"))
sel.type("sort_index", "1")
sel.type("sort_index", "2")
self.assertEqual("", sel.get_text("//textarea[@id='keyword_list']"))
sel.type("keyword_list", "Functional UNG Test Renamed\nUNG Test Renamed")
sel.click("//div[@class=\"ui-dialog-buttonset\"]/button[1]/span")
......@@ -112,6 +127,16 @@ class TestUNGChangeTitle(BaseUNGTest):
sel.click("//tr[@class='your_listbox-data-line-0 DataA']/td[3]/a")
sel.wait_for_page_to_load("30000")
self.assertEqual("Functional UNG Test - Renamed ...", sel.get_text("//a[@name=\"document_title\"]"))
sel.click("//a[@name=\"document_title\"]")
self.assertEqual("Rename Document", sel.get_text("//span[@id=\"ui-dialog-title-edit_document\"]"))
self.assertEqual("Functional UNG Test - Renamed Web Illustration", sel.get_value("//input[@id='name']"))
self.assertEqual("Edit More Properties", sel.get_text("//p[@id=\"more_properties\"]"))
sel.click("//p[@id=\"more_properties\"]")
self.assertEqual("Func. UNG Test - Renamed Web Illustration", sel.get_value("//input[@id='short_title']"))
self.assertEqual("003", sel.get_value("//input[@id='version']"))
self.assertEqual("en", sel.get_value("//input[@id='language']"))
self.assertEqual("2", sel.get_value("//input[@id='sort_index']"))
self.assertEqual("Functional UNG Test Renamed\nUNG Test Renamed", sel.get_value("//textarea[@id='keyword_list']"))
sel.open("")
sel.wait_for_page_to_load("30000")
sel.type("//input[@name=\"field_your_search_text\"]", "\"Functional UNG Test - Renamed Web Illustration\"")
......@@ -171,7 +196,7 @@ class TestUNGChangeTitle(BaseUNGTest):
self.assertEqual("", sel.get_text("//input[@id='language']"))
sel.type("language", "fr")
self.assertEqual("", sel.get_text("//input[@id='sort_index']"))
sel.type("sort_index", "0")
sel.type("sort_index", "1")
self.assertEqual("", sel.get_text("//textarea[@id='keyword_list']"))
sel.type("keyword_list", "Functional UNG Test\nUNG Test")
sel.click("//div[@class=\"ui-dialog-buttonset\"]/button[1]/span")
......@@ -184,6 +209,21 @@ class TestUNGChangeTitle(BaseUNGTest):
sel.open("")
sel.wait_for_page_to_load("30000")
self.assertEqual("Functional UNG Test - Web Table", sel.get_text("//tr[@class='your_listbox-data-line-0 DataA']/td[3]"))
sel.click("//tr[@class='your_listbox-data-line-0 DataA']/td[3]/a")
sel.wait_for_page_to_load("30000")
self.assertEqual("Functional UNG Test - Web Tabl...", sel.get_text("//a[@name=\"document_title\"]"))
sel.click("//a[@name=\"document_title\"]")
self.assertEqual("Rename Document", sel.get_text("//span[@id=\"ui-dialog-title-edit_document\"]"))
self.assertEqual("Functional UNG Test - Web Table", sel.get_value("//input[@id='name']"))
self.assertEqual("Edit More Properties", sel.get_text("//p[@id=\"more_properties\"]"))
sel.click("//p[@id=\"more_properties\"]")
self.assertEqual("Func. UNG Test - Web Table", sel.get_value("//input[@id='short_title']"))
self.assertEqual("002", sel.get_value("//input[@id='version']"))
self.assertEqual("fr", sel.get_value("//input[@id='language']"))
self.assertEqual("1", sel.get_value("//input[@id='sort_index']"))
self.assertEqual("Functional UNG Test\nUNG Test", sel.get_value("//textarea[@id='keyword_list']"))
sel.open("")
sel.wait_for_page_to_load("30000")
sel.type("//input[@name=\"field_your_search_text\"]", "\"Functional UNG Test - Web Table\"")
sel.click("//input[@value=\"Search Docs\"]")
sel.wait_for_page_to_load("30000")
......@@ -208,7 +248,7 @@ class TestUNGChangeTitle(BaseUNGTest):
self.assertEqual("", sel.get_text("//input[@id='language']"))
sel.type("language", "en")
self.assertEqual("", sel.get_text("//input[@id='sort_index']"))
sel.type("sort_index", "1")
sel.type("sort_index", "2")
self.assertEqual("", sel.get_text("//textarea[@id='keyword_list']"))
sel.type("keyword_list", "Functional UNG Test Renamed\nUNG Test Renamed")
sel.click("//div[@class=\"ui-dialog-buttonset\"]/button[1]/span")
......@@ -224,6 +264,16 @@ class TestUNGChangeTitle(BaseUNGTest):
sel.click("//tr[@class='your_listbox-data-line-0 DataA']/td[3]/a")
sel.wait_for_page_to_load("30000")
self.assertEqual("Functional UNG Test - Renamed ...", sel.get_text("//a[@name=\"document_title\"]"))
sel.click("//a[@name=\"document_title\"]")
self.assertEqual("Rename Document", sel.get_text("//span[@id=\"ui-dialog-title-edit_document\"]"))
self.assertEqual("Functional UNG Test - Renamed Web Table", sel.get_value("//input[@id='name']"))
self.assertEqual("Edit More Properties", sel.get_text("//p[@id=\"more_properties\"]"))
sel.click("//p[@id=\"more_properties\"]")
self.assertEqual("Func. UNG Test - Renamed Web Table", sel.get_value("//input[@id='short_title']"))
self.assertEqual("003", sel.get_value("//input[@id='version']"))
self.assertEqual("en", sel.get_value("//input[@id='language']"))
self.assertEqual("2", sel.get_value("//input[@id='sort_index']"))
self.assertEqual("Functional UNG Test Renamed\nUNG Test Renamed", sel.get_value("//textarea[@id='keyword_list']"))
sel.open("")
sel.wait_for_page_to_load("30000")
sel.type("//input[@name=\"field_your_search_text\"]", "\"Functional UNG Test - Renamed Web Table\"")
......@@ -283,7 +333,7 @@ class TestUNGChangeTitle(BaseUNGTest):
self.assertEqual("", sel.get_text("//input[@id='language']"))
sel.type("language", "fr")
self.assertEqual("", sel.get_text("//input[@id='sort_index']"))
sel.type("sort_index", "0")
sel.type("sort_index", "1")
self.assertEqual("", sel.get_text("//textarea[@id='keyword_list']"))
sel.type("keyword_list", "Functional UNG Test\nUNG Test")
sel.click("//div[@class=\"ui-dialog-buttonset\"]/button[1]/span")
......@@ -296,6 +346,21 @@ class TestUNGChangeTitle(BaseUNGTest):
sel.open("")
sel.wait_for_page_to_load("30000")
self.assertEqual("Functional UNG Test - Web Page", sel.get_text("//tr[@class='your_listbox-data-line-0 DataA']/td[3]"))
sel.click("//tr[@class='your_listbox-data-line-0 DataA']/td[3]/a")
sel.wait_for_page_to_load("30000")
self.assertEqual("Functional UNG Test - Web Page", sel.get_text("//a[@name=\"document_title\"]"))
sel.click("//a[@name=\"document_title\"]")
self.assertEqual("Rename Document", sel.get_text("//span[@id=\"ui-dialog-title-edit_document\"]"))
self.assertEqual("Functional UNG Test - Web Page", sel.get_value("//input[@id='name']"))
self.assertEqual("Edit More Properties", sel.get_text("//p[@id=\"more_properties\"]"))
sel.click("//p[@id=\"more_properties\"]")
self.assertEqual("Func. UNG Test - Web Page", sel.get_value("//input[@id='short_title']"))
self.assertEqual("002", sel.get_value("//input[@id='version']"))
self.assertEqual("fr", sel.get_value("//input[@id='language']"))
self.assertEqual("1", sel.get_value("//input[@id='sort_index']"))
self.assertEqual("Functional UNG Test\nUNG Test", sel.get_value("//textarea[@id='keyword_list']"))
sel.open("")
sel.wait_for_page_to_load("30000")
sel.type("//input[@name=\"field_your_search_text\"]", "\"Functional UNG Test - Web Page\"")
sel.click("//input[@value=\"Search Docs\"]")
sel.wait_for_page_to_load("30000")
......@@ -320,7 +385,7 @@ class TestUNGChangeTitle(BaseUNGTest):
self.assertEqual("", sel.get_text("//input[@id='language']"))
sel.type("language", "en")
self.assertEqual("", sel.get_text("//input[@id='sort_index']"))
sel.type("sort_index", "1")
sel.type("sort_index", "2")
self.assertEqual("", sel.get_text("//textarea[@id='keyword_list']"))
sel.type("keyword_list", "Functional UNG Test Renamed\nUNG Test Renamed")
sel.click("//div[@class=\"ui-dialog-buttonset\"]/button[1]/span")
......@@ -336,6 +401,16 @@ class TestUNGChangeTitle(BaseUNGTest):
sel.click("//tr[@class='your_listbox-data-line-0 DataA']/td[3]/a")
sel.wait_for_page_to_load("30000")
self.assertEqual("Functional UNG Test - Renamed ...", sel.get_text("//a[@name=\"document_title\"]"))
sel.click("//a[@name=\"document_title\"]")
self.assertEqual("Rename Document", sel.get_text("//span[@id=\"ui-dialog-title-edit_document\"]"))
self.assertEqual("Functional UNG Test - Renamed Web Page", sel.get_value("//input[@id='name']"))
self.assertEqual("Edit More Properties", sel.get_text("//p[@id=\"more_properties\"]"))
sel.click("//p[@id=\"more_properties\"]")
self.assertEqual("Func. UNG Test - Renamed Web Page", sel.get_value("//input[@id='short_title']"))
self.assertEqual("003", sel.get_value("//input[@id='version']"))
self.assertEqual("en", sel.get_value("//input[@id='language']"))
self.assertEqual("2", sel.get_value("//input[@id='sort_index']"))
self.assertEqual("Functional UNG Test Renamed\nUNG Test Renamed", sel.get_value("//textarea[@id='keyword_list']"))
sel.open("")
sel.wait_for_page_to_load("30000")
sel.type("//input[@name=\"field_your_search_text\"]", "\"Functional UNG Test - Renamed Web Page\"")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment