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 addedmaster
parent
29d2e442f2
commit
c35e204a7b
@ -0,0 +1,6 @@
|
||||
Name = Datenträger-Übersicht
|
||||
Link = Datenträger
|
||||
|
||||
Title.Disks = Verfügbare Datenträger
|
||||
|
||||
Text.NoDisksAvailable = Es sind keine Datenträger verfügbar!
|
@ -0,0 +1,9 @@
|
||||
import WebInterfaceTestClass
|
||||
|
||||
class unittests(WebInterfaceTestClass.WebInterfaceTestClass):
|
||||
|
||||
def test_read_form(self):
|
||||
'''display all devices'''
|
||||
self.cmd.go(self.URL + "plugins/disks?weblang=en")
|
||||
self.cmd.find("Disks")
|
||||
|
@ -0,0 +1,10 @@
|
||||
import WebInterfaceTestClass
|
||||
|
||||
class unittests(WebInterfaceTestClass.WebInterfaceTestClass):
|
||||
|
||||
def test_read_form(self):
|
||||
url = self.URL + "plugins/format_fs?weblang=en&device=%2Fdev%2Floop1"
|
||||
self.register_auth(url)
|
||||
self.cmd.go(url)
|
||||
self.cmd.find('Initializing filesystem')
|
||||
|
@ -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")
|
||||
|
@ -0,0 +1,10 @@
|
||||
import WebInterfaceTestClass
|
||||
|
||||
class unittests(WebInterfaceTestClass.WebInterfaceTestClass):
|
||||
|
||||
def test_read_form(self):
|
||||
url = self.URL + "plugins/partition?weblang=en"
|
||||
self.register_auth(url)
|
||||
self.cmd.go(url)
|
||||
self.cmd.find('VERY careful')
|
||||
|
@ -0,0 +1,12 @@
|
||||
import WebInterfaceTestClass
|
||||
|
||||
class unittests(WebInterfaceTestClass.WebInterfaceTestClass):
|
||||
|
||||
def test_read_form(self):
|
||||
url = self.URL + "plugins/plugin_manager?weblang=en"
|
||||
self.register_auth(url)
|
||||
self.cmd.go(url)
|
||||
self.cmd.find('Plugin Manager')
|
||||
self.cmd.find('System plugins')
|
||||
self.cmd.find('Volume plugins')
|
||||
|
@ -0,0 +1,8 @@
|
||||
import WebInterfaceTestClass
|
||||
|
||||
class unittests(WebInterfaceTestClass.WebInterfaceTestClass):
|
||||
|
||||
def test_preferences_overview(self):
|
||||
self.cmd.go(self.URL + "plugins/system_preferences?weblang=en")
|
||||
self.cmd.find("Preferences")
|
||||
|
@ -0,0 +1,10 @@
|
||||
import WebInterfaceTestClass
|
||||
|
||||
class unittests(WebInterfaceTestClass.WebInterfaceTestClass):
|
||||
|
||||
def test_read_form(self):
|
||||
url = self.URL + "plugins/volume_details?weblang=en&device=%2Fdev%2Floop1"
|
||||
self.register_auth(url)
|
||||
self.cmd.go(url)
|
||||
self.cmd.find('Technical details')
|
||||
|
@ -0,0 +1,10 @@
|
||||
import WebInterfaceTestClass
|
||||
|
||||
class unittests(WebInterfaceTestClass.WebInterfaceTestClass):
|
||||
|
||||
def test_read_form(self):
|
||||
url = self.URL + "plugins/volume_mount?weblang=en&device=%2Fdev%2Floop1"
|
||||
self.register_auth(url)
|
||||
self.cmd.go(url)
|
||||
self.cmd.find('ctivate volume')
|
||||
|
@ -0,0 +1,10 @@
|
||||
import WebInterfaceTestClass
|
||||
|
||||
class unittests(WebInterfaceTestClass.WebInterfaceTestClass):
|
||||
|
||||
def test_read_form(self):
|
||||
url = self.URL + "plugins/volume_props?weblang=en&device=%2Fdev%2Floop1"
|
||||
self.register_auth(url)
|
||||
self.cmd.go(url)
|
||||
self.cmd.find('Properties')
|
||||
|
Loading…
Reference in New Issue