summaryrefslogtreecommitdiff
path: root/testautomation/spreadsheet/required/includes/c_upd_viewmenu.inc
blob: e7568390c38aecdc50c2ac9d0ccbccfe93c5d1dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
'encoding UTF-8  Do not remove or change this line!
'**************************************************************************
' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
'
' Copyright 2000, 2010 Oracle and/or its affiliates.
'
' OpenOffice.org - a multi-platform office productivity suite
'
' This file is part of OpenOffice.org.
'
' OpenOffice.org is free software: you can redistribute it and/or modify
' it under the terms of the GNU Lesser General Public License version 3
' only, as published by the Free Software Foundation.
'
' OpenOffice.org is distributed in the hope that it will be useful,
' but WITHOUT ANY WARRANTY; without even the implied warranty of
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
' GNU Lesser General Public License version 3 for more details
' (a copy is included in the LICENSE file that accompanied this code).
'
' You should have received a copy of the GNU Lesser General Public License
' version 3 along with OpenOffice.org.  If not, see
' <http://www.openoffice.org/license.html>
' for a copy of the LGPLv3 License.
'
'/***********************************************************************
'*
'* owner : oliver.craemer@oracle.com
'*
'* short description : Resource Test - View Menu
'*
'************************************************************************
'*
' #1 tViewPageBreakPreview
' #1 tViewToolbars
' #1 tViewFormularbar
' #1 tViewStatusbar
' #1 tViewInputMethodStatus
' #1 tViewColumnRowHeaders
' #1 tViewValueHighlighting
' #1 tViewDataSources
' #1 tViewNavigator
' #1 tViewFullScreen
' #1 tViewZoom
'*
'\***********************************************************************

sub c_upd_viewmenu

    Printlog Chr(13) + "--------- View Menu (c_upd_viewmenu.inc) ---------"
    
    call tViewPageBreakPreview
    call tViewToolbars
    call tViewFormularbar
    call tViewStatusbar
    call tViewInputMethodStatus
    call tViewColumnRowHeaders
    call tViewValueHighlighting
    call tViewDataSources
    call tViewNavigator
    call tViewFullScreen
    call tViewZoom

end sub

'-----------------------------------------------------------

testcase tViewPageBreakPreview
'///<u><b>View - Normal / Page Break Preview</b></u>

    '/// Opening new spreadsheet document for getting defined starting environment
    printlog " Opening new spreadsheet document for getting defined starting environment"
    call hNewDocument
    '/// Activate Page Break Preview by 'View – Page Break Preview'
    printlog " Activate Page Break Preview by 'View – Page Break Preview'"
    ViewPageBreakPreview
    '/// Switch back to normal view by 'View – Normal'
    printlog " Switch back to normal view by 'View – Normal'"
    ViewNormalView
    '/// Close starting document
    printlog " Close starting document"
    call hCloseDocument

endcase

'-----------------------------------------------------------

