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: help_search.inc,v $
13 '* last change: $Author: jsi $ $Date: 2008-06-16 12:18:14 $
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 : joerg.skottke@sun.com
36 '* short description : Search for a string, apply restrictions, verify
38 '\******************************************************************************
42 if ( gIsoLang <> "en-US" ) then
43 printlog( "No testing for languages other than en_US" )
47 '///<H1>Search for a string, apply restrictions, verify</H1>
48 '///<h2>help_search.bas::tHelpSearch</h2>
54 dim sFileOut as string
55 dim aUIList( 100 ) as string
57 dim cBasePath as string
58 cBasePath = gTesttoolPath & "framework\optional\input\help_browser\"
59 dim cDataFile as string
61 '///+<li>Open the help browser</li>
64 warnlog( "Help not open, aborting test" )
69 '///+<li>Switch to the Search-tab (find)</li>
70 brc = hSelectHelpTab( "find" )
72 warnlog( "Could not access requested TabPage, aborting test" )
77 '----------- Search without filter -----------------------------------------
79 printlog( "Search for <java> without any filter" )
81 '///+<li>Enter "Java" into the search entryfield</li>
82 '///+<li>Uncheck Whole words only and headings only</li>
83 SearchFind.setText( "java" )
84 FindFullWords.unCheck()
85 FindInHeadingsOnly.unCheck()
87 '///+<li>Click "Search"</li>
90 '///+<li>Retrieve all entries from the list</li>
91 ListAllDelete( aUIList() )
92 hGetListItems( Result, aUIList() )
94 '///+<li>Compare content to a reference or create a new ref-file</li>
95 cDataFile = gProductName & "_search_without_filter_" & gIsoLang & ".txt"
96 sFileOut = hGetWorkFile( cDataFile )
97 sFileIn = convertpath( cBasePath & cDataFile )
99 irc = hManageComparisionList( sFileIn, sFileOut, aUIList() )
101 warnlog( "Lists are not identical, please review the log" )
104 ' ------------ Search whole words only -------------------------------------
106 printlog( "Search for <java>, whole words only" )
108 '///+<li>Apply filter: Whole words only</li>
109 SearchFind.setText( "java" )
110 FindFullWords.Check()
111 FindInHeadingsOnly.unCheck()
113 '///+<li>Click "Search"</li>
116 '///+<li>Retrieve all entries from the list</li>
117 ListAllDelete( aUIList() )
118 hGetListItems( Result, aUIList() )
120 '///+<li>Compare content to a reference or create a new ref-file</li>
121 cDataFile = gProductName & "_search_whole_words_only_" & gIsoLang & ".txt"
122 sFileOut = hGetWorkFile( cDataFile )
123 sFileIn = convertpath( cBasePath & cDataFile )
125 irc = hManageComparisionList( sFileIn, sFileOut, aUIList() )
127 warnlog( "Lists are not identical, please review the log" )
130 ' ------------ Search headings only ----------------------------------------
132 printlog( "Search for <java>, headings only" )
134 '///+<li>Apply filter: Whole words only</li>
135 SearchFind.setText( "java" )
136 FindFullWords.unCheck()
137 FindInHeadingsOnly.Check()
139 '///+<li>Click "Search"</li>
142 '///+<li>Retrieve all entries from the list</li>
143 ListAllDelete( aUIList() )
144 hGetListItems( Result, aUIList() )
146 '///+<li>Compare content to a reference or create a new ref-file</li>
147 cDataFile = gProductName & "_search_headings_only_" & gIsoLang & ".txt"
148 sFileOut = hGetWorkFile( cDataFile )
149 sFileIn = convertpath( cBasePath & cDataFile )
151 irc = hManageComparisionList( sFileIn, sFileOut, aUIList() )
153 warnlog( "Lists are not identical, please review the log" )
156 ' ------------ Search headings and whole words -----------------------------
158 printlog( "Search for <java>, limit results to whole words and headings" )
160 '///+<li>Apply filter: Headings and whole words</li>
161 SearchFind.setText( "java" )
162 FindFullWords.Check()
163 FindInHeadingsOnly.Check()
165 '///+<li>Click "Search"</li>
168 '///+<li>Retrieve all entries from the list</li>
169 ListAllDelete( aUIList() )
170 hGetListItems( Result, aUIList() )
172 '///+<li>Compare content to a reference or create a new ref-file</li>
173 cDataFile = gProductName & "_search_headings_and_whole_words_" & gIsoLang & ".txt"
174 sFileOut = hGetWorkFile( cDataFile )
175 sFileIn = convertpath( cBasePath & cDataFile )
177 irc = hManageComparisionList( sFileIn, sFileOut, aUIList() )
179 warnlog( "Lists are not identical, please review the log" )