Commit 09b012fb authored by Gabriel L. Oliveira's avatar Gabriel L. Oliveira

2011-05-17 gabriel.oliveira

* add test class to group tests related to fill content on web tables
parent de5383f8
from UNGTestMixin import UNGTestMixin
import unittest
class TestUNGDocsTableEditor(UNGTestMixin):
def test_fill_some_cells_in_web_table(self):
"""test the action of add, fill cells, assert title of sheet and
content of cells of a Web Table document"""
self.selenium.open("ERP5Site_createNewWebDocument?template=web_table_template")
self.selenium.wait_for_page_to_load("30000")
self.assertEqual("Web Table", self.selenium.get_text("//a[@name=\"document_title\"]"))
self.failUnless(self.selenium.is_element_present("//td[@id='0_table0_cell_c0_r1']"))
self.failUnless(self.selenium.is_element_present("//td[@id='0_table0_cell_c1_r1']"))
self.assertEqual("Spreadsheet Playground", self.selenium.get_text("//td[@id=\"jSheetTitle_0\"]"))
self.assertEqual("MENU", self.selenium.get_text("//td[@id=\"jSheetMenu_0\"]/span[@class=\"rootVoice\"]"))
self.selenium.run_script("$(\"#0_table0_cell_c0_r0\").html(\"Gabriel\")")
self.selenium.run_script("$(\"#0_table0_cell_c1_r1\").html(\"Monnerat\")")
self.selenium.click("//button[@class=\"save\"]")
self.selenium.wait_for_page_to_load("30000")
self.assertEqual("Gabriel", self.selenium.get_text("//td[@id='0_table0_cell_c0_r0']"))
self.assertEqual("Monnerat", self.selenium.get_text("//td[@id='0_table0_cell_c1_r1']"))
if __name__ == "__main__":
unittest.main()
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