testcase tViewToolbars
'///<u><b>View - Toolbars</b></u>

    '/// Opening new spreadsheet document for getting defined starting environment
    printlog " Opening new spreadsheet document for getting defined starting environment"
    call hNewDocument
    '/// Switch on/off toolbar '3D-Settings' by 'View - Toolbars'
    printlog " Switch on/off toolbar '3D-Settings' by 'View - Toolbars'"
    ViewToolbarsThreeDSettings
    ViewToolbarsThreeDSettings
    '/// Switch on/off toolbar 'Align' by 'View - Toolbars'
    printlog " Switch on/off toolbar 'Align' by 'View - Toolbars'"
    ViewToolbarsAlign
    ViewToolbarsAlign
    '/// Switch on/off toolbar 'Drawing' by 'View - Toolbars'
    printlog " Switch on/off toolbar 'Drawing' by 'View - Toolbars'"
    ViewToolbarsDrawing
    ViewToolbarsDrawing
    '/// Switch on/off toolbar 'Drawing Objects Properties' by 'View - Toolbars'
    printlog " Switch on/off toolbar 'Drawing Objects Properties' by 'View - Toolbars'"
    ViewToolbarsDrawObjectbar
    ViewToolbarsDrawObjectbar
    '/// Switch on/off toolbar 'Fontwork' by 'View - Toolbars'
    printlog " Switch on/off toolbar 'Fontwork' by 'View - Toolbars'"
    ViewToolbarsFontwork
    ViewToolbarsFontwork
    '/// Switch on/off toolbar 'Form Controls' by 'View - Toolbars'
    printlog " Switch on/off toolbar 'Form Controls' by 'View - Toolbars'"
    ViewToolbarsFormControls
    ViewToolbarsFormControls
    '/// Switch on/off toolbar 'Form Design' by 'View - Toolbars'
    printlog " Switch on/off toolbar 'Form Design' by 'View - Toolbars'"
    ViewToolbarsFormDesign
    ViewToolbarsFormDesign
    '/// Switch on/off toolbar 'Form Navigation' by 'View - Toolbars'
    printlog " Switch on/off toolbar 'Form Navigation' by 'View - Toolbars'"
    ViewToolbarsFormNavigation
    ViewToolbarsFormNavigation
    '/// Switch on/off toolbar 'Formatting' by 'View - Toolbars'
    printlog " Switch on/off toolbar 'Formatting' by 'View - Toolbars'"
    ViewToolbarsFormatting
    ViewToolbarsFormatting
    '/// Switch on/off toolbar 'Insert' by 'View - Toolbars'
    printlog " Switch on/off toolbar 'Insert' by 'View - Toolbars'"
    ViewToolbarsInsert
    ViewToolbarsInsert
    '/// Switch on/off toolbar 'Insert Cells' by 'View - Toolbars'
    printlog " Switch on/off toolbar 'Insert Cells' by 'View - Toolbars'"
    ViewToolbarsInsertCell
    ViewToolbarsInsertCell
    '/// Switch on/off toolbar 'Media Playback' by 'View - Toolbars'
    printlog " Switch on/off toolbar 'Media Playback' by 'View - Toolbars'"
    ViewToolbarsMediaPlayback
    ViewToolbarsMediaPlayback
    '/// Switch on/off toolbar 'Picture' by 'View - Toolbars'
    printlog " Switch on/off toolbar 'Picture' by 'View - Toolbars'"
    ViewToolbarsPicture
    ViewToolbarsPicture
    '/// Switch on/off toolbar 'Standard' by 'View - Toolbars'
    printlog " Switch on/off toolbar 'Standard' by 'View - Toolbars'"
    ViewToolbarsStandard
    ViewToolbarsStandard
    '/// Switch on/off toolbar 'Text Formatting' by 'View - Toolbars'
    printlog " Switch on/off toolbar 'Text Formatting' by 'View - Toolbars'"
    ViewToolbarsTextFormatting
    ViewToolbarsTextFormatting
    '/// Switch on/off toolbar 'Tools' by 'View - Toolbars'
    printlog " Switch on/off toolbar 'Tools' by 'View - Toolbars'"
    ViewToolbarsTools
    ViewToolbarsTools
    '/// Switch on/off toolbar 'Hyperlink Bar' by 'View - Toolbars'
    printlog " Switch on/off toolbar 'Hyperlink Bar' by 'View - Toolbars'"
    ViewToolbarsInsertHyperlink
    ViewToolbarsInsertHyperlink
    '/// Switch on/off toolbar 'Formular Bar' by 'View - Toolbars'
    printlog " Switch on/off toolbar 'Formular Bar' by 'View - Toolbars'"
    ViewToolbarsFormulaBar
    ViewToolbarsFormulaBar
    '/// Open 'Toolbar Customize' - dialog by 'View – Toolbars – Customize' (will be tested in detail by tToolsCustomize)
    printlog " Open 'Toolbar Customize' - dialog by 'View – Toolbars – Customize' (will be tested in detail by tToolsCustomize)"
    ViewToolbarsConfigure
    '/// Close dialog with 'Cancel'
    Kontext
    Active.SetPage TabCustomizeMenu
    Kontext "TabCustomizeMenu"
    TabCustomizeMenu.Cancel
    '/// Reset toolbars by 'View - Toolbars -  Reset'
    printlog " Reset toolbars by 'View - Toolbars -  Reset'"
'    ViewToolbarsReset
    qaerrorlog "Reset not possible because of #i84544"
    '/// Close document
    printlog " Close starting document"
    call hCloseDocument
    
endcase

'-----------------------------------------------------------

testcase tViewFormularbar
'///<u><b>View - Formular Bar</b></u>
   
    '/// Open new Spreadsheet document
    printlog " Open new Spreadsheet document"
    call hNewDocument
    '/// Switch on/off toolbar 'Formular Bar' by 'View -  Formular Bar'
    printlog " Switch on/off toolbar 'Formular Bar' by 'View -  Formular Bar'"
    ViewToolbarsFormulaBar
    ViewToolbarsFormulaBar
    '/// Close new document
    printlog " Close document"
    call hCloseDocument

endcase

'-----------------------------------------------------------

testcase tViewStatusbar
'///<u><b>View - Status Bar</b></u>
   
    '/// Open new Spreadsheet document
    printlog " Open new Spreadsheet document"
    call hNewDocument
    '/// Switch on/off toolbar 'Status Bar' by 'View -  Status Bar'
    printlog " Switch on/off toolbar 'Status Bar' by 'View -  Status Bar'"
    ViewToolbarsStatusbar
    ViewToolbarsStatusbar
    '/// Close new document
    printlog " Close document"
    call hCloseDocument

endcase

'-----------------------------------------------------------

testcase tViewInputMethodStatus
'///<u><b>View - Input Method Status</b></u>
   
    '/// Open new Spreadsheet document
    printlog " Open new Spreadsheet document"
    call hNewDocument
    '/// If enabled (only on UNIX) switch on/off 'View – Input Method Status'
    printlog " If enabled (only on UNIX) switch on/off 'View – Input Method Status'"
    try 
        ViewInputMethodStatus
        ViewInputMethodStatus
    catch
        printlog "Input Method Status not available on this system"
    endcatch
    '/// Close new document
    printlog " Close document"
    call hCloseDocument

