1 'encoding UTF-8 Do not remove or change this line!
2 '**************************************************************************
3 '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 '* Copyright 2008 by Sun Microsystems, Inc.
7 '* OpenOffice.org - a multi-platform office productivity suite
9 '* $RCSfile: i_slideshow3.inc,v $
13 '* last change: $Author: jsi $ $Date: 2008-06-16 10:42:42 $
15 '* This file is part of OpenOffice.org.
17 '* OpenOffice.org is free software: you can redistribute it and/or modify
18 '* it under the terms of the GNU Lesser General Public License version 3
19 '* only, as published by the Free Software Foundation.
21 '* OpenOffice.org is distributed in the hope that it will be useful,
22 '* but WITHOUT ANY WARRANTY; without even the implied warranty of
23 '* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 '* GNU Lesser General Public License version 3 for more details
25 '* (a copy is included in the LICENSE file that accompanied this code).
27 '* You should have received a copy of the GNU Lesser General Public License
28 '* version 3 along with OpenOffice.org. If not, see
29 '* <http://www.openoffice.org/license.html>
30 '* for a copy of the LGPLv3 License.
32 '/************************************************************************
34 '* Owner : wolfram.garten@sun.com
36 '* short description :
38 '*******************************************************************
39 ' #1 tExtrasInteraktion
41 ' #1 tExtrasPraesentationseinstellungen
42 ' #1 tExtrasIndividuellePraesentation
43 ' #1 tExtrasInteraktion
44 ' #1 tSlideshowContextMenuOneSlide
45 ' #1 tSlideshowContextMenuMoreSlides
46 ' #1 tiMousePointerHides
47 '\******************************************************************
49 testcase tExtrasInteraktion
50 Printlog " - SlideShow/Interaction"
53 Call hTextrahmenErstellen ("Seite 1",10,10,40,40) '/// create textbox ///'
54 SlideShowPresentationSettings '/// Set slide show settings ///'
55 Kontext "Bildschirmpraesentation"
56 NavigatorSichtbar.Check '/// Navigator visible ///'
57 Bildschirmpraesentation.OK
58 SlideShowInteraction '/// open Interaction ///'
60 if Interaktion.exists(5)then
61 AktionBeiMausklick.Select 1 '/// Select "Go to previous slide" ///'
63 Print "Interaction doesnt exist, something is wrong here."
66 Kontext "DocumentImpress"
67 SlideShowSlideshow '/// Run slideshow ///'
69 Kontext "DokumentPraesentation"
70 DokumentPraesentation.TypeKeys "<ESCAPE>"
72 Kontext "DocumentImpress"
77 Printlog " Interaction ->No action works"
78 Kontext "DocumentImpress"
80 Warnlog " - Interaction->does not work properly: Should be: Page 2 but it is: " + GetClipboardText
81 DocumentImpress.TypeKeys "<ESCAPE>"
82 Kontext "DocumentImpress"
86 Call hRechteckErstellen (50,50,80,80) '/// create rectangle ///'
91 Zaehler=AktionBeiMausklick.GetItemCount
93 AktionBeiMausklick.Select i '/// select actions ///'
94 SetClipboard AktionBeiMausklick.GetSelText
96 Kontext "DocumentImpress"
100 if GetClipboardText<>AktionBeiMausklick.GetSelText Then
101 Warnlog " Action at mouseclick - " + GetClipboardText + " - not taken" '/// control if action is saved (closing reopening dialog) ///'
103 Printlog " Action at mouseclick - " + GetClipboardText + " - runs"
108 Call hCloseDocument '/// close document ///'
111 testcase tExtrasEffekt
112 qaerrorlog "Test not yet ready."
125 Call hNewDocument '/// New impress document ///'
127 '/// check state of navigator ! expected: closed ///'
129 if Navigator.exists then
130 '///+ close navigator ! ///'
132 Warnlog "Navigator was open. Check earlier tests. Now closed."
134 printlog "Navigator: NOT available. Good."
138 hRechteckErstellen (20,20,50,50) '/// create rectangle ///'
140 DocumentImpress.TypeKeys "<F2>"
141 DocumentImpress.TypeKeys "- This is text to test the text effects of the Effects flyer"
143 gMouseClick 90,90 '/// deselect rectangle ///'
144 DocumentImpress.TypeKeys "<TAB>" '/// reselect rectangle ///'
148 Printlog " - Test effect flyer"
150 SlideShowEffects '/// Open effect flyer ///'
151 Kontext "ExtrasEffekt"
154 Zaehler=Effekteliste.GetItemCount '/// select each effect 1 time, assign effect and close dialog ///'
155 for i=1 to Zaehler '/// reopen dialog and check if the effect is still there ///'
156 Effekteliste.Select i
157 SetClipboard Effekteliste.GetSelText
158 Effekt.TypeKeys "<TAB>"
159 Effekteauswahl.TypeKeys "<RIGHT>" ,2
166 if GetClipboardText<>Effekteliste.GetSelText Then Warnlog " - Invisible color not chosen"
167 printlog GetClipboardText + " should be " + Effekteliste.GetSelText
172 Texteffekte.Click '/// test text effects ///'
174 ZaehlerKmh=Geschwindigkeit.GetItemCount
175 for j=1 to ZaehlerKmh
176 Geschwindigkeit.Select j
177 SetClipboard Geschwindigkeit.GetSelText
183 if GetClipboardText<>Geschwindigkeit.GetSelText Then Warnlog " - Speed not taken over"
185 Printlog " - Speed test ok"
187 Printlog " - Test text effects"
190 ZaehlerText=TexteffekteListe.GetItemCount
191 for k=1 to ZaehlerText
192 TexteffekteListe.Select k
193 printlog TexteffekteListe.GetSelText + "-effect choosen"
194 SetClipboard TexteffekteListe.GetSelText
195 Effekt.TypeKeys "<TAB>"
196 Texteffektauswahl.TypeKeys "<RIGHT>" ,2
204 printlog "and when we closed the window and opened again... " + TexteffekteListe.GetSelText + " was choosen"
206 if GetClipboardText<>TexteffekteListe.GetSelText Then Warnlog " - Texteffect did not changed"
209 Printlog " - Test invisible color"
211 Effekteliste.Select 1
212 Effekteauswahl.TypeKeys "<RIGHT>",2
220 UnsichtbarMachen.Click
222 if Abblendfarbe.IsEnabled=True Then Warnlog " - control shouldn't be enabled"
228 Effekteauswahl.TypeKeys "<RIGHT>",2
229 Extras.Click '/// test extras ///'
231 UnsichtbarMachen.Click
236 Printlog " - Blend with color"
239 MitFarbeAbblenden.Click
241 Abblendfarbe.Select Zufall
242 SetClipboard Abblendfarbe.GetSelText
248 Effekteauswahl.TypeKeys "<RIGHT>",3
252 MitFarbeAbblenden.Click
256 ' if GetClipboardText<>Abblendfarbe.GetSelText Then Warnlog " - Blendingcolor did not take over"
258 Printlog " - Test order"
261 Effekteliste.Select 2
266 Printlog " - test preview window"
267 Vorschaufenster.Click '/// open preview window ///'
270 if Vorschau.Exists = False Then Warnlog " - Preview window not opened"
274 if not Klangliste.IsEnabled Then Klang.Click '/// insert sound ///'
276 ' ZaehlerTon=Klangliste.GetItemCount
278 SetClipboard Klangliste.GetSelText
280 VollstaendigAbspielen.Click
287 if GetClipboardText<>Klangliste.GetSelText Then Warnlog " - sound did not change"
291 Call hCloseDocument '/// close document ///'
294 testcase tExtrasPraesentationseinstellungen
295 dim waschecked as boolean
296 Printlog " - SlideShow/Slideshow settings"
297 Call hNewDocument '/// New impress document ///'
298 setStartCurrentPage(FALSE) '/// Set ToolsOptions - Presentation - StartCurrentPage = off ///'
299 '/// check state of navigator ! expected: closed ///'
301 if Navigator.exists then
302 '///+ close navigator ! ///'
304 Warnlog "Navigator was open. Check earlier tests. Now closed."
306 printlog "Navigator: NOT available. Good."
308 Kontext "DocumentImpress"
309 ExtrasPraesentationseinstellung
310 Kontext "Bildschirmpraesentation"
312 SetClipboard AbDiaName.GetItemCount
313 Bildschirmpraesentation.OK
314 InsertSlide '/// insert slide ///'
316 hTypekeys "<Pagedown>"
318 SlideShowPresentationSettings '/// slideshow settings ///'
319 Kontext "Bildschirmpraesentation"
320 if AbDiaName.GetItemCount <> GetClipboardText Then
321 Printlog " - Added page appears in list"
323 Warnlog " - Page not added to the list"
325 AlleDias.Check '/// check all dias///'
326 Printlog " - Test all slides"
327 Bildschirmpraesentation.OK
328 hCloseDocument '/// close document ///'
329 DateiOeffnen '/// open document (diashow.odp) ///'
331 if OeffnenDlg.Exists(10) then
332 Dateiname.SetText ConvertPath (gTesttoolPath + "graphics\required\input\diashow.odp")
334 Warnlog "Took more then 10 seconds to get the file-open -dialogue open. Ending Test."
339 ' check if the document is writable
340 if fIsDocumentWritable = false then
341 ' make the document writable and check if it's succesfull
342 if fMakeDocumentWritable = false then
343 warnlog "The document can't be make writeable. Test stopped."
347 Kontext "DocumentImpress"
349 SlideShowPresentationSettings
350 Kontext "Bildschirmpraesentation"
351 if Fenster.IsChecked = False Then '/// slideshow runs in window mode checked ///'
353 Printlog " - Slideshow in window mode"
355 Printlog " - Slideshow in window mode checked"
357 Bildschirmpraesentation.OK
359 Printlog " - Testing slide show"
360 SlideShowSlideshow '/// run slideshow ///'
362 Kontext "DocumentPresentation"
363 DocumentPresentation.TypeKeys "<pagedown>"
365 Kontext "DocumentImpress"
366 ViewZoom '/// try using menue entrees (should be disabled while slideshow is running) ///'
367 Warnlog " - In slide show mode controls shouldn't be enabled"
371 Kontext "DocumentPresentation"
372 Printlog " - Slideshow runs"
375 DocumentPresentation.TypeKeys "<pagedown>"
377 DocumentPresentation.TypeKeys "<pagedown>"
379 DocumentPresentation.TypeKeys "<pagedown>"
381 DocumentPresentation.TypeKeys "<pagedown>"
384 kontext "DocumentPresentation"
385 if DocumentPresentation.Exists(3) then '/// test if application is still in slideshow mode ///'
386 warnlog " - We are still in slideshow mode"
387 DocumentPresentation.TypeKeys "<ESCAPE>"
389 Printlog " - Test Abdia page 3 ended"
392 Printlog " - From slides test"
393 SlideShowPresentationSettings '/// open slideshow settings ///'
394 Kontext "Bildschirmpraesentation"
395 Fenster.Check '/// check slideshow in window mode ///'
397 AbDiaName.Select 3 '/// slideshow begins at dia 3///'
398 Printlog " - From " + AbDiaName.GetSelText + " was the slides shown"
399 Bildschirmpraesentation.OK
400 SlideShowSlideshow '/// run slideshow ///'
402 Kontext "DocumentPresentation"
403 DocumentPresentation.TypeKeys "<pagedown>" 'to get to 4
405 DocumentPresentation.TypeKeys "<pagedown>" ' to get to the end
407 '/// Click once more to get out of presentation-mode ///'
408 DocumentPresentation.TypeKeys "<pagedown>" 'out
410 kontext "DocumentPresentation"
411 if DocumentPresentation.Exists(3) then
412 warnlog " - We are still in slideshow mode"
413 DocumentPresentation.TypeKeys "<ESCAPE>"
415 Printlog " - Test Abdia page 3 ended"
417 Printlog " - Repeat endless"
419 Kontext "DocumentImpress"
420 SlideShowPresentationSettings '/// open slideshow settings ///'
421 Kontext "Bildschirmpraesentation"
422 if AbDia.IsChecked=True Then AlleDias.Check
423 if Auto.IsChecked=False Then Auto.Check
424 Bildschirmpraesentation.OK
426 SlideShowSlideshow 'start from 1
428 Kontext "DocumentPresentation"
429 DocumentPresentation.TypeKeys "<pagedown>" 'to 2
431 DocumentPresentation.TypeKeys "<pagedown>" 'to 3
433 DocumentPresentation.TypeKeys "<pagedown>" 'to 4
435 DocumentPresentation.TypeKeys "<pagedown>" 'to pause
437 DocumentPresentation.TypeKeys "<pagedown>" 'to 1
439 DocumentPresentation.TypeKeys "<pagedown>" 'to 2
441 DocumentPresentation.TypeKeys "<pagedown>" 'to 3
443 DocumentPresentation.TypeKeys "<MOD1 SHIFT F5>" '/// Open the navigator ///'
445 DocumentPresentation.TypeKeys "<pagedown>" 'to 4
447 DocumentPresentation.TypeKeys "<pagedown>" 'to pause
449 DocumentPresentation.TypeKeys "<pagedown>" 'to 1
451 DocumentPresentation.TypeKeys "<pagedown>" 'to 2
453 DocumentPresentation.TypeKeys "<pagedown>" 'to 3
455 Kontext "NavigatorDraw"
456 if NavigatorDraw.Exists then
457 Printlog " The navigator is open. good."
459 Warnlog " The navigator should be accessable. Opening now."
460 Kontext "DocumentImpress"
461 DocumentImpress.TypeKeys "<MOD1 SHIFT F5>"
462 Kontext "NavigatorDraw"
465 if Liste.GetSelIndex <> 3 then
466 Warnlog " - Diashow not repeated: We should be at page no 3, but we are at page no: " + Liste.GetSelIndex
467 Kontext "DocumentPresentation"
468 DocumentPresentation.TypeKeys "<MOD1 SHIFT F5>" '/// Close the Navigator-window ///'
470 Printlog " - Repeat endless does work"
471 Kontext "DocumentPresentation"
472 DocumentPresentation.TypeKeys "<MOD1 SHIFT F5>" '/// Close the Navigator-window ///'
475 Kontext "DocumentPresentation"
476 DocumentPresentation.TypeKeys "<ESCAPE>"
478 Kontext "DocumentImpress"
481 SlideShowPresentationSettings '/// test endless repeating setting ///'
482 Kontext "Bildschirmpraesentation"
483 Bildschirmpraesentation.OK
484 Printlog " - Repeat endless"
486 Warnlog " - We are still in slideshow mode"
487 DocumentPresentation.TypeKeys "<ESCAPE>"
490 Kontext "DocumentImpress"
491 SlideShowPresentationSettings
492 Kontext "BildschirmPraesentation"
494 Printlog " - Test slide switching manually" '/// test dia switch manual ///'
495 if DiawechselManuel.IsChecked = False Then DiawechselManuel.Check
496 BildschirmPraesentation.Ok
498 Kontext "DocumentImpress"
499 DocumentImpress.TypeKeys "<MOD1 F2>"
503 Warnlog " - No slide show mode with 'Ctrl+F2'"
505 Printlog " - Slide show started using 'Ctrl F2'"
507 Kontext "DocumentPresentation"
508 DocumentPresentation.TypeKeys "<pagedown>"
510 DocumentPresentation.TypeKeys "<MOD1 SHIFT F5>"
511 ' Kontext "NavigatorDraw"
513 DocumentPresentation.TypeKeys "<pagedown>"
515 DocumentPresentation.TypeKeys "<MOD1 SHIFT F5>"
519 '/// Check state of navigator ! Expected: closed ///'
521 if Navigator.exists then
522 '///+ Close Navigator ! ///'
524 Warnlog "Navigator: Should have been closed. Closing now."
526 printlog "Navigator: not available - Good"
528 Kontext "DokumentPraesentation"
529 DokumentPraesentation.TypeKeys "<ESCAPE>" '/// Exit presentation-mode ///'
530 Kontext "DocumentImpress"
531 Call hCloseDocument '/// close document ///'
534 testcase tExtrasIndividuellePraesentation
535 Printlog "- Slideshow/Individual slideshow"
536 Call hNewDocument '/// new impress document ///'
537 '/// Deactivate "Start with current page" in ToolsOptions ///'
538 setStartCurrentPage(FALSE)
539 '/// check state of navigator ! expected: closed ///'
541 if Navigator.exists then
542 '///+ close navigator ! ///'
544 Warnlog "Navigator was open. Check earlier tests. Now closed."
546 printlog "Navigator: NOT available. Good."
548 Printlog " - insert 3 slides for the individual slide show"
549 SlideShowPresentationSettings '/// open slide show settings ///'
550 Kontext "Bildschirmpraesentation"
552 Bildschirmpraesentation.OK
553 InsertSlide '/// insert slide ///'
555 hTypekeys "<Pagedown>"
559 hTypekeys "<Pagedown>"
561 InsertSlide '/// insert another slide ///'
563 hTypekeys "<Pagedown>"
565 Printlog " - Slides added"
567 Kontext "DocumentImpress"
568 DocumentImpress.TypeKeys "<MOD1 SHIFT F5>" '/// open navigator ///'
570 Kontext "NavigatorDraw"
571 if NavigatorDraw.Exists Then
572 Printlog " - Navigator exists"
573 Erste.Click '/// switch to 1st slide ///'
574 Kontext "DocumentImpress"
575 DocumentImpress.MouseDown ( 50, 50 ) '/// Make a click onto the slide to focus onto that ///'
576 DocumentImpress.MouseUp ( 50, 50 )
577 hRechteckErstellen (10,10,20,20) '/// create rectangle ///'
578 Kontext "NavigatorDraw"
579 Naechste.Click '/// switch to 2nd slide ///'
580 Kontext "DocumentImpress"
581 hRechteckErstellen (30,30,40,40) '/// create another rectangle ///'
582 Kontext "NavigatorDraw"
583 Naechste.Click '/// switch to 3rd slide ///'
584 Kontext "DocumentImpress"
585 hRechteckErstellen (40,40,50,50) '/// create rectangle ///'
586 Kontext "NavigatorDraw"
587 Naechste.Click '/// switch to next slide ///'
588 Kontext "DocumentImpress"
589 hRechteckErstellen (50,50,60,60) '/// create rectangle ///'
590 Printlog " - Created rectangles on all slides"
592 Warnlog " No Navigator"
595 SlideShowCustomSlideshow '/// open custom slideshow ///'
596 Kontext "IndividuellePraesentation"
597 Printlog " - Create new slideshow"
598 Neu.Click '/// create new individual slideshow ///'
599 Kontext "IndividuellePraesentationDefinieren"
600 PraesentationName.SetText "Test 1" '/// set name of individiual slideshow to Test 1 ///'
603 Zaehler=SeitenPraesentation.GetItemCount '/// add slides to presentation ///'
605 SeitenPraesentation.SetNoSelection
606 SeitenPraesentation.Select i
608 if SelectedSlides.GetItemCount=i Then
609 Printlog " - slide added to slideshow"
611 Warnlog " Count does not match selection. Should be: "+ i + " but is: "+ IndividuellePraesentation.GetItemCount
614 Printlog " - Add slides using multiple selections"
615 SeitenPraesentation.Select 1
617 SeitenPraesentation.Select 2
619 SeitenPraesentation.Select 3
621 SeitenPraesentation.Select 4
624 if SelectedSlides.GetItemCount=8 Then '/// control number of added slides ///'
625 Printlog " - slides has been added, multiple selection is working"
627 Warnlog " Multiple selection does not work"
630 IndividuellePraesentationDefinieren.OK
632 Kontext "IndividuellePraesentation"
633 if IndividuellePraesentationBenutzen.IsChecked=False Then IndividuellePraesentationBenutzen.Check
635 Starten.Click '/// run presentation ///'
636 Printlog " - Individual slideshow started"
638 Kontext "Navigator" '/// Check if the navigator exists, if so - close it ///'
639 if Navigator.Exists Then
640 Printlog " - Navigator exists, we close it"
641 Navigator.Close '/// close navigator ///'
644 Kontext "DocumentPresentation"
646 DocumentPresentation.TypeKeys "<RETURN>"
648 DocumentPresentation.TypeKeys "<RETURN>"
650 DocumentPresentation.TypeKeys "<RETURN>"
652 DocumentPresentation.TypeKeys "<RETURN>"
654 DocumentPresentation.TypeKeys "<RETURN>"
656 DocumentPresentation.TypeKeys "<RETURN>"
658 DocumentPresentation.TypeKeys "<RETURN>"
660 DocumentPresentation.TypeKeys "<RETURN>"
662 DocumentPresentation.TypeKeys "<ESCAPE>"
664 Kontext "IndividuellePraesentation"
665 if IndividuellePraesentation.IsVisible=False Then
666 Warnlog " Slideshow should have ended"
667 Kontext "DocumentPresentation"
668 DocumentPresentation.TypeKeys "<ESCAPE>"
670 printlog " Presentation seems to have ended successfully"
675 Kontext "IndividuellePraesentation"
676 IndividuellePraesentation.Close '/// Close custom slideshow ///'
678 Kontext "NavigatorDraw" '/// Navigator: Control if right slide is displayed ///'
679 printlog " Now we switch to the navigator again"
680 if Liste.GetSelIndex <> 4 then '/// Unless -Start on first slide- is activated? Default = No ///'
681 Warnlog " This is not the right slide, it should be 4 but is: " + Liste.GetSelIndex
683 Printlog " - Individual slideshow seems to work"
685 SlideShowCustomSlideshow '/// open custom slideshow ///'
686 '/// Set "Start with current page" back to default = on, in ToolsOptions ///'
687 Kontext "IndividuellePraesentation"
688 if IndividuellePraesentationBenutzen.IsChecked=False Then IndividuellePraesentationBenutzen.Check
689 IndividuellePraesentation.Close
691 Kontext "Navigator" 'Draw
692 if Navigator.exists then
693 Navigator.Close '/// Close the Navigator ///'
694 Kontext "NavigatorDraw"
695 if NavigatorDraw.exists then
699 printlog "Navigator: NOT available. Good."
701 Kontext "DocumentImpress"
702 setStartCurrentPage(TRUE)
703 Call hCloseDocument '/// close document ///'
706 '****************************************************************************************************
708 testcase tSlideshowContextMenuOneSlide
709 qaerrorlog "Test not yet ready."
711 dim NumberOfEntries as Integer
712 Printlog "- ContextMenu in Slideshow"
713 '/// New Impress Document ///'
716 '/// Start the Slideshow. ///'
718 '/// Check that the right mousebutton brings up the Context-Menu. ///'
719 Kontext "DocumentPresentation"
720 DocumentPresentation.MouseDown 50, 50, 3
721 DocumentPresentation.MouseUp 50, 50, 3
722 '/// Check that the right-click brought up a Context-Menu. ///'
723 '/// And check the number of Menu-Positions (there should be XXX of them ) ///'
727 NumberOfEntries = MenuGetItemCount
729 warnlog " No ContextMenu found? Please inform the Automatic Tester"
730 kontext "DocumentImpress"
732 NumberOfEntries = MenuGetItemCount
734 if (NumberOfEntries = 0) then
735 Warnlog " the Context-Menu doesnt contain any entries, or were not up. Test ends."
738 if NumberOfEntries <> 3 then
739 warnlog " Expected three entries in this Menu, but found " + NumberOfEntries
740 ' if NumberOfEntries <> 6 then
741 ' warnlog " Expected six entries in this Menu, but found " + NumberOfEntries
743 printlog " Number of Entries was: " + NumberOfEntries
745 '/// Check that every position contains the expected Undermenu. ("Screen": Black/White. and "End Slideshow") ///'
746 '/// And check that Menu-Item one opens an undermenu. ///'
747 Printlog " We open number one: " + MenuGetItemText(MenuGetItemID(1))
750 NumberOfEntries = MenuGetItemCount
751 printlog " Menu-entries: " + MenuGetItemCount
752 if (NumberOfEntries <> 2) then
753 Warnlog " the third Context-Menu-entry was NOT 'Screen'."
755 Printlog " We open the next number one: " + MenuGetItemText(MenuGetItemID(1))
758 DocumentPresentation.MouseDown 50, 50, 3
759 DocumentPresentation.MouseUp 50, 50, 3
760 hMenuSelectNr (1) 'Open the Screen -menu.
762 Printlog " We open number two: " + MenuGetItemText(MenuGetItemID(MenuGetItemCount))
763 hMenuSelectNr (2) 'Choose "White"
766 'TODO - Due to existing bug, function not yet available.
767 '/// Change to slideshow-ending. Check that the Context-Menu also comes up here. ///'
768 'DocumentPresentation.
770 Kontext "DocumentPresentation"
771 DocumentPresentation.MouseDown 50, 50, 3
772 DocumentPresentation.MouseUp 50, 50, 3
775 NumberOfEntries = MenuGetItemCount
776 if NumberOfEntries <> 0 then
777 printlog " Menu-entries: " + MenuGetItemCount
779 warnlog " No context-menu at Slideshow-endpage."
780 DocumentPresentation.TypeKeys "<ESCAPE>"
783 '/// And that one can go back. ///'
784 hMenuSelectNr (1) 'Open the Goto Slide -menu.
786 Printlog " We open number one (should be 'Goto First Slide'): " + MenuGetItemText(MenuGetItemID(1))
787 hMenuSelectNr (2) 'Choose "Back" 'TODO ;: but now we just end the slideshow
790 Kontext "DocumentPresentation"
791 DocumentPresentation.TypeKeys "<ESCAPE>"
792 DocumentPresentation.TypeKeys "<ESCAPE>"
793 Kontext "DocumentImpress"
796 '/// Start the Slideshow. ///'
798 '/// Check that the right mousebutton brings up the Context-Menu. ///'
799 Kontext "DocumentPresentation"
800 DocumentPresentation.MouseDown 50, 50, 3
801 DocumentPresentation.MouseUp 50, 50, 3
804 '/// Check that Menu-Item (three) really finishes the presentation. ///'
805 Printlog " We open the last entry (End Show): " + MenuGetItemText(MenuGetItemID(MenuGetItemCount))
806 hMenuSelectNr (4) 'MenuGetItemCount) 'End Slideshow
807 if DocumentPresentation.Exists then
808 Warnlog "either wrong position for 'End Slideshow', or the command didnt work."
810 printlog "The presentation was closed, good."
813 '/// Check that one can step one step forward, even if there is no more than one slide. ///'
814 '/// Start the Slideshow. ///'
816 '/// Check that the right mousebutton brings up the Context-Menu. ///'
818 Kontext "DocumentPresentation"
819 DocumentPresentation.MouseDown 50, 50, 3
820 DocumentPresentation.MouseUp 50, 50, 3
823 hMenuSelectNr (2) 'Open the Goto Slide -menu.
825 '/// Select the 'one step forward' -entry ///'
828 '/// Check that we're on the last slide ///'
829 Kontext "DocumentPresentation"
830 DocumentPresentation.MouseDown 50, 50, 3
831 DocumentPresentation.MouseUp 50, 50, 3
834 hMenuSelectNr (2) 'Open the Goto Slide -menu.
835 if MenuIsItemEnabled (MenugetItemID(4)) then
836 printlog "Jumped to the right slide"
838 warnlog "possibly the 'jump to slide' -menu didnt quite work"
841 '/// Close the Context-Menu ///'
843 Kontext "DocumentPresentation"
845 '/// Check if the context-menu also comes up at the very last page (slideshow-ending) ///'
846 DocumentPresentation.TypeKeys "<SPACE>"
847 ' DocumentPresentation.TypeKeys "<SPACE>"
849 Kontext "DocumentPresentation"
850 DocumentPresentation.MouseDown 50, 50, 3
851 DocumentPresentation.MouseUp 50, 50, 3
854 if MenuGetItemText (MenuGetItemID(1)) <> "" then
855 Printlog "Context-menu came up at the last page: correct."
857 Warnlog "Context-menu did NOT come up correctly at the last page: false."
860 '/// Check if we from here, via the context menu, can go back to the first page ///'
861 hMenuSelectNr (2) 'Open the Goto Slide -menu.
863 hMenuSelectNr (1) 'First Slide
865 '/// Check that we're on the first slide ///'
866 Kontext "DocumentPresentation"
867 DocumentPresentation.MouseDown 50, 50, 3
868 DocumentPresentation.MouseUp 50, 50, 3
871 hMenuSelectNr (2) 'Open the Goto Slide -menu.
872 if MenuIsItemEnabled (MenugetItemID(3)) then
873 printlog "Jumped to the right slide"
875 warnlog "possibly the 'jump to slide' -menu didnt quite work from the last slide"
878 '/// Close the Context-Menu ///'
880 '/// Close the Presentation ///'
882 '/// Close Document ///'
884 endcase 'tSlideshowContextMenuOneSlide
886 '****************************************************************************************************
888 testcase tSlideshowContextMenuMoreSlides
889 qaerrorlog "Test not yet ready."
891 dim NumberOfEntries as Integer
892 Printlog "- ContextMenu in Slideshow"
893 '/// New Impress Document ///'
895 '/// Insert three new Slides ///'
899 '/// Start the Slideshow. ///'
902 '/// Check that the right mousebutton brings up the Context-Menu. ///'
903 Kontext "DocumentPresentation"
904 DocumentPresentation.MouseDown 50, 50, 3
905 DocumentPresentation.MouseUp 50, 50, 3
906 '/// Check that the right-click brought up a Context-Menu. ///'
907 '/// And check the number of Menu-Positions (there should be XXX of them ) ///'
911 NumberOfEntries = MenuGetItemCount
913 warnlog " No ContextMenu found? Please inform the Automatic Tester"
914 kontext "DocumentImpress"
916 NumberOfEntries = MenuGetItemCount
918 if (NumberOfEntries = 0) then
919 Warnlog " the Context-Menu doesnt contain any entries, or were not up. Test ends."
922 if NumberOfEntries <> 6 then
923 warnlog " Expected six entries in this Menu, but found " + NumberOfEntries
925 printlog " Number of Entries was: " + NumberOfEntries
927 '/// Check that every position contains the expected Undermenu. ("Screen": Black/White. and "End Slideshow") ///'
928 '/// And check that Menu-Item one opens an undermenu. ///'
929 Printlog " We open number four: " + MenuGetItemText(MenuGetItemID(4))
932 NumberOfEntries = MenuGetItemCount
933 printlog " Menu-entries: " + MenuGetItemCount
934 if (NumberOfEntries <> 2) then
935 Warnlog " the first Context-Menu-entry was NOT 'Screen'."
937 Printlog " We open the next number one: " + MenuGetItemText(MenuGetItemID(1))
940 DocumentPresentation.MouseDown 50, 50, 3
941 DocumentPresentation.MouseUp 50, 50, 3
942 hMenuSelectNr (3) 'Open the Screen -menu.
944 Printlog " We open number two: " + MenuGetItemText(MenuGetItemID(MenuGetItemCount))
945 hMenuSelectNr (2) 'Choose "White"
948 'TODO - Due to existing bug, function not yet available.
949 '/// Change to slideshow-ending. Check that the Context-Menu also comes up here. ///'
950 'DocumentPresentation.
952 Kontext "DocumentPresentation"
953 DocumentPresentation.MouseDown 50, 50, 3
954 DocumentPresentation.MouseUp 50, 50, 3
957 NumberOfEntries = MenuGetItemCount
958 if NumberOfEntries <> 0 then
959 printlog " Menu-entries: " + MenuGetItemCount
961 warnlog " No context-menu at Slideshow-endpage."
962 DocumentPresentation.TypeKeys "<ESCAPE>"
965 '/// And that one can go back. ///'
966 hMenuSelectNr (2) 'Open the Goto Slide -menu.
968 Printlog " We open number one (should be 'Goto First Slide'): " + MenuGetItemText(MenuGetItemID(1))
969 hMenuSelectNr (2) 'Choose "Back" 'TODO ;: but now we just end the slideshow
972 Kontext "DocumentPresentation"
973 DocumentPresentation.TypeKeys "<ESCAPE>"
974 DocumentPresentation.TypeKeys "<ESCAPE>"
975 Kontext "DocumentImpress"
977 '/// Start the Slideshow. ///'
979 '/// Check that the right mousebutton brings up the Context-Menu. ///'
980 Kontext "DocumentPresentation"
981 DocumentPresentation.MouseDown 50, 50, 3
982 DocumentPresentation.MouseUp 50, 50, 3
985 '/// Check that Menu-Item (three) really finishes the presentation. ///'
986 Printlog " We open the last entry (End Show): " + MenuGetItemText(MenuGetItemID(MenuGetItemCount))
987 hMenuSelectNr (4)'MenuGetItemCount) 'End Slideshow
989 if DocumentPresentation.Exists then
990 Warnlog "either wrong position for 'End Slideshow', or the command didnt work."
991 Kontext "DocumentPresentation"
992 DocumentPresentation.MouseDown 50, 50, 3
993 DocumentPresentation.MouseUp 50, 50, 3
995 Printlog " We open the last entry (End Show): " + MenuGetItemText(MenuGetItemID(MenuGetItemCount))
996 hMenuSelectNr (4)'MenuGetItemCount) 'End Slideshow
998 printlog "The presentation was closed, good."
1001 '/// Check that one can step one step forward, even if there is no more than one slide. ///'
1002 '/// Start the Slideshow. ///'
1005 '/// Check that the right mousebutton brings up the Context-Menu. ///'
1006 Kontext "DocumentPresentation"
1007 DocumentPresentation.MouseDown 50, 50, 3
1008 DocumentPresentation.MouseUp 50, 50, 3
1011 hMenuSelectNr (2) 'Open the Goto Slide -menu.
1013 '/// Select the 'one step forward' -entry ///'
1016 '/// Check that we're on the last slide ///'
1017 Kontext "DocumentPresentation"
1018 DocumentPresentation.MouseDown 50, 50, 3
1019 DocumentPresentation.MouseUp 50, 50, 3
1022 hMenuSelectNr (2) 'Open the Goto Slide -menu.
1023 if MenuIsItemEnabled (MenugetItemID(4)) then
1024 printlog "Jumped to the right slide"
1026 warnlog "possibly the 'jump to slide' -menu didnt quite work"
1029 '/// Close the Context-Menu ///'
1031 Kontext "DocumentPresentation"
1033 '/// Check if the context-menu also comes up at the very last page (slideshow-ending) ///'
1034 DocumentPresentation.TypeKeys "<SPACE>"
1036 Kontext "DocumentPresentation"
1037 DocumentPresentation.MouseDown 50, 50, 3
1038 DocumentPresentation.MouseUp 50, 50, 3
1041 if MenuGetItemText (MenuGetItemID(1)) <> "" then
1042 Printlog "Context-menu came up at the last page: correct."
1044 Warnlog "Context-menu did NOT come up correctly at the last page: false."
1047 '/// Check if we from here, via the context menu, can go back to the first page ///'
1048 hMenuSelectNr (2) 'Open the Goto Slide -menu.
1050 hMenuSelectNr (1) 'First Slide
1052 '/// Check that we're on the first slide ///'
1053 Kontext "DocumentPresentation"
1054 DocumentPresentation.MouseDown 50, 50, 3
1055 DocumentPresentation.MouseUp 50, 50, 3
1058 hMenuSelectNr (2) 'Open the Goto Slide -menu.
1059 if MenuIsItemEnabled (MenugetItemID(3)) then
1060 printlog "Jumped to the right slide"
1062 warnlog "possibly the 'jump to slide' -menu didnt quite work from the last slide"
1065 '/// Close the Context-Menu ///'
1067 '/// Close the Presentation ///'
1068 hTypeKeys "<ESCAPE>"
1069 '/// Close Document ///'
1071 endcase 'tSlideshowContextMenuMoreSlides
1073 '****************************************************************************************************
1075 testcase tiMousePointerHides
1076 qaerrorlog "Test not yet ready."
1079 Printlog "- ContextMenu in Slideshow"
1080 '/// New Impress Document ///'
1083 '/// Start the Slideshow. ///'
1087 while ((getMouseStyle = 0) AND (i<20))
1090 printlog getMouseStyle
1091 if (getMouseStyle <> 0) then i = 20
1093 if (getMouseStyle <> 0) then
1094 printlog "Mousepointer disappeared like it should have"
1096 warnlog "the mousepointer was still visible, after 20 seconds."
1099 hTypeKeys "<ESCAPE>"
1100 hTypeKeys "<ESCAPE>"
1102 '/// Close Document ///'
1104 endcase 'tSlideshowContextMenuMoreSlides
1106 '****************************************************************************************************