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):
test_time = int(unittest.time.time())
#create 3 documents
for doc_index in range(3):
web_page_name = "Functional UNG Test %d - Web Page %d" % (test_time, doc_index)
web_page_url = self.create_document('page', web_page_name)
web_page_name = "Functional UNG Test %d - Web Page %d" % (test_time,
doc_index)
self.create_document('page', name=web_page_name)
#assert no checkbox is checked
self.open_ung_default_page()
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='your_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.open_ung_default_page('ung')
self.failIf(self.selenium.is_checked("//tr[@class='listbox-data-line-0 DataA']/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='listbox-data-line-2 DataA']/td[1]/input"))
#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
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='your_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-0 DataA']/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='listbox-data-line-2 DataA']/td[1]/input"))
#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
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='your_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-0 DataA']/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='listbox-data-line-2 DataA']/td[1]/input"))
def test_pagination_with_many_documents(self):
"""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