endcase

'-----------------------------------------------------------

testcase tViewColumnRowHeaders
'///<u><b>View - Column And Row Headers</b></u>
   
    '/// Open new Spreadsheet document
    printlog " Open new Spreadsheet document"
    call hNewDocument
    '/// Switch on/off  'View -  Column And Row Headers'
    printlog " Switch on/off  'View -  Column And Row Headers'"
    ViewColumnAndRowHeaders
    ViewColumnAndRowHeaders
    '/// Close new document
    printlog " Close document"
    call hCloseDocument

endcase

'-----------------------------------------------------------

testcase tViewValueHighlighting
'///<u><b>View - Value Highlighting</b></u>

    '/// Open new Spreadsheet document
    printlog " Open new Spreadsheet document"
    call hNewDocument
    '/// Switch on/off  'View -  Value Highlighting'
    printlog " Switch on/off  'View -  Value Highlighting'"
    ViewValueHightlighting
    ViewValueHightlighting
    '/// Close new document
    printlog " Close document"
    call hCloseDocument

endcase

'-----------------------------------------------------------

testcase tViewDataSources
'///<u><b>View - Data Sources</b></u>

    '/// Open new Spreadsheet document
    printlog " Open new Spreadsheet document"
    call hNewDocument
    '/// Open datasourcebeamer by  'View -  Data Sources'
    ViewCurrentDatabaseCalc
    '/// Close datasourcebeamer by  'View -  Data Sources'
    ViewCurrentDatabaseCalc
    '/// Close new document
    printlog " Close document"
    call hCloseDocument

endcase

'-----------------------------------------------------------

testcase tViewNavigator
'///<u><b>Edit - Navigator</b></u>

    '/// Open new Spreadsheet document
    printlog " Open new Spreadsheet document"
    call hNewDocument
    '/// Check if Navigator already exists. If not open Navigator by View-Navigator.
    printlog " Check if Navigator already exists. If not open Navigator by View-Navigator."
    Kontext "NavigatorCalc"
    if NavigatorCalc.exists then
        warnlog "Navigator is already enabled"
    else
        ViewNavigator
    end if
    Kontext "NavigatorCalc"
    call DialogTest ( NavigatorCalc )
    '/// Check functionality of button for content by clicking it twice
    printlog " Check functionality of button for content by clicking it twice"
    Inhalte.Click
    Inhalte.Click
    '/// Check functionality of toggle button by clicking it twice
    printlog " Check functionality of toggle button by clicking it twice"
    Umschalten.Click
    Umschalten.Click
    '/// Check functionality of button for scenarios by clicking it twice
    printlog " Check functionality of button for scenarios by clicking it twice"
    Szenarien.Click
    Szenarien.Click
    '/// Check that the dragmodus has 3 modes
    qaerrorlog "Dragmodus disabled because of unreliability"
'    printlog " Check that the dragmodus has 3 modes"
'    Dragmodus.OpenMenu
'    waitslot(1000)
'    if hMenuItemGetCount <> 3 then
'        warnlog "Not enough modes for dragmodus"
'    end if
'    hMenuSelectNr (0)
    '/// Close Navigator
    printlog " Close Navigator"
    Kontext "Navigator"
    Navigator.Close    'Because of #i78307 the navigatorwindow has to be closed by Navigator.close
    Kontext "NavigatorCalc"
    if NavigatorCalc.exists then
        ViewNavigator
        Warnlog "NavigatorCalc.Close doesn't close the navigator"
    end if
    '/// Close document
    printlog " Close document"
    hCloseDocument

endcase

'-----------------------------------------------------------

testcase tViewFullScreen
'///<u><b>View - Full Screen</b></u>

    '/// Open new Spreadsheet document
    printlog " Open new Spreadsheet document"
    call hNewDocument
    '/// Switch to full screen view by  'View -  Full Screen'
    ViewFullScreen
    '/// Switch back to normal view
    ViewFullScreen
    '/// Close new document
    printlog " Close document"
    call hCloseDocument

endcase

'-----------------------------------------------------------

testcase tViewZoom
'///<u><b>View - Zoom</b></u>

    '/// Open new Spreadsheet document
    printlog " Open new Spreadsheet document"
    call hNewDocument
    '/// Open 'Zoom' – dialog by 'View – Zoom'
    printlog " Open 'Zoom' – dialog by 'View – Zoom'"
    ViewZoom
    Kontext "Massstab"
    DialogTest ( Massstab )
    '/// Check 'Variable'
    printlog " Check 'Variable'"
    VergroesserungStufenlos.Check
    '/// Increase variablezoom by 1
    printlog " Increase variablezoom by 1"
    Stufenlos.More
    '/// Close dialog with 'Cancel'
    printlog " Close dialog with 'Cancel'"
    Massstab.Cancel
    '/// Close new document
    printlog " Close document"
    call hCloseDocument

endcase