Commit 42db2085 authored by Gabriel L. Oliveira's avatar Gabriel L. Oliveira

Fix test, improve readability and reuse mixin methods

parent b85ce47f
...@@ -58,19 +58,25 @@ class TestUNGDocsSharing(UNGTestMixin): ...@@ -58,19 +58,25 @@ class TestUNGDocsSharing(UNGTestMixin):
self.assertEqual("My Subject", self.selenium.get_value("//textarea[@id=\"keyword_list\"]")) self.assertEqual("My Subject", self.selenium.get_value("//textarea[@id=\"keyword_list\"]"))
self.selenium.click("//div[@class=\"ui-dialog-buttonset\"]/button[1]") self.selenium.click("//div[@class=\"ui-dialog-buttonset\"]/button[1]")
self.selenium.wait_for_page_to_load("30000") self.selenium.wait_for_page_to_load("30000")
self.rename_document(name='Document Shared Updated', version='003')
self.selenium.open("WebSite_logout") self.selenium.open("WebSite_logout")
self.selenium.wait_for_page_to_load("30000") self.selenium.wait_for_page_to_load("30000")
self.login_as_default_user() self.login_as_default_user()
self.selenium.click("//table[@class=\"listbox your_listbox your_listbox-table\"]/tbody/tr/td[3]/a") self.selenium.wait_for_condition("selenium.isElementPresent(\"//table[@class='listbox listbox listbox-table']\")", "30000")
self.selenium.click("//table[@class='listbox listbox listbox-table']/tbody/tr/td[3]/a")
self.selenium.wait_for_page_to_load("30000") self.selenium.wait_for_page_to_load("30000")
self.selenium.click("//a[@name=\"document_title\"]") self.selenium.click("//a[@name=\"document_title\"]")
self.selenium.click("//p[@id=\"more_properties\"]") self.selenium.click("//p[@id=\"more_properties\"]")
self.selenium.type("//input[@id=\"version\"]", "003") self.assertEqual("Document Shared Updated", self.selenium.get_value("//input[@id=\"name\"]"))
self.assertEqual("003", self.selenium.get_value("//input[@id=\"version\"]"))
self.assertEqual("pt-br", self.selenium.get_value("//input[@id=\"language\"]"))
self.assertEqual("My Subject", self.selenium.get_value("//textarea[@id=\"keyword_list\"]"))
self.selenium.click("//div[@class=\"ui-dialog-buttonset\"]/button[1]") self.selenium.click("//div[@class=\"ui-dialog-buttonset\"]/button[1]")
self.selenium.wait_for_page_to_load("30000") self.selenium.wait_for_page_to_load("30000")
self.rename_document(version='004')
self.selenium.click("//a[@name=\"document_title\"]") self.selenium.click("//a[@name=\"document_title\"]")
self.selenium.click("//p[@id=\"more_properties\"]") self.selenium.click("//p[@id=\"more_properties\"]")
self.assertEqual("003", self.selenium.get_value("//input[@id=\"version\"]")) self.assertEqual("004", self.selenium.get_value("//input[@id=\"version\"]"))
#XXX this test delete all documents here #XXX this test delete all documents here
# but it won't be done # but it won't be done
......
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