uitest/ui_logger_dsl/General_commands.tx      |   16 +++++--
 uitest/ui_logger_dsl/Special_commands.tx      |   35 +++++++++++----
 uitest/ui_logger_dsl/UI_Object_commands.tx    |   37 ++++++----------
 uitest/ui_logger_dsl/dialog_commands.tx       |    8 ++-
 uitest/ui_logger_dsl/example.ul               |   57 ++++++++++++++------------
 uitest/ui_logger_dsl/starter_commands.tx      |    1 
 uitest/ui_logger_dsl/ui_logger_dsl_grammar.tx |   15 +++++-
 uitest/ui_logger_dsl/uno_commands.tx          |    7 +++
 8 files changed, 109 insertions(+), 67 deletions(-)

New commits:
commit 12bc88fa01d5e8fc82cee0efdb1d402173b73d0d
Author:     Ahmed ElShreif <aelshre...@gmail.com>
AuthorDate: Sun Jul 28 23:07:25 2019 -0500
Commit:     Ahmed ElShreif <aelshre...@gmail.com>
CommitDate: Sun Jul 28 23:07:25 2019 -0500

    Update UI logger Grammar:
    
            1) Make small changes in the UI logger Grammar
            2) Add Comments to be more documented
    
    Change-Id: I5e68c33375870cf4a1f2537ee1a7eb997145f24f

diff --git a/uitest/ui_logger_dsl/General_commands.tx 
b/uitest/ui_logger_dsl/General_commands.tx
index 1eb15f17733d..aa3645112569 100644
--- a/uitest/ui_logger_dsl/General_commands.tx
+++ b/uitest/ui_logger_dsl/General_commands.tx
@@ -1,12 +1,15 @@
 /*
     This file for the log statments that is general for all application
     we can use it as general commands then relate it to its application 
-    as we have starter command
+    as we have in the starter command
     //====================================
     also I make set zoom to be general as it will be better
-*/ 
+*/
+
+import type_options
+
 GeneralCommand:
-    SideBar | setZoom_command | Select_command
+    SideBar | setZoom_command | Select_command | 
General_type_command_on_UI_Object
 ;
 SideBar:
     'From SIDEBAR ' 'Choose ' '{"PANEL":' name=STRING '}'
@@ -17,3 +20,10 @@ setZoom_command:
 Select_command:
     'Select ' '{"OBJECT":' name=STRING '}'
 ;
+
+//==================================================
+//This Part if you want to type text in any of these UI elements This will be 
handled with this Grammar
+
+General_type_command_on_UI_Object:
+  'Type on' UI_Obj=STRING  what_to_type=Type_options 'from' parent_id=ID  
+;
\ No newline at end of file
diff --git a/uitest/ui_logger_dsl/Special_commands.tx 
b/uitest/ui_logger_dsl/Special_commands.tx
index ec35418d0ab8..fc1940c7ef91 100644
--- a/uitest/ui_logger_dsl/Special_commands.tx
+++ b/uitest/ui_logger_dsl/Special_commands.tx
@@ -1,6 +1,8 @@
 import type_options
+
 /*
     This file for the log statments that relates to each diffrent applications
+    Each Grammar Command here is related to his own application
 */
 
 SpecialCommand:
@@ -10,9 +12,14 @@ SpecialCommand:
 /*
   This part for all the writer log statments:
    
-    1)  Type 
+    1)  Type
     2)  Select
     3)  GOTO page
+    4)  Create Table
+    5)  Copy Text
+    6)  Cut Text
+    7)  Paste Text
+    8)  Insert Break Page
 
   then we can add whatever we need in the future
 */
@@ -45,6 +52,7 @@ writer_Paste_Text:
 writer_Insert_BreakPage:
   'Insert Break Page'
 ;
+
 //=================================================================//
 /*
   This part for all the calc log statments:
@@ -52,6 +60,14 @@ writer_Insert_BreakPage:
     1)  select sheet
     2)  Select cell or range
     3)  launch AutoFill
+    4)  Delete Cells
+    5)  Remove Content of a cell
+    6)  Insert new Cells
+    7)  Cut Cells
+    8)  Copy Cells
+    9)  Paste Cells
+    10) Merge Cells
+    11) Unmerge Cells
 
   then we can add whatever we need in the future
 */
@@ -72,10 +88,6 @@ calc_Select_cell:
 calc_AutoFill_filter:
   'Lanuch AutoFilter from Col' col_num=INT 'and Row' row_num=INT
 ;
-//this is the select options
-select_options:
-    one_cell | range_of_cells
-;
 range_of_cells:
     '{' '"RANGE":' input_range=STRING '}'
 ;
@@ -106,12 +118,17 @@ calc_Merge_Cells:
 calc_UNMerge_Cells:
     'Delete the merge between' '{' '"CELL":' input_range=STRING '}'
 ;
+//this is the select options
+select_options:
+    one_cell | range_of_cells
+;
+
 //=================================================================//
 /*
   This part for all the impress log statments:
    
     1)  Type 
-    3)  Set zoom
+    2)  Set zoom
 
   then we can add whatever we need in the future
 */
