Commit 3f8ac9df authored by Gabriel L. Oliveira's avatar Gabriel L. Oliveira

2011-05-16 gabriel.oliveira

* Remove unnecessary comments
* Translate comments
parent c9b58c2a
from base import BaseUNGTest
import unittest
#from tr to sel.
#search: \<tr\>.*\n.*\<td\>(.*)\<\/td\>.*\n.*\<td\>(.*)\<\/td\>.*\n.*\<td\>(.*)\<\/td\>.*\n.*\<\/tr\>
#replace: sel.\1(\2, \3)
#from sel.verifyTextNotPresent to sel.failIf
#search: sel.verifyTextNotPresent\((.*)\)
#replace: self.failIf(sel.is_text_present(\1))
#from sel.verifyTextPresent to sel.failUnless
#search: sel.verifyTextPresent\((.*), \"\"\)
#replace: self.failUnless(sel.is_text_present(\1))
#search: waitForCondition
#replace: wait_for_condition
#attention here to the '?' after .*, making the regular expression un-greedy
#search: sel.is_element_present\((.*?)\)
#replace: str(str(sel.is_element_present(\1)).lower()).lower()
#search: sel.verifyAttribute\((.*), (.*)\)
#replace: try: self.assertEqual(\2, sel.get_attribute(\1))
# except AssertionError, e: self.verificationErrors.append(str(e))
#search: self.assertEqual("checked",
#replace: self.assertEqual(u'true',
#search: sel.openAndWait\((.*), \"\"\)
#replace: sel.open(\1)\n sel.wait_for_page_to_load(5000)
#no search para wait_for_condition(
#replace o " de dentro do elemento por \"
class TestUNGSettings(BaseUNGTest):
def test_ung_settings(self):
sel = self.selenium
......@@ -68,7 +36,7 @@ class TestUNGSettings(BaseUNGTest):
sel.wait_for_page_to_load(5000)
#don't try to create a new user since
#test's instance already have one with login_name 'ung_user2'
#XXX this is not correct, because it has t#o be created once a time
#XXX this is not correct, because it has to be created once a time
# next ones, just login
## sel.click("//td[@id='new-account-form']")
# # sel.type("//input[@name='firstname']", "Another")
......
......@@ -37,7 +37,7 @@ class TestUNGSubjectList(BaseUNGTest):
self.set_default_tree_view()
sel.click("//button[@value='ung_domain/by_subject.0']")
sel.wait_for_page_to_load('30000')
#XXX precisa dessa condition? ela esta falhando sempre sem pdb, faca o que eu fizer
#XXX doesn't need this condition. just assert text
# sel.wait_for_condition("selenium.isTextPresent(\"Ung test subject %d\")" % test_subject_time, "30000")
self.assertEqual("Ung test subject %d" % test_subject_time, sel.get_text("//button[@value='ung_domain/by_subject/subject_UNG Test Subject %d.1']" % test_subject_time))
self.failUnless(sel.is_element_present("//button[@value='ung_domain/by_subject/subject_UNG Test Subject %d.1']" % test_subject_time))
......@@ -78,9 +78,6 @@ class TestUNGSubjectList(BaseUNGTest):
#TODO: find if this is correct behaviour (by_subject already selected)
#sel.click("//button[@value='ung_domain/by_subject.0']")
#sel.wait_for_page_to_load(3000)
#XXX precisa dessa condition? ela esta falhando sempre sem pdb, faca o que eu fizer
# tinha a condition aqui para o elemento que pega-se texto logo abaixo, basta recriar a linha
#import ipdb; ipdb.set_trace()
self.assertEqual("Ung test web table subject %d" % test_subject_time, sel.get_text("//button[@value='ung_domain/by_subject/subject_UNG Test Web Table Subject %d.1']" % test_subject_time))
sel.click("//button[@value='ung_domain/by_subject/subject_UNG Test Web Table Subject %d.1']" % test_subject_time)
sel.wait_for_page_to_load("30000")
......
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