From 93393d14ff84d74d2e2f022f0c19bf64bb9268b1 Mon Sep 17 00:00:00 2001 From: "Joerg Skottke [jsk]" Date: Mon, 31 May 2010 15:56:59 +0200 Subject: findbar01: #i111912 - [Testautomation] Added findbar declaration to bars.win --- testautomation/global/win/bars.win | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/testautomation/global/win/bars.win b/testautomation/global/win/bars.win index dd65f825893d..525be7d897ca 100755 --- a/testautomation/global/win/bars.win +++ b/testautomation/global/win/bars.win @@ -356,6 +356,13 @@ ExtrusionLightingFloater .uno:ExtrusionLightingFloater ExtrusionSurfaceFloater .uno:ExtrusionSurfaceFloater Extrusion3DColor .uno:Extrusion3DColor '------------------------------------------------------------------------- +*FindBar .HelpId:findbar +'------------------------------------------------------------------------- +FindText .uno:FindText +DownSearch .uno:DownSearch +UpSearch .uno:UpSearch +SearchDialog .uno:SearchDialog +'------------------------------------------------------------------------- *Flowchart .HelpId:flowchartshapes '------------------------------------------------------------------------- Process .uno:FlowChartShapes.flowchart-process -- cgit v1.2.3 From 299817c665690a67391bfa3c163296e9fffdae02 Mon Sep 17 00:00:00 2001 From: "Joerg Skottke [jsk]" Date: Mon, 31 May 2010 17:47:49 +0200 Subject: findbar01: #i111912 - [Testautomation] Preliminary update test, incomplete. From a testtool POV we have a permanently visible SearchDialog button which should be fixed. --- .../global/required/includes/g_findbar.inc | 142 +++++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100644 testautomation/global/required/includes/g_findbar.inc diff --git a/testautomation/global/required/includes/g_findbar.inc b/testautomation/global/required/includes/g_findbar.inc new file mode 100644 index 000000000000..b193da41f963 --- /dev/null +++ b/testautomation/global/required/includes/g_findbar.inc @@ -0,0 +1,142 @@ +'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 +' +' for a copy of the LGPLv3 License. +' +'/************************************************************************ +'* +'* owner : Joerg.Skottke@Sun.Com +'* +'* short description : Update test for the findbar +'* +'\*********************************************************************** + +testcase tUpdtFindBar() + + printlog( "Update test for the findbar" ) + + const TEST_STRING = "VCL Testtool" + + select case( gApplication ) + case "IMPRESS", "DRAW", "DATABASE" + kontext "FindBar" + if ( FindBar.exists() ) then + warnlog( "The FindBar should not be visible by default" ) + else + ' Toggle FindBar + endif + end select + + hNewDocument() + + kontext "FindBar" + if ( FindBar.exists() ) then + + printlog( "FindBar has " & FindBar.getItemCount() & " items" ) + + printlog( "Insert text into search field" ) + FindText.setText( TEST_STRING ) + + printlog( "Click (down arrow)" ) + DownSearch.click() + + kontext "Active" + if ( Active.exists( 1 ) ) then + printlog( "Expected message: " & Active.getText() + Active.ok() + else + warnlog( "Messagebox missing " ) + endif + + printlog( "Click (up arrow)" ) + kontext "FindBar" + UpSearch.click() + + kontext "Active" + if ( Active.exists( 1 ) ) then + printlog( "Expected message: " & Active.getText() + Active.ok() + else + warnlog( "Messagebox missing " ) + endif + + printlog( "Search dialog button may not be visible by default" ) + kontext "FindBar" + if ( SearchDialog.exists() ) then + if ( SearchDialog.isVisible() ) then + SearchDialog.click() + warnlog( "Button is visible" ) + else + printlog( "Button is hidden, good" ) + endif + else + warnlog( " button should not be visible" ) + endif + + printlog( "Add button to toolbar" ) + hToggleSearchDialog() + + kontext "FindBar" + SearchDialog.click() + + kontext "FindAndReplace" + if ( FindAndReplace.exists( 1 ) ) then + if ( SearchFor.getSelText() = TEST_STRING ) then + printlog( "Test string has been inserted into Listbox. Good." ) + else + warnlog( "Search string should have been copied from findbar to search dialog" ) + endif + FindAndReplace.close() + else + warnlog( "Dialog is missing" ) + endif + + printlog( "Remove button from toolbar" ) + hToggleSearchDialog() + + else + warnlog( "FindBar is not visible" ) + endif + + hCloseDocument() + +endcase + +function hToggleSearchDialog() + + printlog( "Make button visible via context menu" ) + + const MENU_VISIBLE_BUTTONS = 1 + const MENU_SEARCH_AND_REPLACE = 4 + + kontext "FindBar" + FindBar.openContextMenu() + wait( 1000 ) + + hMenuSelectNr( MENU_VISIBLE_BUTTONS ) + wait( 1000 ) + + hMenuSelectNr( MENU_SEARCH_AND_REPLACE ) + wait( 1000 ) + +end function \ No newline at end of file -- cgit v1.2.3 From b33e252b7b41d0359539f9c867806dfc7ca2cf20 Mon Sep 17 00:00:00 2001 From: "Joerg Skottke [jsk]" Date: Tue, 1 Jun 2010 01:07:21 +0200 Subject: findbar01: #i111912 - [Testautomation] Added calls to DialogTest() --- testautomation/global/required/includes/g_findbar.inc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/testautomation/global/required/includes/g_findbar.inc b/testautomation/global/required/includes/g_findbar.inc index b193da41f963..5e32b95b1b2d 100644 --- a/testautomation/global/required/includes/g_findbar.inc +++ b/testautomation/global/required/includes/g_findbar.inc @@ -63,6 +63,9 @@ testcase tUpdtFindBar() kontext "Active" if ( Active.exists( 1 ) ) then printlog( "Expected message: " & Active.getText() + call DialogTest( Active ) + + kontext "Active" Active.ok() else warnlog( "Messagebox missing " ) @@ -75,6 +78,9 @@ testcase tUpdtFindBar() kontext "Active" if ( Active.exists( 1 ) ) then printlog( "Expected message: " & Active.getText() + call DialogTest( Active ) + + kontext "Active" Active.ok() else warnlog( "Messagebox missing " ) @@ -85,7 +91,7 @@ testcase tUpdtFindBar() if ( SearchDialog.exists() ) then if ( SearchDialog.isVisible() ) then SearchDialog.click() - warnlog( "Button is visible" ) + warnlog( "Button is visible, it should be hidden by default" ) else printlog( "Button is hidden, good" ) endif @@ -101,6 +107,9 @@ testcase tUpdtFindBar() kontext "FindAndReplace" if ( FindAndReplace.exists( 1 ) ) then + call DialogTest( FindAndReplace ) + + kontext "FindAndReplace" if ( SearchFor.getSelText() = TEST_STRING ) then printlog( "Test string has been inserted into Listbox. Good." ) else @@ -122,6 +131,8 @@ testcase tUpdtFindBar() endcase +'******************************************************************************* + function hToggleSearchDialog() printlog( "Make button visible via context menu" ) -- cgit v1.2.3 From bc7d467beea0df73764a4e7ac66e7144551bd12c Mon Sep 17 00:00:00 2001 From: "Joerg Skottke [jsk]" Date: Wed, 2 Jun 2010 12:01:20 +0200 Subject: findbar01: #i111912 - Modified g_findbar.inc to make the CWS pass in reasonable timeframe. Followup-issues are #i111984 and #i112026. Integration is postponed due to massive conflicts with CWS vitomation01 --- .../global/required/includes/g_findbar.inc | 66 ++++++++++++---------- 1 file changed, 36 insertions(+), 30 deletions(-) diff --git a/testautomation/global/required/includes/g_findbar.inc b/testautomation/global/required/includes/g_findbar.inc index 5e32b95b1b2d..38af3edd28aa 100644 --- a/testautomation/global/required/includes/g_findbar.inc +++ b/testautomation/global/required/includes/g_findbar.inc @@ -33,6 +33,9 @@ testcase tUpdtFindBar() + ' This test is incomplete. It needs to be integrated into all update tests + ' and it needs to be added to the toolbar management functions + printlog( "Update test for the findbar" ) const TEST_STRING = "VCL Testtool" @@ -42,8 +45,6 @@ testcase tUpdtFindBar() kontext "FindBar" if ( FindBar.exists() ) then warnlog( "The FindBar should not be visible by default" ) - else - ' Toggle FindBar endif end select @@ -86,42 +87,47 @@ testcase tUpdtFindBar() warnlog( "Messagebox missing " ) endif - printlog( "Search dialog button may not be visible by default" ) - kontext "FindBar" - if ( SearchDialog.exists() ) then - if ( SearchDialog.isVisible() ) then - SearchDialog.click() - warnlog( "Button is visible, it should be hidden by default" ) + warnlog( "#i111984 - exclude button from testing" ) + goto skip_SearchDialog + + printlog( "Search dialog button may not be visible by default" ) + kontext "FindBar" + if ( SearchDialog.exists() ) then + if ( SearchDialog.isVisible() ) then + SearchDialog.click() + warnlog( "Button is visible, it should be hidden by default" ) + else + printlog( "Button is hidden, good" ) + endif else - printlog( "Button is hidden, good" ) + warnlog( " button should not be visible" ) endif - else - warnlog( " button should not be visible" ) - endif - printlog( "Add button to toolbar" ) - hToggleSearchDialog() + printlog( "Add button to toolbar" ) + hToggleSearchDialog() - kontext "FindBar" - SearchDialog.click() - - kontext "FindAndReplace" - if ( FindAndReplace.exists( 1 ) ) then - call DialogTest( FindAndReplace ) + kontext "FindBar" + SearchDialog.click() kontext "FindAndReplace" - if ( SearchFor.getSelText() = TEST_STRING ) then - printlog( "Test string has been inserted into Listbox. Good." ) + if ( FindAndReplace.exists( 1 ) ) then + call DialogTest( FindAndReplace ) + + kontext "FindAndReplace" + if ( SearchFor.getSelText() = TEST_STRING ) then + printlog( "Test string has been inserted into Listbox. Good." ) + else + warnlog( "Search string should have been copied from findbar to search dialog" ) + endif + FindAndReplace.close() else - warnlog( "Search string should have been copied from findbar to search dialog" ) + warnlog( "Dialog is missing" ) endif - FindAndReplace.close() - else - warnlog( "Dialog is missing" ) - endif - - printlog( "Remove button from toolbar" ) - hToggleSearchDialog() + + printlog( "Remove button from toolbar" ) + hToggleSearchDialog() + + skip_SearchDialog: else warnlog( "FindBar is not visible" ) -- cgit v1.2.3