diff options
Diffstat (limited to 'uitest')
-rw-r--r-- | uitest/ui_logger_dsl/Special_commands.tx | 12 | ||||
-rw-r--r-- | uitest/ui_logger_dsl/dsl_core.py | 28 |
2 files changed, 39 insertions, 1 deletions
diff --git a/uitest/ui_logger_dsl/Special_commands.tx b/uitest/ui_logger_dsl/Special_commands.tx index 601a600f4bdb..9a8dc4cff6c4 100644 --- a/uitest/ui_logger_dsl/Special_commands.tx +++ b/uitest/ui_logger_dsl/Special_commands.tx @@ -69,6 +69,8 @@ writer_Insert_BreakPage: 10) Paste Cells 11) Merge Cells 12) Unmerge Cells + 13) Open Comment + 14) Close Comment then we can add whatever we need in the future */ @@ -76,7 +78,8 @@ calc_command: calc_Type_command | calc_switch_sheet | calc_Select_cell | calc_AutoFill_filter | calc_SelectMenu_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_Rename_Sheet | calc_Insert_sheet + calc_Merge_Cells | calc_Rename_Sheet | calc_Insert_sheet | calc_Open_Comment | + calc_Close_Comment ; calc_Type_command: 'Type on current cell' what_to_type=Type_options @@ -129,6 +132,13 @@ calc_Rename_Sheet: calc_Insert_sheet: 'Insert New Tab ' ; +calc_Open_Comment: + 'Open Comment' (txt=STRING)? +; +calc_Close_Comment: + 'Close Comment' (txt=STRING)? +; + //this is the select options select_options: one_cell | range_of_cells diff --git a/uitest/ui_logger_dsl/dsl_core.py b/uitest/ui_logger_dsl/dsl_core.py index 8fa7d141c2c3..062415f00fb1 100644 --- a/uitest/ui_logger_dsl/dsl_core.py +++ b/uitest/ui_logger_dsl/dsl_core.py @@ -113,6 +113,8 @@ class ul_Compiler: "calc_Type_command": self.handle_calc_Type_command, "calc_AutoFill_filter": self.handle_calc_AutoFill_filter, "calc_SelectMenu_filter": self.handle_calc_SelectMenu_filter, + "calc_Open_Comment": self.handle_calc_Open_Comment, + "calc_Close_Comment": self.handle_calc_Close_Comment, "impress_Type_command": self.handle_impress_Type_command, "math_element_selector": self.handle_math_element_selector, "math_Type_command": self.handle_math_Type_command, @@ -780,6 +782,32 @@ class ul_Compiler: self.variables.append(line) self.prev_command = calc_AutoFill_filter + def handle_calc_Open_Comment(self, calc_Open_Comment): + + line = ( + double_tab + + self.current_app + + '.executeAction("COMMENT", mkPropertyValues' + + '({"OPEN": " "}))\n' + ) + + self.variables.append(line) + + self.prev_command = calc_Open_Comment + + def handle_calc_Close_Comment(self, calc_Close_Comment): + + line = ( + double_tab + + self.current_app + + '.executeAction("COMMENT", mkPropertyValues' + + '({"CLOSE": " "}))\n' + ) + + self.variables.append(line) + + self.prev_command = calc_Close_Comment + def handle_calc_SelectMenu_filter(self, calc_SelectMenu_filter): self.init_app() |