summaryrefslogtreecommitdiff
path: root/testautomation/graphics/optional/includes
diff options
context:
space:
mode:
authorWolfram Garten [wg] <Wolfram.Garten@oracle.com>2010-09-30 16:03:52 +0200
committerWolfram Garten [wg] <Wolfram.Garten@oracle.com>2010-09-30 16:03:52 +0200
commit3b705c55c9651e5236b0a82c9664665db1450381 (patch)
tree045ac99f9ec475065e7b4ded611f18cf635a14ee /testautomation/graphics/optional/includes
parent78f4c0b79d80cae6561dd919571d1f9eead2f4bc (diff)
i114826, [Automation][i_updt_1.bas]testacse 'tiInsertSlideExpandSummary' and 'tiViewSlideMaster'
Diffstat (limited to 'testautomation/graphics/optional/includes')
-rw-r--r--testautomation/graphics/optional/includes/impress/im_003_.inc284
1 files changed, 146 insertions, 138 deletions
diff --git a/testautomation/graphics/optional/includes/impress/im_003_.inc b/testautomation/graphics/optional/includes/impress/im_003_.inc
index 1db0627e4a4e..fcca91719421 100644
--- a/testautomation/graphics/optional/includes/impress/im_003_.inc
+++ b/testautomation/graphics/optional/includes/impress/im_003_.inc
@@ -29,22 +29,30 @@
'*
'* short description : Impress Resource Test: View Menu
'*
-'***********************************************************************************
-' #1 tiViewPanes
-' #1 tiViewMasterView
-' #1 tiViewSlideMaster
-' #1 tiViewToolbar_1
-'\**********************************************************************************
+'\******************************************************************************
+
+sub im_003_
+
+ call tiViewPanes()
+ call tiViewMasterView()
+ call tiViewSlideMaster()
+ call tiViewToolbar_1()
+
+end sub
+
+'*******************************************************************************
testcase tiViewPanes
+
+ qaerrorlog( "This test is disabled, it needs rewriting" )
goto endsub 'TODO WG, tiViewPanes outcommented due to reconstruction of test
dim bState as boolean
- '/// open application ///'
+ printlog "open application "
Call hCloseDocument
Call hNewDocument
- sleep 1
+
kontext "Tasks"
- if (NOT Tasks.exists) then
+ if ( not Tasks.exists( 2 ) ) then
warnlog "Tasks Panel not visible on opening application. Opening now."
ViewTaskPane
endif
@@ -54,7 +62,7 @@ testcase tiViewPanes
ViewTaskSlide
endif
kontext "Tasks"
- '/// Deactivate all but "masterpages" ///'
+ printlog "Deactivate all but masterpages "
View.OpenMenu
hMenuSelectNr (2)
View.OpenMenu
@@ -77,14 +85,14 @@ testcase tiViewPanes
endif
kontext "Tasks"
sleep 1
- '/// View->Task Pane ///'
+ printlog "View->Task Pane "
ViewTaskPane
sleep 1
if (Tasks.exists) then
warnlog "View->Task Panel failed"
ViewTaskPane
endif
- '/// View->Task Pane ///'
+ printlog "View->Task Pane "
ViewTaskPane
sleep 1
if (NOT Tasks.exists) then
@@ -101,7 +109,7 @@ testcase tiViewPanes
warnlog "View->Slide Panel failed."
ViewTaskSlide
endif
- '/// View->Slide Pane ///'
+ printlog "View->Slide Pane "
ViewTaskSlide
sleep 1
if (NOT Slides.exists) then
@@ -112,7 +120,7 @@ testcase tiViewPanes
warnlog "View->Slide Pane couldn't get executed"
endcatch
- '/// Reactivate all pages in the Task-panel ///'
+ printlog "Reactivate all pages in the Task-panel "
kontext "Tasks"
View.OpenMenu
hMenuSelectNr (2)
@@ -120,135 +128,135 @@ testcase tiViewPanes
hMenuSelectNr (3)
View.OpenMenu
hMenuSelectNr (4)
-endcase
+endcase 'tiViewPanes
+'---------------------------------------------------------
testcase tiViewMasterView
-'/// open application ///'
- Call hNewDocument
-'/// View->Master View->Drawing View ///'
- sleep 1
- ViewWorkspaceDrawingView
-' Kontext "DocumentImpress"
-' gMouseClick 70,70
- sleep 5
-'/// View->Master View->Outline View ///'
- ViewWorkspaceOutlineView
-' Kontext "DocumentImpressOutlineView"
-' DocumentImpressOutlineView.MouseDown 70,70
-' DocumentImpressOutlineView.MouseUp 70,70
- sleep 1
-'/// View->Master View->Slides View ///'
- ViewWorkspaceSlidesView
-' Kontext "DocumentImpressSlideView"
-' DocumentImpressSlideView.MouseDown 70,70
-' DocumentImpressSlideView.MouseUp 70,70
- sleep 1
-'/// View->Master View->Notes View ///'
- ViewWorkspaceNotesView
- sleep 1
-'/// View->Master View->Handout View ///'
- ViewWorkspaceHandoutView
- sleep 1
-'/// View->Master View->Drawing View ///'
- ViewWorkspaceDrawingView
-'/// close application ///'
- sleep 1
- Call hCloseDocument
-endcase
-
+ printlog "open application"
+ Call hNewDocument
+ printlog "View->Master View->Drawing View"
+ hUseAsyncSlot( "ViewWorkspaceDrawingView" )
+ printlog "View->Master View->Outline View "
+ hUseAsyncSlot( "ViewWorkspaceOutlineView" )
+ printlog "View->Master View->Slides View "
+ ViewWorkspaceSlidesView
+ sleep 1
+ printlog "View->Master View->Notes View "
+ hUseAsyncSlot( "ViewWorkspaceNotesView" )
+ printlog "View->Master View->Handout View "
+ hUseAsyncSlot( "ViewWorkspaceHandoutView" )
+ printlog "View->Master View->Drawing View "
+ hUseAsyncSlot( "ViewWorkspaceDrawingView" )
+ printlog "close application "
+ Call hCloseDocument
+endcase 'tiViewMasterView
+'---------------------------------------------------------
testcase tiViewSlideMaster
-'/// open application with : File->Autopilot->Presentation; OK; OK ///'
-' Call hNewDocument
- FileAutopilotPresentation ' to get a title :-)
- sleep 2
- Kontext "AutopilotPraesentation1"
- AutopilotPraesentation1.Ok
- sleep 1
- Kontext "Seitenlayout" ' aka: Modify Slide
- if Seitenlayout.exists(5) then
- warnlog "Slidelayout has to vanish; moved to sidebar"
- Seitenlayout.OK
- endif
- kontext "DocumentImpress"
- sleep 1
-'/// View->Slide ///'
- ViewSlide
- Sleep 1
-'/// View->Master->Drawing ///'
- ViewDrawing
- Sleep 1
-'/// View->Slide ///'
- ViewSlide
- Sleep 1
-'/// View->Master->Title ///'
- try
- ViewTitle
- Errorlog "View - Master - Title Slide Master should NOT be accessable"
- catch
- printlog "View - Master - Title Slide Master not accessable - good"
- endcatch
- Sleep 1
-'/// View->Slide ///'
- ViewSlide
- Sleep 1
-'/// View->Master->Handout ///'
- ViewHandout
- Sleep 1
-' ViewSlide
- Sleep 1
-'/// View->Master->Notes ///'
- ViewNotes
- kontext "DocumentImpress"
- Sleep 1
-'/// View->Slide ///'
- ViewSlide
- Sleep 1
-'/// close application ///'
- Call hCloseDocument
-endcase
-testcase tiViewToolbar_1
- Dim Zaehler as integer
- Dim i as integer
-
-'/// open application ///'
- Call hNewDocument
- sleep 2
-'/// Insert->Graphic... : "global\input\graf_inp\desp.bmp" ///'
- InsertGraphicsFromFile
- sleep 2
- Kontext "GrafikEinfuegenDlg"
- sleep 1
- Dateiname.SetText ConvertPath (gTesttoolPath + "global\input\graf_inp\desp.bmp")
- sleep 1
- Oeffnen.Click
- sleep 3
- Kontext "Messagebox"
- if Messagebox.Exists then
- Warnlog Messagebox.GetText
- Messagebox.OK
- end if
- Kontext "DocumentImpress"
-'/// select graphic ///'
- EditSelectAll
- sleep 2
- Kontext "GraphicObjectbar"
+ printlog "open application with : File->Autopilot->Presentation; OK; OK "
+ FileAutopilotPresentation ' to get a title :-)
+ Kontext "AutopilotPraesentation1"
+ if ( AutopilotPraesentation1.exists( 2 ) ) then
+ hCloseDialog( AutopilotPraesentation1, "ok" )
+ else
+ warnlog( "Dialog <AutopilotPraesentation1> did not open" )
+ endif
+ kontext "DocumentImpress"
+
+ printlog "View->Slide"
+ hUseAsyncSlot( "ViewSlide" )
+
+ printlog "View->Master->Drawing"
+ hUseAsyncSlot( "ViewDrawing" )
+
+ printlog "View->Slide"
+ hUseAsyncSlot( "ViewSlide" )
+
+ printlog "View->Master->Handout"
+ hUseAsyncSlot( "ViewHandout" )
+
+ printlog "View->Master->Notes"
+ hUseAsyncSlot( "ViewNotes" )
+ kontext "DocumentImpress"
+
+ printlog "View->Slide"
+ hUseAsyncSlot( "ViewSlide" )
sleep 1
-'/// The Graphics Toolbar has to be visible now; If not -> ERROR ///'
- if GraphicObjectbar.Exists Then
- Printlog "- graphic object toolbar exists"
- Zaehler=Grafikmodus.GetItemCount
- for i = 1 to Zaehler
- Printlog "- access all controls in the toolbar (" +i+"/"+Zaehler+")"
- Grafikmodus.Select i
- sleep 3
- next i
- sleep 3
+
+ printlog "close application "
+ Call hCloseDocument
+
+endcase 'tiViewSlideMaster
+'--------------------------------------------------------
+testcase tiViewToolbar_1
+
+ const DEFAULT_DELAY = 3
+
+ Dim NumberOfGraphicModes as integer
+ Dim iCurrentGraphicsMode as integer
+ dim TestFile as string
+ dim i as integer
+
+ TestFile = ConvertPath (gTesttoolPath + "global\input\graf_inp\desp.bmp")
+
+ printlog "open application "
+ Call hNewDocument
+ Call sSelectEmptyLayout
+ printlog "delete default content"
+ hUseAsyncSlot( "EditSelectAll" )
+ Kontext "DocumentImpress"
+ DocumentImpress.typeKeys("<DELETE>",true)
+
+ printlog "use the empty layout"
+ call sSelectEmptyLayout
+
+ printlog "Insert->Graphic... : global\input\graf_inp\desp.bmp "
+ hUseAsyncSlot( "InsertGraphicsFromFile" )
+
+ Kontext "GrafikEinfuegenDlg"
+ if ( GrafikEinfuegenDlg.exists( DEFAULT_DELAY ) ) then
+ Dateiname.SetText( TestFile )
+ Oeffnen.Click
+
+ Kontext "Messagebox"
+ if ( Messagebox.Exists( DEFAULT_DELAY ) ) then
+ Warnlog Messagebox.GetText
+ hCloseDialog( Messagebox, "ok" )
+ end if
+
+ Kontext "DocumentImpress"
+ printlog "select graphic "
+ hUseAsyncSlot( "EditSelectAll" )
+
+ printlog "The Graphics Toolbar has to be visible now; If not -> ERROR "
+ ' workaround for i113609; there should have been a style selected without elements on creating the document - what failed; the elements should have been deleted before inserting the grafik in this test - which failed; so the workaround is to use <tab> to travel to the graphic selection here:
+ for i=1 to 3
+ Kontext "GraphicObjectbar"
+ if ( not GraphicObjectbar.Exists( DEFAULT_DELAY ) ) Then
+ hTypeKeys("<tab>")
+ qaerrorlog "delete default content failed"
+ end if
+ next i
+
+ Kontext "GraphicObjectbar"
+ if ( GraphicObjectbar.Exists( DEFAULT_DELAY ) ) Then
+
+ Printlog "- graphic object toolbar exists"
+ NumberOfGraphicModes=Grafikmodus.GetItemCount
+
+ for iCurrentGraphicsMode = 1 to NumberOfGraphicModes
+ Printlog( "- access all controls in the toolbar (" & iCurrentGraphicsMode & "/" & NumberOfGraphicModes & ")" )
+ Grafikmodus.Select( iCurrentGraphicsMode )
+ sleep ( DEFAULT_DELAY )
+ next iCurrentGraphicsMode
+ else
+ Warnlog "- No graphic function toolbar visible"
+ end if
else
- Warnlog "- No graphic function toolbar visible"
- end if
-'/// close application ///'
- Call hCloseDocument
-endcase
+ warnlog( "Insert Graphics dialog did not open" )
+ endif
+ printlog "close application "
+ Call hCloseDocument
+endcase 'tiViewToolbar_1