2 # ---------------------------------------------------------
6 # Purpose: test cases for ui test
10 # Maintainer: jd@suse.de
12 # Remarks: Always the user interaction is removed:
13 # any answer = UserInput();
14 # Furthermore the tested action is set into a loop
16 # ---------------------------------------------------------
20 // Syntax: VBox( [Id id, ] widget1, widget2, ... )
22 // A VBox is used to give the UI a hint about how to
23 // organize the dialog. All widgets listed inside the VBox
24 // are laid out from top to bottom.
26 // A VBox can have an Id. This Id will be added as a prefix
27 // to all widget Ids within the VBox.
29 // This example shows two VBox'es. The first VBox has an Id
30 // set. The Id's of the checkboxes in this VBox will be
31 // prefixed with the Id of the VBox.
38 return( ( ( is( CurrentMap, map ) == true ) &&
39 ( size( CurrentMap ) == 5 ) &&
40 ( select( CurrentMap, 0 ) == [`Id("vb", "cb1", "cb2", "cb3", "cb4"), false] ) &&
41 ( select( CurrentMap, 1 ) == [`Id("cb1"), false] ) &&
42 ( select( CurrentMap, 2 ) == [`Id("cb2"), false] ) &&
43 ( select( CurrentMap, 3 ) == [`Id("cb3"), false] ) &&
44 ( select( CurrentMap, 4 ) == [`Id("cb4"), false] )));
48 any ok = `HBox(`Stretch(), `Pushbutton(`Id("ok"), "OK"), `Stretch());
50 boolean CheckState = true;
54 any dialog = Dialog( `VBox(
56 `Checkbox(`Id("cb1"), "Option1"),
57 `Checkbox(`Id("cb2"), "Option2"),
58 `Checkbox(`Id("cb3"), "Option3"),
59 `Checkbox(`Id("cb4"), "Option4")
62 `Checkbox(`Id("cb1"), "Option1"),
63 `Checkbox(`Id("cb2"), "Option2"),
64 `Checkbox(`Id("cb3"), "Option3"),
65 `Checkbox(`Id("cb4"), "Option4")
71 any CurrentMap = QueryDialog( dialog );
72 CloseDialog( dialog );
74 CheckState = Check( );
75 if( CheckState == false ) return CheckState;