@@ -121,6 +138,7 @@ impress_command:
 impress_Type_command:
     'Type on impress ' what_to_type=Type_options
 ;
+
 //=================================================================//
 /*
   This part for all the math log statments:
@@ -138,7 +156,4 @@ math_element_selector:
 ;
 math_Type_command:
     'Type on math ' what_to_type=Type_options
-;
-
-
-
+;
\ No newline at end of file
diff --git a/uitest/ui_logger_dsl/UI_Object_commands.tx 
b/uitest/ui_logger_dsl/UI_Object_commands.tx
index d80ff0744119..fbdab9c4e6ca 100644
--- a/uitest/ui_logger_dsl/UI_Object_commands.tx
+++ b/uitest/ui_logger_dsl/UI_Object_commands.tx
@@ -1,21 +1,21 @@
 import type_options
+
 /*
-    this file is for: 
-        ButtonUIObject 
-        EditUIObject   
-        CheckBoxUIObject       
-        RadioButtonUIObject    
-        ListBoxUIObject
-        ComboBoxUIObject       
-        SpinUIObject   
-        SpinFieldUIObject      
-        TabControlUIObject
+    this file is for The Grammar of: 
+        1)  ButtonUIObject : ( Click event )
+        2)  EditUIObject       : ( Type event - Clear event - Select Text 
event )
+        3)  CheckBoxUIObject   : ( Toggle the value  )
+        4)  RadioButtonUIObject        : ( Select event )
+        5)  ListBoxUIObject : ( Select event )
+        6)  ComboBoxUIObject   ( Select event )
+        7)  SpinUIObject               ( Increase event - Decrease event )
+        8)  TabControlUIObject ( Change tab event )
 */
 
 UIObjectCommand:
   ButtonUIObject | CheckBoxUIObject | EditUIObject | 
   RadioButtonUIObject | ListBoxUIObject | ComboBoxUIObject | 
-  SpinUIObject | SpinFieldUIObject | TabControlUIObject | 
General_type_command_on_UI_Object
+  SpinFieldUIObject | TabControlUIObject
 ;
 
 ButtonUIObject:
@@ -43,13 +43,8 @@ SpinFieldUIObject:
 ListBoxUIObject:
    'Select element with position ' POS=INT 'in' list_id=STRING 'from' 
parent_id=ID 
 ;
-//==========================================
-SpinUIObject:
-       'from' parent_id=ID 
-  //unkown for now 
-;
-//==========================================
 
+//=============================================================
 //hellper grammer for EditUIObject
 action_on_UIObject:
     Type_action | SELECT | Clear
@@ -65,12 +60,8 @@ Clear:
   'Clear' edit_button=STRING
 ;
 
+//=============================================================
 //helper functions for SpinUIObject
 increase_or_ecrease:
   'Increase' | 'Decrease'
-;
-
-//==================================================
-General_type_command_on_UI_Object:
-  'Type on' UI_Obj=STRING  what_to_type=Type_options 'from' parent_id=ID  
-;
+;
\ No newline at end of file
diff --git a/uitest/ui_logger_dsl/dialog_commands.tx 
b/uitest/ui_logger_dsl/dialog_commands.tx
index a752442e5f1f..b1837f7efedb 100644
--- a/uitest/ui_logger_dsl/dialog_commands.tx
+++ b/uitest/ui_logger_dsl/dialog_commands.tx
@@ -1,5 +1,8 @@
-//this file for the Dialog commands
-
+/*
+  this file for the Dialog commands
+  It handle all types of Dialog the Modeless and the Modal
+  Also It handle the Close Dialog Commands
+*/
 DialogCommand:
   OpenDialog | CloseDialog
 ;
@@ -13,6 +16,7 @@ OpenModalDialog :
 OpenModelessDialog :
   'Open Modeless ' dialog_name=ID
 ;
+
 CloseDialog:
   //the additional_note=STRING? if you need to add name in the future
   //Also it's used to make instance of the command of type CloseDialog
