]> icculus.org git repositories - duncan/yast2-qt4.git/blob - testsuite/tests/thread002.ui
clicking packages work! so the package selector is now
[duncan/yast2-qt4.git] / testsuite / tests / thread002.ui
1
2 # ---------------------------------------------------------
3 #
4 #  Filename:    threadXXX.ui
5 #
6 #  Purpose:     test cases for ui test
7 #
8 #  Creator:     jd@suse.de
9 #
10 #  Maintainer:  jd@suse.de
11 #
12 #  Remarks:     Always the user interaction is removed:
13 #                   any answer = UserInput();
14 #               Furthermore the tested action is set into a loop
15 #
16 # ---------------------------------------------------------
17
18
19 // Example1 for threads, former vbox1
20 //
21 // Syntax: VBox( [Id id, ] widget1, widget2, ... )
22 //
23
24 {
25
26     define Check( )
27         `` {
28                return( ( is( CurrentMap, map ) == true ) &&
29                        ( size( CurrentMap ) == 4 ) &&
30                        ( select( CurrentMap, 0 ) == [`Id("cb1"), false] ) && 
31                        ( select( CurrentMap, 1 ) == [`Id("cb2"), false] ) &&
32                        ( select( CurrentMap, 2 ) == [`Id("cb3"), false] ) && 
33                        ( select( CurrentMap, 3 ) == [`Id("cb4"), false] ) );
34            };
35
36     if( true )
37     {  
38         any ok = `HBox(`Stretch(), `Pushbutton(`Id("ok"), "OK"), `Stretch());
39     
40         integer loop = 0;
41         while( loop < 10 )
42         {
43             any dialog = Dialog( `VBox(
44               `VBox( 
45               `Checkbox(`Id("cb1"), "Option1"),
46               `Checkbox(`Id("cb2"), "Option2"),
47               `Checkbox(`Id("cb3"), "Option3"),
48               `Checkbox(`Id("cb4"), "Option4")
49               ),
50               ok
51              ));
52     
53             ShowDialog( );
54             any CurrentMap = QueryDialog( dialog );
55             CloseDialog( );
56             if( Check() == false ) return false;
57     
58             loop = loop + 1;
59         }
60     }
61     return( true );
62 }
63