[PATCH] Update testConfig and testKeys for layout changes

Samuel Mendoza-Jonas sam.mj at au1.ibm.com
Fri Aug 28 16:33:18 AEST 2015


Signed-off-by: Samuel Mendoza-Jonas <sam.mj at au1.ibm.com>
---
 tests/testConfig.py | 44 +++++++++++++++++++++++++++++++++++++-------
 tests/testKeys.py   |  2 ++
 2 files changed, 39 insertions(+), 7 deletions(-)

diff --git a/tests/testConfig.py b/tests/testConfig.py
index 5cce2d9..f846f39 100644
--- a/tests/testConfig.py
+++ b/tests/testConfig.py
@@ -10,7 +10,9 @@ class ConfigEditorTestCase(pbtest.PBTestCase):
         self.bootToUI()
         self.send('c')
         self.expect('Petitboot System Configuration')
-        self.expect('Autoboot')
+        self.expect('Boot Order')
+        self.send(self.KEY_UP)
+        self.send(self.KEY_UP)
         self.send(self.KEY_UP)
         self.send('\r')
         # back to the main screen? We should see the system identifier
@@ -27,6 +29,8 @@ class TimeoutConfigTestCase(pbtest.PBTestCase):
 
         # navigate to timeout field
         self.send(self.KEY_TAB)
+        self.send(self.KEY_TAB)
+        self.send(self.KEY_TAB)
 
         # clear default value; max 5 chars
         self.send('\x08' * 5)
@@ -39,6 +43,9 @@ class TimeoutConfigTestCase(pbtest.PBTestCase):
         self.send(self.KEY_BTAB)
         self.send(self.KEY_BTAB)
         self.send(self.KEY_BTAB)
+        self.send(self.KEY_BTAB)
+        self.send(self.KEY_BTAB)
+        self.send(self.KEY_BTAB)
         self.send(' ')
 
         # wait for main UI window
@@ -112,6 +119,8 @@ class StaticNetworkConfigTestCase(pbtest.PBTestCase):
         # navigate to network-type widget
         self.send(self.KEY_TAB)
         self.send(self.KEY_TAB)
+        self.send(self.KEY_TAB)
+        self.send(self.KEY_TAB)
 
         # select static
         self.send(self.KEY_DOWN)
@@ -133,6 +142,8 @@ class StaticNetworkConfigTestCase(pbtest.PBTestCase):
 
         # OK!
         self.send(self.KEY_DOWN)
+        self.send(self.KEY_DOWN)
+        self.send(self.KEY_DOWN)
         self.send(' ')
         self.expect(self.exp_screen_main_sysinfo, timeout=2)
 
@@ -163,6 +174,8 @@ class StaticNetworkConfigTestCase(pbtest.PBTestCase):
         self.send(self.KEY_UP)
         self.send(self.KEY_UP)
         self.send(self.KEY_UP)
+        self.send(self.KEY_UP)
+        self.send(self.KEY_UP)
         self.send(' ')
 
         # back to shell
@@ -184,15 +197,19 @@ class RestoreConfigDefaultTestCase(pbtest.PBTestCase):
         # enter config
         self.send('c')
         self.expect('Petitboot System Configuration')
-        self.expect('Autoboot')
+        self.expect('Boot Order')
 
-        # clear autoboot option
+        # clear boot order list
+        self.send(self.KEY_DOWN)
+        self.send(self.KEY_DOWN)
         self.send(' ')
 
         # save config, exit from UI
         self.send(self.KEY_BTAB)
         self.send(self.KEY_BTAB)
         self.send(self.KEY_BTAB)
+        self.send(self.KEY_BTAB)
+        self.send(self.KEY_BTAB)
         self.send(' ')
         self.send('x')
         self.expect('#')
@@ -207,16 +224,19 @@ class RestoreConfigDefaultTestCase(pbtest.PBTestCase):
 
         self.send('c')
         self.expect('Petitboot System Configuration')
-        self.expect('Autoboot')
+        self.expect('Boot Order')
 
         # set autoboot option
-        self.send(self.KEY_DOWN)
+        self.send(' ')
+        self.send(self.KEY_UP)
+        self.send(self.KEY_UP)
         self.send(' ')
 
         # save config again, exit from UI
         self.send(self.KEY_BTAB)
         self.send(self.KEY_BTAB)
         self.send(self.KEY_BTAB)
+        self.send(self.KEY_BTAB)
         self.send(' ')
         self.send('x')
         self.expect('#')
@@ -231,10 +251,12 @@ class RestoreConfigDefaultTestCase(pbtest.PBTestCase):
         # enter config
         self.send('c')
         self.expect('Petitboot System Configuration')
-        self.expect('Autoboot')
+        self.expect('Boot Order')
 
         # set timeout to non-default
         self.send(self.KEY_TAB)
+        self.send(self.KEY_TAB)
+        self.send(self.KEY_TAB)
         self.sendcontrol('h')
         self.sendcontrol('h')
         self.send('42')
@@ -244,6 +266,9 @@ class RestoreConfigDefaultTestCase(pbtest.PBTestCase):
         self.send(self.KEY_BTAB)
         self.send(self.KEY_BTAB)
         self.send(self.KEY_BTAB)
+        self.send(self.KEY_BTAB)
+        self.send(self.KEY_BTAB)
+        self.send(self.KEY_BTAB)
         self.send(' ')
         self.send('x')
         self.expect('#')
@@ -257,10 +282,12 @@ class RestoreConfigDefaultTestCase(pbtest.PBTestCase):
 
         self.send('c')
         self.expect('Petitboot System Configuration')
-        self.expect('Autoboot')
+        self.expect('Boot Order')
 
         # set timeout back to default of 10
         self.send(self.KEY_TAB)
+        self.send(self.KEY_TAB)
+        self.send(self.KEY_TAB)
         self.sendcontrol('h')
         self.sendcontrol('h')
         self.send('10')
@@ -270,6 +297,9 @@ class RestoreConfigDefaultTestCase(pbtest.PBTestCase):
         self.send(self.KEY_BTAB)
         self.send(self.KEY_BTAB)
         self.send(self.KEY_BTAB)
+        self.send(self.KEY_BTAB)
+        self.send(self.KEY_BTAB)
+        self.send(self.KEY_BTAB)
         self.send(' ')
         self.send('x')
         self.expect('#')
diff --git a/tests/testKeys.py b/tests/testKeys.py
index fc8173d..bf3f886 100644
--- a/tests/testKeys.py
+++ b/tests/testKeys.py
@@ -56,6 +56,8 @@ class BacktabTest(pbtest.PBTestCase):
         self.send(self.KEY_BTAB)
         self.send(self.KEY_BTAB)
         self.send(self.KEY_BTAB)
+        self.send(self.KEY_BTAB)
+        self.send(self.KEY_BTAB)
 
         self.pause(1)
 
-- 
2.5.0



More information about the Petitboot mailing list