summaryrefslogtreecommitdiff
path: root/uitest
diff options
context:
space:
mode:
authorAhmed ElShreif <aelshreif7@gmail.com>2019-07-18 13:53:08 -0500
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2019-08-19 22:56:38 +0800
commit9545e8ac286d0e18d9526df95cbc6e7da4aca738 (patch)
tree931b690d459c08a3b324d5f3d2a64ab1572adfe4 /uitest
parentbf94b044a11740323853933f0aedf55ceb143ee1 (diff)
uitest: log more events
for Calc: 1) Delete some Cells 2) Remove content from some cells 3) Insert Cells 4) Cut Cells 5) Copy Cells 6) Paste Cells 7) Merge Cells 8) Split Cell ( Delete Merge ) for Writer: 1) Insert Table 2) Copy Text 3) Cut Text 4) Paste Text 5) Inser Break Page Also, Solve some bugs in the UI logger and UNO Commands. Change-Id: Ic7cacbc20e1e400900a9760b61e8b45ae96c84ff
Diffstat (limited to 'uitest')
-rw-r--r--uitest/ui_logger_dsl/Special_commands.tx47
-rw-r--r--uitest/ui_logger_dsl/UI_Object_commands.tx9
-rw-r--r--uitest/ui_logger_dsl/dsl_core.py18
-rw-r--r--uitest/ui_logger_dsl/uno_commands.tx4
4 files changed, 71 insertions, 7 deletions
diff --git a/uitest/ui_logger_dsl/Special_commands.tx b/uitest/ui_logger_dsl/Special_commands.tx
index ac0f4d9a30aa..ec35418d0ab8 100644
--- a/uitest/ui_logger_dsl/Special_commands.tx
+++ b/uitest/ui_logger_dsl/Special_commands.tx
@@ -17,7 +17,9 @@ SpecialCommand:
then we can add whatever we need in the future
*/
writer_command:
- writer_Type_command | writer_Select_command | writer_GOTO_command
+ writer_Type_command | writer_Select_command | writer_GOTO_command |
+ writer_Create_table | writer_Copy_Text | writer_Cut_Text |
+ writer_Paste_Text | writer_Insert_BreakPage
;
writer_Type_command:
'Type on writer' what_to_type=Type_options
@@ -28,6 +30,21 @@ writer_Select_command:
writer_GOTO_command:
'GOTO page number' page_num=INT
;
+writer_Create_table:
+ 'Create Table with Columns :' cols=INT ', Rows :' rows=INT
+;
+writer_Copy_Text:
+ 'Copy the Selected Text'
+;
+writer_Cut_Text:
+ 'Cut the Selected Text'
+;
+writer_Paste_Text:
+ 'Paste in the Current Cursor Location'
+;
+writer_Insert_BreakPage:
+ 'Insert Break Page'
+;
//=================================================================//
/*
This part for all the calc log statments:
@@ -39,7 +56,9 @@ writer_GOTO_command:
then we can add whatever we need in the future
*/
calc_command:
- calc_Type_command | calc_switch_sheet | calc_Select_cell | calc_AutoFill_filter
+ calc_Type_command | calc_switch_sheet | calc_Select_cell | calc_AutoFill_filter |
+ calc_Delete_Cells | calc_Remove_Content | calc_insert_cells | calc_Cut_Cells |
+ calc_Copy_Cells | calc_Paste_Cells | calc_UNMerge_Cells | calc_Merge_Cells
;
calc_Type_command:
'Type on current cell' what_to_type=Type_options
@@ -63,6 +82,30 @@ range_of_cells:
one_cell:
'{' '"CELL":' input_cell=STRING '}'
;
+calc_Delete_Cells:
+ 'Delete The Cells in' '{' '"RANGE":' input_range=STRING '}'
+;
+calc_Remove_Content:
+ 'Remove Content from This' '{' '"RANGE":' input_range=STRING '}'
+;
+calc_insert_cells:
+ 'Insert Cell around the ' '{' '"RANGE":' input_range=STRING '}'
+;
+calc_Cut_Cells:
+ 'CUT the selected ' '{' '"RANGE":' input_range=STRING '}'
+;
+calc_Copy_Cells:
+ 'COPY the selected ' '{' '"RANGE":' input_range=STRING '}'
+;
+calc_Paste_Cells:
+ 'Paste in the' '{' '"RANGE":' input_range=STRING '}'
+;
+calc_Merge_Cells:
+ 'Merge' '{' '"RANGE":' input_range=STRING '}'
+;
+calc_UNMerge_Cells:
+ 'Delete the merge between' '{' '"CELL":' input_range=STRING '}'
+;
//=================================================================//
/*
This part for all the impress log statments:
diff --git a/uitest/ui_logger_dsl/UI_Object_commands.tx b/uitest/ui_logger_dsl/UI_Object_commands.tx
index 03bb0f78ded1..d80ff0744119 100644
--- a/uitest/ui_logger_dsl/UI_Object_commands.tx
+++ b/uitest/ui_logger_dsl/UI_Object_commands.tx
@@ -5,7 +5,7 @@ import type_options
EditUIObject
CheckBoxUIObject
RadioButtonUIObject
- ListBoxUIObject
+ ListBoxUIObject
ComboBoxUIObject
SpinUIObject
SpinFieldUIObject
@@ -15,7 +15,7 @@ import type_options
UIObjectCommand:
ButtonUIObject | CheckBoxUIObject | EditUIObject |
RadioButtonUIObject | ListBoxUIObject | ComboBoxUIObject |
- SpinUIObject | SpinFieldUIObject | TabControlUIObject
+ SpinUIObject | SpinFieldUIObject | TabControlUIObject | General_type_command_on_UI_Object
;
ButtonUIObject:
@@ -69,3 +69,8 @@ Clear:
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
+;
diff --git a/uitest/ui_logger_dsl/dsl_core.py b/uitest/ui_logger_dsl/dsl_core.py
index 0d5593081693..ab198a6d234f 100644
--- a/uitest/ui_logger_dsl/dsl_core.py
+++ b/uitest/ui_logger_dsl/dsl_core.py
@@ -86,7 +86,20 @@ class ul_Compiler:
'impress_Type_command':self.handle_impress_Type_command,
'math_element_selector':self.handle_math_element_selector,
'math_Type_command':self.handle_math_Type_command,
- 'setZoom_command':self.handle_setZoom_command
+ 'setZoom_command':self.handle_setZoom_command,
+
+ 'writer_Copy_Text':self.do_nothing,
+ 'writer_Cut_Text':self.do_nothing,
+ 'writer_Paste_Text':self.do_nothing,
+ 'writer_Insert_BreakPage':self.do_nothing,
+ 'writer_Create_table':self.do_nothing,
+ 'calc_Remove_Content':self.do_nothing,
+ 'calc_Delete_Cells':self.do_nothing,
+ 'calc_insert_cells':self.do_nothing,
+ 'calc_Cut_Cells':self.do_nothing,
+ 'calc_Copy_Cells':self.do_nothing,
+ 'calc_Merge_Cells':self.do_nothing,
+ 'calc_UNMerge_Cells':self.do_nothing,
})
self.log_lines=self.get_log_file(self.input_address)
@@ -403,6 +416,9 @@ class ul_Compiler:
for line in self.variables:
self.output_stream.write(str(line))
+ def do_nothing(self,Command):
+ line="to be added in the future"
+
def __del__(self):
self.output_stream.close()
diff --git a/uitest/ui_logger_dsl/uno_commands.tx b/uitest/ui_logger_dsl/uno_commands.tx
index 1cf702de62a2..ad4f6b1775e3 100644
--- a/uitest/ui_logger_dsl/uno_commands.tx
+++ b/uitest/ui_logger_dsl/uno_commands.tx
@@ -2,9 +2,9 @@ UNOCommand:
'Send UNO Command' '(' uno_command_name=STRING ')' (prameters=parameter)?
;
parameter:
- '{' parameter_data *= data '}'
+ '{' parameter_data *= data ','? '}'
;
data:
- key=STRING ':' value= INT|ID ','
+ ','? key=STRING ':' value= INT|ID
;