[chronojump] guiTests can select session



commit b957cae7097a9787fa086a1e61b559447e89590d
Author: Xavier de Blas <xaviblas gmail com>
Date:   Sun Aug 7 21:48:28 2016 +0200

    guiTests can select session

 glade/chronojump.glade |  124 ++++++++++++++++++++++++++++++++++++++++++++---
 src/gui/guiTests.cs    |   11 ++--
 2 files changed, 122 insertions(+), 13 deletions(-)
---
diff --git a/glade/chronojump.glade b/glade/chronojump.glade
index 39610eb..9da9b58 100644
--- a/glade/chronojump.glade
+++ b/glade/chronojump.glade
@@ -1042,11 +1042,65 @@
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
                             <child>
-                              <widget class="GtkButton" id="button_gui_tests">
-                                <property name="label">GUI TESTS</property>
-                                <property name="can_focus">True</property>
-                                <property name="receives_default">True</property>
-                                <signal name="clicked" handler="on_button_gui_tests_clicked" swapped="no"/>
+                              <widget class="GtkHBox" id="hbox_gui_tests">
+                                <property name="can_focus">False</property>
+                                <property name="spacing">4</property>
+                                <child>
+                                  <widget class="GtkVBox" id="vbox57">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="spacing">4</property>
+                                    <child>
+                                      <widget class="GtkLabel" id="label202">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="label">Session</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">False</property>
+                                        <property name="position">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkSpinButton" id="spin_gui_tests">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="invisible_char">●</property>
+                                        <property name="primary_icon_activatable">False</property>
+                                        <property name="secondary_icon_activatable">False</property>
+                                        <property name="primary_icon_sensitive">True</property>
+                                        <property name="secondary_icon_sensitive">True</property>
+                                        <property name="adjustment">1 1 100 1 10 0</property>
+                                        <property name="climb_rate">1</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="expand">True</property>
+                                        <property name="fill">True</property>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkButton" id="button_gui_tests">
+                                    <property name="label">GUI TESTS</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">True</property>
+                                    <signal name="clicked" handler="on_button_gui_tests_clicked" 
swapped="no"/>
+                                  </widget>
+                                  <packing>
+                                    <property name="expand">True</property>
+                                    <property name="fill">True</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
                               </widget>
                               <packing>
                                 <property name="expand">False</property>
@@ -17975,6 +18029,9 @@ Concentric</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">False</property>
@@ -22754,6 +22811,9 @@ by you</property>
                         <child>
                           <placeholder/>
                         </child>
+                        <child>
+                          <placeholder/>
+                        </child>
                       </widget>
                     </child>
                   </widget>
@@ -24014,6 +24074,9 @@ by you</property>
                         <child>
                           <placeholder/>
                         </child>
+                        <child>
+                          <placeholder/>
+                        </child>
                       </widget>
                     </child>
                   </widget>
@@ -25766,6 +25829,9 @@ by you</property>
               <placeholder/>
             </child>
             <child>
+              <placeholder/>
+            </child>
+            <child>
               <widget class="GtkButton" id="button_video_url">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
@@ -26575,6 +26641,9 @@ by you</property>
             <child>
               <placeholder/>
             </child>
+            <child>
+              <placeholder/>
+            </child>
           </widget>
           <packing>
             <property name="expand">True</property>
@@ -40087,6 +40156,24 @@ options</property>
                             <child>
                               <placeholder/>
                             </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
                           </widget>
                         </child>
                       </widget>
@@ -43090,6 +43177,18 @@ To differentiate between male and female, use the values 1/0, or m/f, or M/F on
                     <child>
                       <placeholder/>
                     </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
+                    <child>
+                      <placeholder/>
+                    </child>
                   </widget>
                 </child>
               </widget>
@@ -44255,9 +44354,6 @@ To differentiate between male and female, use the values 1/0, or m/f, or M/F on
                                       <placeholder/>
                                     </child>
                                     <child>
-                                      <placeholder/>
-                                    </child>
-                                    <child>
                                       <widget class="GtkLabel" id="label218">
                                         <property name="visible">True</property>
                                         <property name="can_focus">False</property>
@@ -45517,6 +45613,9 @@ To differentiate between male and female, use the values 1/0, or m/f, or M/F on
                                     <child>
                                       <placeholder/>
                                     </child>
+                                    <child>
+                                      <placeholder/>
+                                    </child>
                                   </widget>
                                 </child>
                               </widget>
@@ -49744,6 +49843,9 @@ It starts before and arrives there with some speed.</property>
                         <child>
                           <placeholder/>
                         </child>
+                        <child>
+                          <placeholder/>
+                        </child>
                       </widget>
                       <packing>
                         <property name="left_attach">2</property>
@@ -50668,6 +50770,9 @@ It starts before and arrives there with some speed.</property>
                     <child>
                       <placeholder/>
                     </child>
+                    <child>
+                      <placeholder/>
+                    </child>
                   </widget>
                 </child>
               </widget>
@@ -51607,6 +51712,9 @@ It starts before and arrives there with some speed.</property>
                     <child>
                       <placeholder/>
                     </child>
+                    <child>
+                      <placeholder/>
+                    </child>
                   </widget>
                 </child>
               </widget>
diff --git a/src/gui/guiTests.cs b/src/gui/guiTests.cs
index b2f2594..c064b31 100644
--- a/src/gui/guiTests.cs
+++ b/src/gui/guiTests.cs
@@ -24,7 +24,6 @@ using System.Collections.Generic; //List<T>
 using System.Threading;
 
 /* TODO:
- * need to be able to select session
  * separate in various classes (done!), files
  * progressBar
  * button to end
@@ -186,10 +185,12 @@ public partial class ChronoJumpWindow
 {
        private static bool testsActive = false;
        private CJTests cjTest;
+       private int sessionID;
        
-       private void chronojumpWindowTestsStart() 
+       private void chronojumpWindowTestsStart(int sessionID) 
        {
                testsActive = true;
+               this.sessionID = sessionID;
 
                cjTest = new CJTests();
 
@@ -224,7 +225,7 @@ public partial class ChronoJumpWindow
                                chronojumpWindowTestsMode(Constants.Menuitem_modes.POWERINERTIAL);
                                break;
                        case CJTests.Types.SESSION_LOAD:
-                               chronojumpWindowTestsLoadSession(); //this also selects first person
+                               chronojumpWindowTestsLoadSession(sessionID); //this also selects first person
                                break;
                        case CJTests.Types.PERSON_SELECT:
                                bucleContinues = chronojumpWindowTestsSelectPerson(bcount);
@@ -275,12 +276,12 @@ public partial class ChronoJumpWindow
                LogB.TestEnd("chronojumpWindowTestsMode");
        }
 
-       private void chronojumpWindowTestsLoadSession() 
+       private void chronojumpWindowTestsLoadSession(int sID)
        {
                LogB.TestStart("chronojumpWindowTestsLoadSession");
 
                on_open_activate(new Object(), new EventArgs());
-               sessionLoadWin.SelectRow(5); //0 is the first //TODO: hardcoded!!
+               sessionLoadWin.SelectRow(sID); //0 is the first
                sessionLoadWin.Button_accept.Click();
                
                LogB.TestEnd("chronojumpWindowTestsLoadSession");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]