diff options
author | Kurt Zenker <kz@openoffice.org> | 2009-09-11 09:40:28 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2009-09-11 09:40:28 +0000 |
commit | 69cc6cf4a490814126c74674898c271b9dc813cf (patch) | |
tree | bad0a74d07829fa4c0ffc648d0b0ea8858c595d3 | |
parent | 0a5b1d26ac2229ee1bc842e17294719c8fc15d29 (diff) |
CWS-TOOLING: integrate CWS ab70
2009-09-10 15:12:54 +0200 jsk r276034 : #i85434# - mandatory automatic update test
2009-09-10 15:11:06 +0200 jsk r276033 : #i85434# - mandatory automatic update test
2009-09-02 09:49:24 +0200 ab r275698 : #i85434# Dialog Import
11 files changed, 249 insertions, 80 deletions
diff --git a/testautomation/framework/required/f_basic_dialogs.bas b/testautomation/framework/required/f_basic_dialogs.bas index 7f0874597bdd..d0e1535697f2 100755 --- a/testautomation/framework/required/f_basic_dialogs.bas +++ b/testautomation/framework/required/f_basic_dialogs.bas @@ -43,12 +43,14 @@ sub main use "framework\required\includes\basic_dialog_i18n.inc" use "framework\required\includes\basic_organizer.inc" use "framework\required\includes\basic_dialog_export.inc" + use "framework\required\includes\basic_dialog_i18n_import.inc" call hStatusIn( "framework" , "f_basic_dialogs.bas" ) call tUpdtMacroAssignment() call tUpdtBasicDialogI18n() call tUpdtBasicOrganizer() call tUpdtDialogExport() + call tBasicDialogI18nImport() call hStatusOut() end sub diff --git a/testautomation/framework/required/includes/basic_dialog_i18n.inc b/testautomation/framework/required/includes/basic_dialog_i18n.inc index 152af6185c52..4947b72fa37b 100755 --- a/testautomation/framework/required/includes/basic_dialog_i18n.inc +++ b/testautomation/framework/required/includes/basic_dialog_i18n.inc @@ -39,23 +39,11 @@ testcase tUpdtBasicDialogI18n - '///<h3>Update test for Basic IDE / Dialog i18n-feature</h3> - '///<i>Specification: Translation Inside Dialog IDE</i><br> - + printlog( "BASIC IDE Dialog i18n." ) + dim brc as boolean - '///<ul> - '///+<li>Create a new writer document</li> - '///+<li>Open the BASIC organiser</li> - '///+<li>Select the document and create a new BASIC module</li> - '///+<li>Edit the module</li> - '///+<li>Create a new dialog</li> - '///+<li>Open the ToolsCollectionBar</li> - - ' Just in case, this thing is annoying hCloseNavigator() - - '///+<li>Open a new writer document</li> hCreateDocument()' brc = hInitFormControls( "tDialogI18n" ) @@ -64,91 +52,94 @@ testcase tUpdtBasicDialogI18n goto endsub endif - '///+<li>Click the "Add language" button on the ToolsCollectionBar</li> printlog( "Click Manage Languages on ToolsCollectionBar") kontext "ToolsCollectionBar" - ManageLanguage.click() + if ( ToolsCollectionBar.exists() ) then + ManageLanguage.click() + else + warnlog( "<ToolsCollectionBar> is not open, is the test environment dirty?" ) + endif kontext "ManageUILanguages" - call dialogtest( ManageUILanguages ) - - '///+<li>Click the "Add" button, this will add a default language</li> - printlog( "Add default language, choose preselection") - kontext "ManageUILanguages" - Add.click() - - kontext "SetDefaultLanguage" - call dialogtest( SetDefaultLanguage ) - - '///+<li>Select a language at random</li> - kontext "SetDefaultLanguage" - DefaultLanguageListbox.select( 3 ) - - '///+<li>Leave the dialog with "ok"</li> - kontext "SetDefaultLanguage" - SetDefaultLanguage.ok() - - '///+<li>Click "Add" again</li> - printlog( "Back on Manage UI Languages Dialog") - kontext "ManageUILanguages" - Add.click() - - kontext "AddUserInterface" - call dialogtest( AddUserInterface ) + if ( ManageUILanguages.exists( 2 ) ) then + call dialogtest( ManageUILanguages ) + + printlog( "Add default language, choose preselection") + kontext "ManageUILanguages" + Add.click() + + kontext "SetDefaultLanguage" + if ( SetDefaultLanguage.exists( 2 ) ) then + call dialogtest( SetDefaultLanguage ) + + kontext "SetDefaultLanguage" + DefaultLanguageListbox.select( 3 ) + + kontext "SetDefaultLanguage" + SetDefaultLanguage.ok() + else + warnlog( "Dialog <SetDefaultLanguage> did not open" ) + endif + + printlog( "Back on Manage UI Languages Dialog we click <Add>") + kontext "ManageUILanguages" + Add.click() + + kontext "AddUserInterface" + if ( AddUserInterface.exists( 2 ) ) then + call dialogtest( AddUserInterface ) - '///+<li>Select and check the first language in the list</li> - printlog( "Add just another language at random") - kontext "AddUserInterface" - AddNewControl.typeKeys( "<HOME>" ) ' select first item - AddNewControl.typeKeys( "<SPACE>" ) ' check it + printlog( "Add just another language at random") + kontext "AddUserInterface" + AddNewControl.typeKeys( "<HOME>" ) ' select first item + AddNewControl.typeKeys( "<SPACE>" ) ' check it - '///+<li>Leave the dialog with "ok"</li> - kontext "AddUserInterface" - AddUserInterface.ok() - - '///+<li>Select the first language in the languages list</li> - kontext "ManageUILanguages" - PresentLanguages.Select (1) - - '///+<li>Click "Delete"</li> - printlog( "Back on Manage UI Languages Dialog, delete selected language") - kontext "ManageUILanguages" - Delete.click() - - printlog( "Confirm delete") - kontext "active" - call dialogtest( active ) - - '///+<li>Confirm deletion</li> - kontext "active" - active.ok() - - '///+<li>Close "Manage User Interface languages" dialog</li> - printlog( "Leave Manage UI Languages Dialog") - kontext "ManageUILanguages" - ManageUILanguages.ok() + kontext "AddUserInterface" + AddUserInterface.ok() + else + warnlog( "Dialog <AddUserInterface> did not open" ) + endif + + kontext "ManageUILanguages" + PresentLanguages.Select (1) + + printlog( "Back on Manage UI Languages Dialog, delete selected language") + kontext "ManageUILanguages" + Delete.click() + + printlog( "Confirm delete") + kontext "active" + if ( Active.exists( 1 ) ) then + call dialogtest( active ) + + kontext "active" + active.ok() + else + warnlog( "Confirm delete messagebox is missing" ) + endif + + printlog( "Leave Manage UI Languages Dialog") + kontext "ManageUILanguages" + ManageUILanguages.ok() + else + warnlog( "Manage UI languages did not open" ) + endif - '///+<li>Verify that the new translation toolbar is visible</li> printlog( "Verify that the translationbar is visible") kontext "TranslationBar" if ( not TranslationBar.exists() ) then warnlog( "The IDE Translation Toolbar is not visible" ) endif - - '///+<li>Cleanup: Close ToolsCollectionBar</li> + kontext "ToolsCollectionBar" if ( not ToolsCollectionBar.exists() ) then warnlog( "The ToolsCollectionBar is not visible" ) endif + + printlog( "Cleanup" ) ToolsCollectionBar.Close - - '///+<li>Cleanup: Close the basic IDE</li> hClosebasicIDE() - - '///+<li>Cleanup: Close the document</li> hDestroyDocument() - '///</ul> - endcase diff --git a/testautomation/framework/required/includes/basic_dialog_i18n_import.inc b/testautomation/framework/required/includes/basic_dialog_i18n_import.inc new file mode 100755 index 000000000000..ebaa8ae4a9f4 --- /dev/null +++ b/testautomation/framework/required/includes/basic_dialog_i18n_import.inc @@ -0,0 +1,143 @@ +'encoding UTF-8 Do not remove or change this line! +'************************************************************************** +'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +'* +'* Copyright 2008 by Sun Microsystems, Inc. +'* +'* OpenOffice.org - a multi-platform office productivity suite +'* +'* $RCSfile: basic_delete_modules.inc,v $ +'* +'* $Revision: 1.1 $ +'* +'* last change: $Author: jsi $ $Date: 2008-06-16 12:18:13 $ +'* +'* 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 : joerg.skottke@sun.com +'* +'* short description : +'* +'\****************************************************************************** + +testcase tBasicDialogI18nImport + + printlog( "Dialogs that show up when importing Multi locale dialogs into BASIC IDE" ) + + dim cDialogPath as string + cDialogPath = gTesttoolPath & "framework\required\input\basic_ide\Dialog5.xdl" + cDialogPath = convertpath( cDialogPath ) + + printlog( "Open BASIC-IDE" ) + hCreateDocument() + hInitFormControls( "tDialogI18nImport" ) + + kontext "ToolsCollectionBar" + if ( ToolsCollectionBar.exists() ) then + ToolsCollectionBar.close() + endif + + Kontext "DialogBar" + if ( DialogBar.exists() ) then + + printlog( "Click on <Import> button on <DialogBar>" ) + Import.click() + + kontext "OeffnenDlg" + if ( OeffnenDlg.exists( 2 ) ) then + + printlog( "Enter path to test dialog" ) + DateiName.setText( cDialogPath ) + Oeffnen.click() + + printlog( "Test messagebox" ) + kontext "active" + if ( Active.exists( 2 ) ) then + + printlog( "Messagebox: " & Active.getText() ) + if ( Active.getButtonCount <> 4 ) then + warnlog( "Incorrect messagebox, expected locale clash warning" ) + endif + + call DialogTest( Active ) + + printlog( "Accept with yes" ) + Active.Yes() + + Kontext "TranslationBar" + if ( TranslationBar.exists() ) then + + printlog( "Check number of imported languages, should be 5" ) + if ( CurrentLanguage.getItemCount <> 5 ) then + warnlog( "Five languages should be listed in the languages box" ) + endif + + Kontext "DialogBar" + if ( DialogBar.exists() ) then + + printlog( "Click on <Import> button on <DialogBar>" ) + Import.click() + + kontext "OeffnenDlg" + if ( OeffnenDlg.exists( 2 ) ) then + + printlog( "Enter path to test dialog" ) + DateiName.setText( cDialogPath ) + Oeffnen.click() + + printlog( "Test messagebox" ) + kontext "Active" + if ( Active.exists( 2 ) ) then + + printlog( "Messagebox: " & Active.getText() ) + if ( Active.getButtonCount <> 3 ) then + warnlog( "Incorrect messagebox, expected dialog replace warning" ) + endif + + call DialogTest( Active ) + + Printlog( "Rename the new dialog" ) + Active.Yes() + else + warnlog( "Overwrite warning missing" ) + endif + else + warnlog( "<OeffnenDlg> did not open" ) + endif + else + warnlog( "<DialogBar> is not available" ) + endif + else + warnlog( "<TranslationBar> is not available" ) + endif + else + warning( "Locale clash messagebox is missing" ) + endif + else + warnlog( "<OeffnenDlg> did not open" ) + endif + else + warnlog( "<DialogBar> is not available" ) + endif + hCloseBasicIde() + hDestroyDocument() + +endcase + diff --git a/testautomation/framework/required/input/basic_ide/Dialog5.xdl b/testautomation/framework/required/input/basic_ide/Dialog5.xdl new file mode 100644 index 000000000000..8813d9fe7008 --- /dev/null +++ b/testautomation/framework/required/input/basic_ide/Dialog5.xdl @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd"> +<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="Dialog5" dlg:left="259" dlg:top="130" dlg:width="201" dlg:height="169" dlg:help-text="&28.Dialog5.HelpText" dlg:closeable="true" dlg:moveable="true" dlg:title="&29.Dialog5.Title"> + <dlg:bulletinboard> + <dlg:button dlg:id="CommandButton1" dlg:tab-index="0" dlg:left="59" dlg:top="44" dlg:width="84" dlg:height="49" dlg:help-text="&30.Dialog5.CommandButton1.HelpText" dlg:value="&31.Dialog5.CommandButton1.Label"/> + </dlg:bulletinboard> +</dlg:window>
\ No newline at end of file diff --git a/testautomation/framework/required/input/basic_ide/Dialog5_ar_DZ.default b/testautomation/framework/required/input/basic_ide/Dialog5_ar_DZ.default new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/testautomation/framework/required/input/basic_ide/Dialog5_ar_DZ.default diff --git a/testautomation/framework/required/input/basic_ide/Dialog5_ar_DZ.properties b/testautomation/framework/required/input/basic_ide/Dialog5_ar_DZ.properties new file mode 100644 index 000000000000..66ee58c3205e --- /dev/null +++ b/testautomation/framework/required/input/basic_ide/Dialog5_ar_DZ.properties @@ -0,0 +1,5 @@ +# Dialog5 strings +28.Dialog5.HelpText= +29.Dialog5.Title= +30.Dialog5.CommandButton1.HelpText= +31.Dialog5.CommandButton1.Label=Arabic diff --git a/testautomation/framework/required/input/basic_ide/Dialog5_ca_ES.properties b/testautomation/framework/required/input/basic_ide/Dialog5_ca_ES.properties new file mode 100644 index 000000000000..5dcdf5d842e9 --- /dev/null +++ b/testautomation/framework/required/input/basic_ide/Dialog5_ca_ES.properties @@ -0,0 +1,5 @@ +# Dialog5 strings +28.Dialog5.HelpText= +29.Dialog5.Title= +30.Dialog5.CommandButton1.HelpText= +31.Dialog5.CommandButton1.Label=Catalan diff --git a/testautomation/framework/required/input/basic_ide/Dialog5_de_DE.properties b/testautomation/framework/required/input/basic_ide/Dialog5_de_DE.properties new file mode 100644 index 000000000000..ef060d3b270e --- /dev/null +++ b/testautomation/framework/required/input/basic_ide/Dialog5_de_DE.properties @@ -0,0 +1,5 @@ +# Dialog5 strings +28.Dialog5.HelpText= +29.Dialog5.Title= +30.Dialog5.CommandButton1.HelpText= +31.Dialog5.CommandButton1.Label=German diff --git a/testautomation/framework/required/input/basic_ide/Dialog5_en_US.properties b/testautomation/framework/required/input/basic_ide/Dialog5_en_US.properties new file mode 100644 index 000000000000..63ddbb05f82c --- /dev/null +++ b/testautomation/framework/required/input/basic_ide/Dialog5_en_US.properties @@ -0,0 +1,5 @@ +# Dialog5 strings +28.Dialog5.HelpText= +29.Dialog5.Title= +30.Dialog5.CommandButton1.HelpText= +31.Dialog5.CommandButton1.Label=English diff --git a/testautomation/framework/required/input/basic_ide/Dialog5_fr_FR.properties b/testautomation/framework/required/input/basic_ide/Dialog5_fr_FR.properties new file mode 100644 index 000000000000..35ce6c96b072 --- /dev/null +++ b/testautomation/framework/required/input/basic_ide/Dialog5_fr_FR.properties @@ -0,0 +1,5 @@ +# Dialog5 strings +28.Dialog5.HelpText= +29.Dialog5.Title= +30.Dialog5.CommandButton1.HelpText= +31.Dialog5.CommandButton1.Label=French diff --git a/testautomation/global/win/bars.win b/testautomation/global/win/bars.win index 018ff2bfbb08..35b87e3ff1b8 100755 --- a/testautomation/global/win/bars.win +++ b/testautomation/global/win/bars.win @@ -1397,3 +1397,4 @@ VorherigeDarstellung .uno:ZoomPrevious Library .uno:LibSelector Controls .uno:ChooseControls Export .uno:ExportDialog +Import .uno:ImportDialog |