Commit e2e64c32 authored by Gabriel L. Oliveira's avatar Gabriel L. Oliveira

Refactor, fix test and reuse mixin methods

parent b153c8ae
...@@ -1188,25 +1188,26 @@ class TestUNGDocs(UNGTestMixin): ...@@ -1188,25 +1188,26 @@ class TestUNGDocs(UNGTestMixin):
test_time = int(unittest.time.time()) test_time = int(unittest.time.time())
#create 3 documents #create 3 documents
for doc_index in range(3): for doc_index in range(3):
web_page_name = "Functional UNG Test %d - Web Page %d" % (test_time, doc_index) web_page_name = "Functional UNG Test %d - Web Page %d" % (test_time,
web_page_url = self.create_document('page', web_page_name) doc_index)
self.create_document('page', name=web_page_name)
#assert no checkbox is checked #assert no checkbox is checked
self.open_ung_default_page() self.open_ung_default_page('ung')
self.failIf(self.selenium.is_checked("//tr[@class='your_listbox-data-line-0 DataA']/td[1]/input")) self.failIf(self.selenium.is_checked("//tr[@class='listbox-data-line-0 DataA']/td[1]/input"))
self.failIf(self.selenium.is_checked("//tr[@class='your_listbox-data-line-1 DataB']/td[1]/input")) self.failIf(self.selenium.is_checked("//tr[@class='listbox-data-line-1 DataB']/td[1]/input"))
self.failIf(self.selenium.is_checked("//tr[@class='your_listbox-data-line-2 DataA']/td[1]/input")) self.failIf(self.selenium.is_checked("//tr[@class='listbox-data-line-2 DataA']/td[1]/input"))
#click button to check all #click button to check all
self.selenium.click("//input[@name='your_listbox_checkAll:method']") self.selenium.click("//input[@name='listbox_checkAll:method']")
#check all checkboxes are selected #check all checkboxes are selected
self.failUnless(self.selenium.is_checked("//tr[@class='your_listbox-data-line-0 DataA']/td[1]/input")) self.failUnless(self.selenium.is_checked("//tr[@class='listbox-data-line-0 DataA']/td[1]/input"))
self.failUnless(self.selenium.is_checked("//tr[@class='your_listbox-data-line-1 DataB']/td[1]/input")) self.failUnless(self.selenium.is_checked("//tr[@class='listbox-data-line-1 DataB']/td[1]/input"))
self.failUnless(self.selenium.is_checked("//tr[@class='your_listbox-data-line-2 DataA']/td[1]/input")) self.failUnless(self.selenium.is_checked("//tr[@class='listbox-data-line-2 DataA']/td[1]/input"))
#click button to deselect all #click button to deselect all
self.selenium.click("//input[@name='your_listbox_uncheckAll:method']") self.selenium.click("//input[@name='listbox_uncheckAll:method']")
#check all cheboxes are deselected #check all cheboxes are deselected
self.failIf(self.selenium.is_checked("//tr[@class='your_listbox-data-line-0 DataA']/td[1]/input")) self.failIf(self.selenium.is_checked("//tr[@class='listbox-data-line-0 DataA']/td[1]/input"))
self.failIf(self.selenium.is_checked("//tr[@class='your_listbox-data-line-1 DataB']/td[1]/input")) self.failIf(self.selenium.is_checked("//tr[@class='listbox-data-line-1 DataB']/td[1]/input"))
self.failIf(self.selenium.is_checked("//tr[@class='your_listbox-data-line-2 DataA']/td[1]/input")) self.failIf(self.selenium.is_checked("//tr[@class='listbox-data-line-2 DataA']/td[1]/input"))
def test_pagination_with_many_documents(self): def test_pagination_with_many_documents(self):
"""UNG Docs should paginate when many documents are present. """UNG Docs should paginate when many documents are present.
......
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