diff --git a/uitest/ui_logger_dsl/example.ul b/uitest/ui_logger_dsl/example.ul
index dc78ac14dcd6..d82c71a29f36 100644
--- a/uitest/ui_logger_dsl/example.ul
+++ b/uitest/ui_logger_dsl/example.ul
@@ -1,29 +1,34 @@
-Start calc
-Switch to sheet number 0
-Select from calc {"CELL": "A1"}
-Select from calc {"CELL": "B5"}
-Select from calc {"CELL": "C6"}
-Switch to sheet number 1
-Select from calc {"CELL": "A1"}
-Switch to sheet number 0
-Select from calc {"CELL": "C6"}
-Switch to sheet number 1
-Select from calc {"CELL": "A1"}
-Switch to sheet number 2
-Select from calc {"CELL": "A1"}
-Select from calc {"CELL": "C5"}
-Type on current cell {"TEXT": "a"}
-Type on current cell {"TEXT": "a"}
-Select from calc {"CELL": "C7"}
-Type on current cell {"TEXT": "a"}
-Type on current cell {"TEXT": "v"}
-Select from calc {"CELL": "C5"}
-Send UNO Command (".uno:ZoomSlider") 
-Send UNO Command (".uno:ZoomSlider")  {}
-Send UNO Command (".uno:DataFilterAutoFilter") 
-Lanuch AutoFilter from Col 0 and Row 2
-Click on 'ok' from check_list_menu
-Select from calc {"RANGE": "C1:C7"}
+Start writer
+Send UNO Command (".uno:UpdateInputFields") 
+Send UNO Command (".uno:FontDialog") 
+Open Modal CharacterPropertiesDialog
+Choose Tab number 0 in 'tabcontrol' from CharacterPropertiesDialog
+Select in 'westfontnamelb-cjk' ComboBox item number 66 from 
CharacterPropertiesDialog
+Choose Tab number 1 in 'tabcontrol' from CharacterPropertiesDialog
+Select element with position 3 in 'effectslb' fromCharacterPropertiesDialog
+Toggle 'shadowcb' CheckBox from CharacterPropertiesDialog
+Choose Tab number 2 in 'tabcontrol' from CharacterPropertiesDialog
+Select '270deg' RadioButton from CharacterPropertiesDialog
+Select '90deg' RadioButton from CharacterPropertiesDialog
+Increase 'scalewidthsb' from CharacterPropertiesDialog
+Increase 'scalewidthsb' from CharacterPropertiesDialog
+Increase 'scalewidthsb' from CharacterPropertiesDialog
+Decrease 'scalewidthsb' from CharacterPropertiesDialog
+Decrease 'scalewidthsb' from CharacterPropertiesDialog
+Decrease 'scalewidthsb' from CharacterPropertiesDialog
+Toggle 'pairkerning' CheckBox from CharacterPropertiesDialog
+Click on 'cancel' from CharacterPropertiesDialog
+Close Dialog
+Type on writer {"TEXT": "a"}
+Type on writer {"TEXT": "n"}
+Type on writer {"TEXT": "a"}
+Type on writer {"TEXT": " "}
+Type on writer {"TEXT": "a"}
+Type on writer {"TEXT": "h"}
+Type on writer {"TEXT": "m"}
+Type on writer {"TEXT": "e"}
+Type on writer {"TEXT": "d"}
+Select from Pos 4 to Pos 9
 Open Modal QuerySaveDialog
 Click on 'discard' from QuerySaveDialog
 Close Dialog
\ No newline at end of file
diff --git a/uitest/ui_logger_dsl/starter_commands.tx 
b/uitest/ui_logger_dsl/starter_commands.tx
index 0461b8d149bd..5a5d4b8de7ee 100644
--- a/uitest/ui_logger_dsl/starter_commands.tx
+++ b/uitest/ui_logger_dsl/starter_commands.tx
@@ -1,4 +1,5 @@
 //this file for the staters commands when you open any LO application
+//It's translate automatic that the buttom you push to open the app is a 
starter buttom
 
 StarterCommand:
   'Start' program_name=Program
diff --git a/uitest/ui_logger_dsl/ui_logger_dsl_grammar.tx 
b/uitest/ui_logger_dsl/ui_logger_dsl_grammar.tx
index ffde0c4c1525..f3aaeb1ccb90 100644
--- a/uitest/ui_logger_dsl/ui_logger_dsl_grammar.tx
+++ b/uitest/ui_logger_dsl/ui_logger_dsl_grammar.tx
@@ -1,4 +1,9 @@
 //this file is to define the new dsl grammar
+/*
+  This file just Import all Grammar Statments from all other files to this 
file 
+  The Compiler just work with this file to Compile it
+  Each file of these imported file has a Comments related to it's content
+*/ 
 
 import dialog_commands
 import starter_commands
@@ -8,13 +13,17 @@ import Special_commands
 import General_commands
 
 UILogger:
-    commands*=Command    
+    commands*=Command   
 ;
 
 Command:
-  UNOCommand | StarterCommand | UIObjectCommand | DialogCommand  | 
SpecialCommand | GeneralCommand
+  UNOCommand | StarterCommand | UIObjectCommand | DialogCommand  |
+  SpecialCommand | GeneralCommand | Comment
 ;
-
+/*
+  The Comment Command is just for give the ability to write a Comment 
+  if you want to write a test Case in the new dsl language
+*/
 Comment:
   /\/\/.*$/
 ;
diff --git a/uitest/ui_logger_dsl/uno_commands.tx 
b/uitest/ui_logger_dsl/uno_commands.tx
index ad4f6b1775e3..2d602f32b43c 100644
--- a/uitest/ui_logger_dsl/uno_commands.tx
+++ b/uitest/ui_logger_dsl/uno_commands.tx
@@ -1,9 +1,16 @@
+/*
+    This file is for the grammar of the UNO Command Statements
+    It's Automatically have 2 modes one with parameters and one without
+*/
+
 UNOCommand:
     'Send UNO Command' '(' uno_command_name=STRING ')'  (prameters=parameter)?
 ;
+
 parameter:
     '{'  parameter_data *= data ','? '}'
 ;
+
 data:
      ','? key=STRING ':' value= INT|ID 
 ;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to