added some basic unittests

changed warning/success message system to a new style
unified design of "hints" in form interfaces
fixed small bugs in "network" and "partition" plugin interfaces
"partition" and "disks" plugins: show blockdevice size during device selection
german translation for "disks" plugin added
This commit is contained in:
lars 2006-11-02 14:01:09 +00:00
parent 29d2e442f2
commit c35e204a7b
34 changed files with 197 additions and 57 deletions

View file

@ -2,6 +2,8 @@
<div id="doc">
<?cs call:handle_messages() ?>
<?cs include:Settings.DocDir + '/' + Settings.Language + '/' + Data.Plugins.help.Page + '.html' ?>
</div>

View file

@ -0,0 +1,29 @@
import WebInterfaceTestClass
from twill.errors import *
class unittests(WebInterfaceTestClass.WebInterfaceTestClass):
def test_help_pages(self):
'''help pages should be available in different languages'''
## check english help pages
self.cmd.go(self.URL + "plugins/help?weblang=en")
self.cmd.find("Table of Contents")
self.cmd.find("Getting started")
self.cmd.go(self.URL + "plugins/help?weblang=de")
self.cmd.find("Table of Contents")
self.cmd.find("Wie geht es los")
self.cmd.go(self.URL + "plugins/help?weblang=si")
self.assertRaises(TwillAssertionError, self.cmd.notfind, "Table of Contents")
#TODO: add a slovene text here, as soon as the help is translated
self.cmd.go(self.URL + "plugins/help?weblang=fr")
self.assertRaises(TwillAssertionError, self.cmd.notfind, "Table of Contents")
#TODO: add a french text here, as soon as the help is translated
## test a random language - it should fall back to english
self.cmd.go(self.URL + "plugins/help?weblang=foobar")
self.assertRaises(TwillAssertionError, self.cmd.notfind, "Table of Contents")