incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From liu...@apache.org
Subject svn commit: r1362744 - in /incubator/ooo/trunk/main/test/testoo/src: testcase/ testcase/formula/catalog/ testcase/formula/elements/ testcase/presentation/ testcase/presentation/headerandfooter/ testcase/sd/headerandfooter/ testcase/sw/table/ testcase/t...
Date Wed, 18 Jul 2012 02:28:44 GMT
Author: liuzhe
Date: Wed Jul 18 02:28:42 2012
New Revision: 1362744

URL: http://svn.apache.org/viewvc?rev=1362744&view=rev
Log:
#120295# - VCLAuto patch: refactor function verification test. Test cases about text document and presentation. 
          Patch by: Li Lin Yi
          Review by: Liu Zhe

Added:
    incubator/ooo/trunk/main/test/testoo/src/testcase/formula/catalog/AddDeleteSymbolsFromCatalog.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/formula/catalog/InputCharacterFromCatalogDlg.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/presentation/
    incubator/ooo/trunk/main/test/testoo/src/testcase/presentation/headerandfooter/
    incubator/ooo/trunk/main/test/testoo/src/testcase/presentation/headerandfooter/HeaderAndFooterSetting.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/presentation/headerandfooter/OpenDocumentWithHeaderFooter.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/textdocument/
    incubator/ooo/trunk/main/test/testoo/src/testcase/textdocument/table/
    incubator/ooo/trunk/main/test/testoo/src/testcase/textdocument/table/Table.java
Removed:
    incubator/ooo/trunk/main/test/testoo/src/testcase/formula/catalog/AddCustomSymbolsFromCatalog.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/formula/catalog/DeleteSymbolFromCatalog.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/formula/catalog/InputGreekCharacterFromCatalogDlg.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/formula/catalog/InputIGreekCharacterFromCatalogDlg.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/formula/catalog/InputSpecialCharacterFromCatalogDlg.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/formula/elements/ElementsWindowActive.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sd/headerandfooter/CopySlideWithApplyFooter.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sd/headerandfooter/CopySlideWithApplyToAllFooter.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sd/headerandfooter/CopySlideWithNotesHeaderFooter.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sd/headerandfooter/DuplicateSlideWithApplyToAllFooter.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sd/headerandfooter/FooterNotShowOn1stSlide.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sd/headerandfooter/InsertApplyFooterOnSlide.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sd/headerandfooter/InsertApplyToAllFooterOnNotes.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sd/headerandfooter/InsertApplyToAllFooterOnSlide.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sd/headerandfooter/InsertAutoUpdateTimeFooter.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sd/headerandfooter/InsertAutoUpdateTimeOnNotes.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sd/headerandfooter/InsertHeaderFooterOnNotes.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sd/headerandfooter/InsertHeaderFooterOnSlide.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sd/headerandfooter/OpenAOO34WithHeaderFooter.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sd/headerandfooter/OpenPPTWithHeaderFooter.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sw/table/ConvertTableToText.java
Modified:
    incubator/ooo/trunk/main/test/testoo/src/testcase/BVTFunction.java
    incubator/ooo/trunk/main/test/testoo/src/testlib/AppUtil.java
    incubator/ooo/trunk/main/test/testoo/src/testlib/UIMap.java

Modified: incubator/ooo/trunk/main/test/testoo/src/testcase/BVTFunction.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/test/testoo/src/testcase/BVTFunction.java?rev=1362744&r1=1362743&r2=1362744&view=diff
==============================================================================
--- incubator/ooo/trunk/main/test/testoo/src/testcase/BVTFunction.java (original)
+++ incubator/ooo/trunk/main/test/testoo/src/testcase/BVTFunction.java Wed Jul 18 02:28:42 2012
@@ -145,7 +145,6 @@ public class BVTFunction {
 	@Test
 	public void testAboutDialog()
 	{
-
 		app.dispatch(".uno:About");
 		assertTrue(AboutDialog.exists(5));
 		AboutDialog.ok();

Added: incubator/ooo/trunk/main/test/testoo/src/testcase/formula/catalog/AddDeleteSymbolsFromCatalog.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/test/testoo/src/testcase/formula/catalog/AddDeleteSymbolsFromCatalog.java?rev=1362744&view=auto
==============================================================================
--- incubator/ooo/trunk/main/test/testoo/src/testcase/formula/catalog/AddDeleteSymbolsFromCatalog.java (added)
+++ incubator/ooo/trunk/main/test/testoo/src/testcase/formula/catalog/AddDeleteSymbolsFromCatalog.java Wed Jul 18 02:28:42 2012
@@ -0,0 +1,211 @@
+/**************************************************************
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+
+
+/**
+ * 
+ */
+package testcase.formula.catalog;
+
+import static testlib.AppUtil.*;
+import static testlib.UIMap.*;
+import static org.junit.Assert.*;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import testlib.Log;
+
+/**
+ *
+ */
+public class AddDeleteSymbolsFromCatalog {
+
+	@Rule
+	public Log LOG = new Log();
+	
+	@Before
+	public void setUp() throws Exception {
+		app.start();
+		
+		// New a formula document
+		startcenter.menuItem("File->New->Formula").select();
+		sleep(3);		
+		
+		// Click catalog button
+		math_CatalogButton.click();
+		sleep(1);
+		
+		// Verify if the "Symbols" dialog pop up
+		assertTrue("Symbols dialog does not pop up", math_SymbolsDlg.exists(3));
+		
+		// Select "Special", click "Edit" button
+		math_SymbolsDlgListbox.select("Special");
+		math_SymbolsDlgEditButton.click();
+		sleep(1);
+		
+		// Verify if the "Edit Symbols" dialog pop up
+		assertTrue("Edit Symbols dialog does not pop up", math_EditSymbolsDlg.exists(3));
+	}
+
+	@After
+	public void tearDown() throws Exception {
+		app.close();
+	}
+
+	/**
+	 * Test add custom symbols from Catalog->Symbols
+	 * @throws Exception
+	 */
+	@Test
+	public void testAddSymbolFromCatalog() throws Exception{
+		
+		// Choose a symbol which is not in the list, click "Add" and "OK"
+		String selectedSymbol;
+		boolean bSelectSymbolNotInList;
+		int nListCount;
+		int nIndex = 1;
+		do {
+			math_EditSymbolsDlgViewControl.click(100*nIndex, 10);	// risk: after 6 or 7 circles, this will click out of ViewControl
+			sleep(1);
+			selectedSymbol = math_EditSymbolsDlgSymbol.getText();
+			nIndex++;
+			// Find if the selected symbol is already in the list
+			bSelectSymbolNotInList = false;
+			nListCount = math_EditSymbolsDlgSymbol.getItemCount();
+			for (int i=0; i<nListCount; i++) {
+				if (selectedSymbol.equals(math_EditSymbolsDlgSymbol.getItemText(i))) {
+					bSelectSymbolNotInList = true;
+					break;
+				}
+			}
+		} while (bSelectSymbolNotInList);
+		math_EditSymbolsDlgAdd.click();
+		math_EditSymbolsDlg.ok();
+		sleep(1);
+		
+		// Verify if the symbol is added to Symbol set
+		math_SymbolsDlgEditButton.click();
+		bSelectSymbolNotInList = false;
+		nListCount = math_EditSymbolsDlgSymbol.getItemCount();
+		for (int i=0; i<nListCount; i++) {
+			if (selectedSymbol.equals(math_EditSymbolsDlgSymbol.getItemText(i))) {
+				bSelectSymbolNotInList = true;
+				break;
+			}
+		}
+		assertTrue("Symbol is not added to Symbol set", bSelectSymbolNotInList);
+		
+		// Close all dialogs
+		math_EditSymbolsDlg.cancel();
+		math_SymbolsDlg.close();
+		app.dispatch(".uno:CloseDoc");
+	}
+	
+	/**
+	 * Test modify font of custom symbols from Catalog->Symbols
+	 * @throws Exception
+	 */
+	@Test
+	public void testModifySymbolFontFromCatalog() throws Exception{
+		
+		// Modify the font of selected symbol
+		//String selectedSymbol = math_EditSymbolsDlgSymbol.getText();
+		int oldSymbolFontIndex = math_EditSymbolsDlgFont.getSelIndex();
+		int modifiedSymbolFondIndex = (oldSymbolFontIndex+1==math_EditSymbolsDlgFont.getItemCount()) ? 0 : (oldSymbolFontIndex+1);
+		math_EditSymbolsDlgFont.select(modifiedSymbolFondIndex);	// select the next font of old font
+		String modifiedSymbolFont = math_EditSymbolsDlgFont.getSelText();
+		String selectedSymbol = math_EditSymbolsDlgSymbol.getText();
+		math_EditSymbolsDlgModify.click();
+		math_EditSymbolsDlg.ok();
+		sleep(1);
+		
+		// Verify if the font of symbol is modified successfully
+		math_SymbolsDlgEditButton.click();
+		math_EditSymbolsDlgSymbol.select(selectedSymbol);
+		assertEquals("Font of symbol is not modified successfully", modifiedSymbolFont, math_EditSymbolsDlgFont.getSelText());
+		
+		// Close all dialogs
+		math_EditSymbolsDlg.cancel();
+		math_SymbolsDlg.close();
+		app.dispatch(".uno:CloseDoc");
+	}
+	
+	/**
+	 * Test modify typeface of custom symbols from Catalog->Symbols
+	 * @throws Exception
+	 */
+	@Test
+	public void testModifySymbolTypefaceFromCatalog() throws Exception{
+				
+		// Modify the typeface of selected symbol
+//		String selectedSymbol = math_EditSymbolsDlgSymbol.getText();
+		int oldSymbolTypefaceIndex = math_EditSymbolsDlgTypeface.getSelIndex();
+		int modifiedSymbolTypefaceIndex = (oldSymbolTypefaceIndex+1==math_EditSymbolsDlgTypeface.getItemCount()) ? 0 : (oldSymbolTypefaceIndex+1);
+		math_EditSymbolsDlgTypeface.select(modifiedSymbolTypefaceIndex);	// select the next typeface of old typeface
+		String modifiedSymbolTypeface= math_EditSymbolsDlgTypeface.getSelText();
+		String selectedSymbol = math_EditSymbolsDlgSymbol.getText();
+		math_EditSymbolsDlgModify.click();
+		math_EditSymbolsDlg.ok();
+		sleep(1);
+		
+		// Verify if the typeface of symbol is modified successfully
+		math_SymbolsDlgEditButton.click();
+		math_EditSymbolsDlgSymbol.select(selectedSymbol);
+		assertEquals("Typeface of symbol is not modified successfully", modifiedSymbolTypeface, math_EditSymbolsDlgTypeface.getSelText());
+		
+		// Close all dialogs
+		math_EditSymbolsDlg.cancel();
+		math_SymbolsDlg.close();
+		app.dispatch(".uno:CloseDoc");
+	}
+	
+	/**
+	 * Test delete custom symbols from Catalog->Symbols
+	 * @throws Exception
+	 */
+	@Test
+	public void testDeleteSymbolFromCatalog() throws Exception{
+		
+		// Delete the selected symbol
+		String selectedSymbol = math_EditSymbolsDlgSymbol.getText();
+		math_EditSymbolsDlgDelete.click();
+		math_EditSymbolsDlg.ok();
+		sleep(1);
+		
+		// Verify if the selected symbol is deleted successfully
+		math_SymbolsDlgEditButton.click();
+		boolean isDeleted = true;
+		for (int i=0; i<math_EditSymbolsDlgSymbol.getItemCount(); i++) {
+			if (selectedSymbol.equals(math_EditSymbolsDlgSymbol.getItemText(i))){
+				isDeleted = false;
+				break;
+			}
+		}
+		assertTrue("Symbol is not deleted successfully", isDeleted);
+		
+		// Close all dialogs
+		math_EditSymbolsDlg.cancel();
+		math_SymbolsDlg.close();
+		app.dispatch(".uno:CloseDoc");
+	}
+}

Added: incubator/ooo/trunk/main/test/testoo/src/testcase/formula/catalog/InputCharacterFromCatalogDlg.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/test/testoo/src/testcase/formula/catalog/InputCharacterFromCatalogDlg.java?rev=1362744&view=auto
==============================================================================
--- incubator/ooo/trunk/main/test/testoo/src/testcase/formula/catalog/InputCharacterFromCatalogDlg.java (added)
+++ incubator/ooo/trunk/main/test/testoo/src/testcase/formula/catalog/InputCharacterFromCatalogDlg.java Wed Jul 18 02:28:42 2012
@@ -0,0 +1,155 @@
+/**************************************************************
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+
+
+/**
+ * 
+ */
+package testcase.formula.catalog;
+
+import static testlib.AppUtil.*;
+import static testlib.UIMap.*;
+import static org.junit.Assert.*;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import testlib.Log;
+
+/**
+ *
+ */
+public class InputCharacterFromCatalogDlg {
+
+	@Rule
+	public Log LOG = new Log();
+	
+	@Before
+	public void setUp() throws Exception {
+		app.start();
+		
+		// New a formula document
+		startcenter.menuItem("File->New->Formula").select();
+		sleep(3);		
+		
+		// Click catalog button
+		math_CatalogButton.click();
+		sleep(1);
+		
+		// Verify if the "Symbols" dialog pop up
+		assertTrue("Symbols dialog does not pop up", math_SymbolsDlg.exists(3));
+	}
+
+	@After
+	public void tearDown() throws Exception {
+		app.close();
+	}
+	
+	/**
+	 * Test input Greek character from Catalog->Symbols
+	 * @throws Exception
+	 */
+	@Test
+	public void testInputGreekFromCatalog() throws Exception{
+		
+		// Select "Greek", click "Edit" button to get the selected Symbol
+		math_SymbolsDlgListbox.select("Greek");
+		math_SymbolsDlgEditButton.click();
+		sleep(1);
+		String selectedSymbol = math_EditSymbolsDlgSymbol.getText();
+		math_EditSymbolsDlg.ok();
+		sleep(1);		
+		
+		// Insert the selected symbol
+		math_SymbolsDlgInsertButton.click();
+		math_SymbolsDlgCloseButton.click();
+		
+		// Verify if the symbol is inserted successfully
+		math_EditWindow.activate();
+		math_EditWindow.menuItem("Edit->Select All").select();
+		math_EditWindow.menuItem("Edit->Copy").select();
+		sleep(1);
+		assertEquals("Symbol is not inserted succcessfully", "%".concat(selectedSymbol).concat(" "), app.getClipboard());	// add "%" in the front, add " " in the end
+		
+		// Close all dialogs
+		app.dispatch(".uno:CloseDoc");
+	}
+	
+	/**
+	 * Test input iGreek character from Catalog->Symbols
+	 * @throws Exception
+	 */
+	@Test
+	public void testInputIGreekFromCatalog() throws Exception{
+		
+		// Select "iGreek", click "Edit" button to get the selected Symbol
+		math_SymbolsDlgListbox.select("iGreek");
+		math_SymbolsDlgEditButton.click();
+		sleep(1);
+		String selectedSymbol = math_EditSymbolsDlgSymbol.getText();
+		math_EditSymbolsDlg.ok();
+		sleep(1);		
+		
+		// Insert the selected symbol
+		math_SymbolsDlgInsertButton.click();
+		math_SymbolsDlgCloseButton.click();
+		
+		// Verify if the symbol is inserted successfully
+		math_EditWindow.click(5, 5);
+		math_EditWindow.menuItem("Edit->Select All").select();
+		math_EditWindow.menuItem("Edit->Copy").select();
+		sleep(1);
+		assertEquals("Symbol is not inserted succcessfully", "%".concat(selectedSymbol).concat(" "), app.getClipboard());	// add "%" in the front, add " " in the end
+		
+		// Close all dialogs
+		app.dispatch(".uno:CloseDoc");
+	}
+	
+	/**
+	 * Test input Special character from Catalog->Symbols
+	 * @throws Exception
+	 */
+	@Test
+	public void testInputSpecialFromCatalog() throws Exception{
+		
+		// Select "Special", "Insert" the default first symbol
+		math_SymbolsDlgListbox.select("Special");
+		math_SymbolsDlgInsertButton.click();	
+		
+		// Click "Edit" button to get the selected Symbol
+		math_SymbolsDlgEditButton.click();
+		sleep(1);
+		String selectedSymbol = math_EditSymbolsDlgSymbol.getText();
+		math_EditSymbolsDlg.ok();
+		math_SymbolsDlgCloseButton.click();
+		
+		// Verify if the symbol is inserted successfully
+		math_EditWindow.click(5, 5);
+		math_EditWindow.menuItem("Edit->Select All").select();
+		math_EditWindow.menuItem("Edit->Copy").select();
+		sleep(1);
+		assertEquals("Symbol is not inserted succcessfully", "%".concat(selectedSymbol).concat(" "), app.getClipboard());	// add "%" in the front, add " " in the end
+		
+		// Close all dialogs
+		app.dispatch(".uno:CloseDoc");
+	}
+}

Added: incubator/ooo/trunk/main/test/testoo/src/testcase/presentation/headerandfooter/HeaderAndFooterSetting.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/test/testoo/src/testcase/presentation/headerandfooter/HeaderAndFooterSetting.java?rev=1362744&view=auto
==============================================================================
--- incubator/ooo/trunk/main/test/testoo/src/testcase/presentation/headerandfooter/HeaderAndFooterSetting.java (added)
+++ incubator/ooo/trunk/main/test/testoo/src/testcase/presentation/headerandfooter/HeaderAndFooterSetting.java Wed Jul 18 02:28:42 2012
@@ -0,0 +1,724 @@
+/**************************************************************
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+
+
+/**
+ * 
+ */
+package testcase.presentation.headerandfooter;
+
+import static testlib.AppUtil.fullPath;
+import static testlib.AppUtil.openStartcenter;
+import static testlib.AppUtil.submitOpenDlg;
+import static testlib.AppUtil.submitSaveDlg;
+import static testlib.UIMap.*;
+import static org.junit.Assert.*;
+import static org.openoffice.test.vcl.Tester.*;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.openoffice.test.common.FileUtil;
+import testlib.ImpressUtil;
+import testlib.Log;
+
+public class HeaderAndFooterSetting{
+
+	@Rule
+	public Log LOG = new Log();
+
+	@Before
+	public void setUp() throws Exception {
+		app.start();
+
+		// New a impress, insert some slides
+		app.dispatch("private:factory/simpress?slot=6686");
+		PresentationWizard.ok();
+		sleep(1);
+
+		for(int i=0; i<5;i++){
+			SD_InsertPageButtonOnToolbar.click();
+			sleep(1);
+		}
+		// Pop up navigator panel
+		impress.menuItem("View").select();
+		if(!impress.menuItem("View->Navigator").isSelected()){
+			impress.menuItem("View->Navigator").select();
+		}
+	}
+
+	@After
+	public void tearDown() throws Exception {
+		app.close();
+	}
+
+	/**
+	 * Test Copy slide with Apply Footer to same file and different file
+	 * @throws Exception
+	 */
+	@Test
+	public void testCopySlideWithApplyFooter() throws Exception{
+
+		//add header and footer
+		impress.menuItem("View->Header and Footer...").select();
+		sleep(2);
+
+		SD_DateAndTimeFooterOnSlide.check();
+		SD_FixedDateAndTimeFooterOnSlide.check();
+		SD_FixedDateAndTimeOnSlideInput.setText("Fix Date: 20120323");
+		SD_FooterTextOnSlide.check();
+		SD_FooterTextOnSlideInput.setText("Footer Test");
+		SD_SlideNumAsFooterOnSlide.check();
+		SD_ApplyToAllButtonOnSlideFooter.click();
+		sleep(1);
+
+		ImpressSlideSorter.focus();
+		for(int j=0; j<=2;j++){
+			typeKeys("<up>");
+		}
+		impress.menuItem("View->Header and Footer...").select();
+		sleep(1);
+		SD_SlideNumAsFooterOnSlide.uncheck();
+		SD_ApplyButtonOnSlideFooter.click();
+
+		//paste to the same file
+		ImpressSlideSorter.focus();
+		app.dispatch(".uno:Copy");
+		app.dispatch(".uno:Paste");
+
+		impress.menuItem("View->Header and Footer...").select();
+		sleep(1);
+		assertEquals("Fix Date: 20120323", SD_FixedDateAndTimeOnSlideInput.getText());
+		assertEquals("Footer Test", SD_FooterTextOnSlideInput.getText());
+		assertEquals(false, SD_SlideNumAsFooterOnSlide.isChecked());
+
+		//close header and footer dialog.
+		SD_ApplyButtonOnSlideFooter.focus();
+		typeKeys("<tab>");
+		typeKeys("<enter>");
+
+		//paste to different file
+		impress.focus();
+		app.dispatch("private:factory/simpress?slot=6686");
+		PresentationWizard.ok();
+		sleep(1);
+		app.dispatch(".uno:Paste");
+		ImpressSlideSorter.focus();
+		typeKeys("<down>");
+		sleep(1);
+
+		impress.menuItem("View->Header and Footer...").select();
+		sleep(1);
+		assertEquals("Fix Date: 20120323", SD_FixedDateAndTimeOnSlideInput.getText());
+		assertEquals("Footer Test", SD_FooterTextOnSlideInput.getText());
+		assertEquals(false, SD_SlideNumAsFooterOnSlide.isChecked());
+	}
+
+	/**
+	 * Test Copy slide with Apply to all Footer to same file and different file
+	 * @throws Exception
+	 */
+	@Test
+	public void testCopySlideWithApplyToAllFooter() throws Exception{
+
+		//add header and footer
+		impress.menuItem("View->Header and Footer...").select();
+		sleep(2);
+
+		SD_DateAndTimeFooterOnSlide.check();
+		SD_FixedDateAndTimeFooterOnSlide.check();
+		sleep(1);
+		SD_FixedDateAndTimeOnSlideInput.setText("Fix Date: 20120323");
+		sleep(1);
+		SD_FooterTextOnSlide.check();
+		sleep(1);
+		SD_FooterTextOnSlideInput.setText("Footer Test");
+		sleep(1);
+		SD_SlideNumAsFooterOnSlide.check();
+		sleep(1);
+		SD_ApplyToAllButtonOnSlideFooter.click();
+		sleep(1);
+
+		ImpressSlideSorter.focus();
+		for(int j=0; j<=2;j++){
+			typeKeys("<up>");
+			sleep(1);
+		}
+		impress.menuItem("View->Header and Footer...").select();
+		sleep(1);
+		SD_SlideNumAsFooterOnSlide.uncheck();
+		SD_ApplyButtonOnSlideFooter.click();
+
+		//paste to the same file
+		ImpressSlideSorter.focus();
+		typeKeys("<up>");
+		app.dispatch(".uno:Copy");
+		typeKeys("<down>");
+		sleep(1);
+		app.dispatch(".uno:Paste");
+
+		impress.menuItem("View->Header and Footer...").select();
+		sleep(1);
+		assertEquals("Fix Date: 20120323",SD_FixedDateAndTimeOnSlideInput.getText());
+		assertEquals("Footer Test",SD_FooterTextOnSlideInput.getText());
+		assertEquals(true,SD_SlideNumAsFooterOnSlide.isChecked());
+
+		//close header and footer dialog.
+		SD_ApplyButtonOnSlideFooter.focus();
+		typeKeys("<tab>");
+		typeKeys("<enter>");
+
+		//paste to different file
+		impress.focus();
+		impress.menuItem("File->New->Presentation").select();
+		sleep(1);
+		app.dispatch(".uno:Paste");
+		ImpressSlideSorter.focus();
+		typeKeys("<down>");
+		sleep(1);
+
+		impress.menuItem("View->Header and Footer...").select();
+		sleep(1);
+		assertEquals("Fix Date: 20120323",SD_FixedDateAndTimeOnSlideInput.getText());
+		assertEquals("Footer Test",SD_FooterTextOnSlideInput.getText());
+		assertEquals(true,SD_SlideNumAsFooterOnSlide.isChecked());
+	}
+
+	/**
+	 * Test Copy slide with Notes Footer to same file and different file
+	 * @throws Exception
+	 */
+	@Test
+	public void testCopySlideWithNotesHeaderFooter() throws Exception{
+
+		//add header and footer
+		impress.menuItem("View->Header and Footer...").select();
+		sleep(1);
+		SD_HeaderAndFooterOnNotesTabPage.select();
+		SD_HeaderTextOnNotes.check();
+		SD_HeaderTextOnNotesInput.setText("Header Test");
+		SD_DateAndTimeFooterOnSlide.check();
+		SD_FixedDateAndTimeFooterOnSlide.check();
+		sleep(1);
+		SD_FixedDateAndTimeOnSlideInput.setText("Fix Date: 20120329");
+		sleep(1);
+		SD_FooterTextOnSlide.check();
+		sleep(1);
+		SD_FooterTextOnSlideInput.setText("Footer Test");
+		sleep(1);
+		SD_SlideNumAsFooterOnSlide.check();
+		sleep(1);
+		SD_ApplyToAllButtonOnSlideFooter.click();
+		sleep(1);
+
+		//paste to the same file
+		ImpressSlideSorter.focus();
+		typeKeys("<up>");
+		app.dispatch(".uno:Copy");
+		typeKeys("<down>");
+		sleep(1);
+		app.dispatch(".uno:Paste");
+
+		ImpressUtil.getCurView().activate();
+
+		impress.menuItem("View->Header and Footer...").select();
+		sleep(1);
+		SD_HeaderAndFooterOnNotesTabPage.select();
+		assertEquals("Header Test",SD_HeaderTextOnNotesInput.getText());
+		assertEquals("Fix Date: 20120329",SD_FixedDateAndTimeOnSlideInput.getText());
+		assertEquals("Footer Test",SD_FooterTextOnSlideInput.getText());
+		assertEquals(true,SD_SlideNumAsFooterOnSlide.isChecked());
+
+		//close header and footer dialog.
+		SD_ApplyToAllButtonOnSlideFooter.focus();
+		typeKeys("<tab>");
+		typeKeys("<enter>");
+
+		//paste to different file
+		impress.focus();
+		impress.menuItem("File->New->Presentation").select();
+		sleep(1);
+		app.dispatch(".uno:Paste");
+		ImpressSlideSorter.focus();
+		typeKeys("<down>");
+		sleep(1);
+		ImpressUtil.getCurView().activate();
+		impress.menuItem("View->Header and Footer...").select();
+		sleep(1);
+		SD_HeaderAndFooterOnNotesTabPage.select();
+		assertEquals("Header Test",SD_HeaderTextOnNotesInput.getText());
+		assertEquals("Fix Date: 20120329",SD_FixedDateAndTimeOnSlideInput.getText());
+		assertEquals("Footer Test",SD_FooterTextOnSlideInput.getText());
+		assertEquals(true,SD_SlideNumAsFooterOnSlide.isChecked());
+	}
+
+	/**
+	 * Test duplicate slide with Apply to all Footer to same file 
+	 * @throws Exception
+	 */
+	@Test
+	public void testDuplicateSlideWithApplyToAllFooter() throws Exception{
+
+		//add header and footer
+		impress.menuItem("View->Header and Footer...").select();
+		sleep(2);
+
+		SD_DateAndTimeFooterOnSlide.check();
+		SD_FixedDateAndTimeFooterOnSlide.check();
+		sleep(1);
+		SD_FixedDateAndTimeOnSlideInput.setText("Fix Date: 20120323");
+		sleep(1);
+		SD_FooterTextOnSlide.check();
+		sleep(1);
+		SD_FooterTextOnSlideInput.setText("Footer Test");
+		sleep(1);
+		SD_SlideNumAsFooterOnSlide.check();
+		sleep(1);
+		SD_ApplyToAllButtonOnSlideFooter.click();
+		sleep(1);
+
+
+		ImpressSlideSorter.focus();
+		for(int j=0; j<=2;j++){
+			typeKeys("<up>");
+			sleep(1);
+		}
+		impress.menuItem("Insert->Duplicate Slide").select();
+		impress.menuItem("View->Header and Footer...").select();
+		sleep(1);
+		assertEquals("Fix Date: 20120323",SD_FixedDateAndTimeOnSlideInput.getText());
+		assertEquals("Footer Test",SD_FooterTextOnSlideInput.getText());
+		assertEquals(true,SD_SlideNumAsFooterOnSlide.isChecked());
+	}
+
+	/**
+	 * Test footer not show on the first slide. 
+	 * @throws Exception
+	 */
+	@Test
+	public void testFooterNotShowOn1stSlide() throws Exception{
+
+		//add header and footer
+		impress.menuItem("View->Header and Footer...").select();
+		sleep(2);
+		SD_FooterTextOnSlide.check();
+		sleep(1);
+		SD_FooterTextOnSlideInput.setText("Footer Test");
+		sleep(1);
+		SD_FooterNotShowOn1stSlide.check();
+		SD_ApplyToAllButtonOnSlideFooter.click();
+		sleep(1);
+
+		ImpressSlideSorter.focus();
+		for(int j=0; j<5; j++){
+			typeKeys("<up>");
+		}
+
+		impress.menuItem("View->Header and Footer...").select();
+		sleep(1);
+		assertEquals(true,SD_FooterNotShowOn1stSlide.isChecked());
+		assertEquals(false,SD_FooterTextOnSlide.isChecked());
+	}
+
+	/**
+	 * Test Insert Footer to focus slide.
+	 * @throws Exception
+	 */
+	@Test
+	public void testInsertApplyFooterOnSlide() throws Exception{
+
+		//add header and footer to focus slide.
+		impress.menuItem("View->Header and Footer...").select();
+		sleep(2);
+
+		SD_DateAndTimeFooterOnSlide.check();
+		SD_FixedDateAndTimeFooterOnSlide.check();
+		sleep(1);
+		SD_FixedDateAndTimeOnSlideInput.setText("Fix Date: 20120323");
+		sleep(1);
+		SD_FooterTextOnSlide.check();
+		sleep(1);
+		SD_FooterTextOnSlideInput.setText("Footer Test");
+		sleep(1);
+		SD_SlideNumAsFooterOnSlide.check();
+		sleep(1);
+		SD_ApplyButtonOnSlideFooter.click();
+		sleep(1);
+
+		impress.menuItem("View->Header and Footer...").select();
+		sleep(1);
+		assertEquals(true,SD_DateAndTimeFooterOnSlide.isChecked());
+		assertEquals(true,SD_FixedDateAndTimeFooterOnSlide.isChecked());
+		assertEquals("Fix Date: 20120323",SD_FixedDateAndTimeOnSlideInput.getText());
+		assertEquals(true,SD_FooterTextOnSlide.isChecked());
+		assertEquals("Footer Test",SD_FooterTextOnSlideInput.getText());
+		assertEquals(true,SD_SlideNumAsFooterOnSlide.isChecked());
+		//close header and footer dialog.
+		SD_ApplyButtonOnSlideFooter.focus();
+		typeKeys("<tab>");
+		typeKeys("<enter>");
+		//end close
+
+		ImpressSlideSorter.focus();
+		typeKeys("<up>");
+
+		impress.menuItem("View->Header and Footer...").select();
+		sleep(1);
+		assertEquals("",SD_FixedDateAndTimeOnSlideInput.getText());
+		assertEquals("",SD_FooterTextOnSlideInput.getText());
+		assertEquals(false,SD_SlideNumAsFooterOnSlide.isChecked());
+		//close header and footer dialog.
+		SD_ApplyButtonOnSlideFooter.focus();
+		typeKeys("<tab>");
+		typeKeys("<enter>");
+		//end close
+
+		SD_InsertPageButtonOnToolbar.click();
+		impress.menuItem("View->Header and Footer...").select();
+		sleep(1);
+		assertEquals("",SD_FixedDateAndTimeOnSlideInput.getText());
+		assertEquals("",SD_FooterTextOnSlideInput.getText());
+		assertEquals(false,SD_SlideNumAsFooterOnSlide.isChecked());
+	}
+
+	/**
+	 * Test Insert Footer to Notes View
+	 * @throws Exception
+	 */
+	@Test
+	public void testInsertApplyToAllFooterOnNotes() throws Exception{
+
+		//add header and footer to focus slide.
+		impress.menuItem("View->Header and Footer...").select();
+		sleep(1);
+		SD_HeaderAndFooterOnNotesTabPage.select();
+		SD_HeaderTextOnNotes.check();
+		SD_HeaderTextOnNotesInput.setText("Header Test");
+		SD_DateAndTimeFooterOnSlide.check();
+		SD_FixedDateAndTimeFooterOnSlide.check();
+		sleep(1);
+		SD_FixedDateAndTimeOnSlideInput.setText("Fix Date: 20120323");
+		sleep(1);
+		SD_FooterTextOnSlide.check();
+		sleep(1);
+		SD_FooterTextOnSlideInput.setText("Footer Test");
+		sleep(1);
+		SD_SlideNumAsFooterOnSlide.check();
+		sleep(1);
+		SD_ApplyToAllButtonOnSlideFooter.click();
+		sleep(1);
+
+		impress.menuItem("View->Header and Footer...").select();
+		sleep(1);
+		SD_HeaderAndFooterOnNotesTabPage.select();
+		assertEquals(true,SD_HeaderTextOnNotes.isChecked());
+		assertEquals("Header Test",SD_HeaderTextOnNotesInput.getText());
+		assertEquals(true,SD_DateAndTimeFooterOnSlide.isChecked());
+		assertEquals(true,SD_FixedDateAndTimeFooterOnSlide.isChecked());
+		assertEquals("Fix Date: 20120323",SD_FixedDateAndTimeOnSlideInput.getText());
+		assertEquals(true,SD_FooterTextOnSlide.isChecked());
+		assertEquals("Footer Test",SD_FooterTextOnSlideInput.getText());
+		assertEquals(true,SD_SlideNumAsFooterOnSlide.isChecked());
+		//close header and footer dialog.
+		SD_ApplyToAllButtonOnSlideFooter.focus();
+		typeKeys("<tab>");
+		typeKeys("<enter>");
+		//end close
+
+		ImpressSlideSorter.focus();
+		typeKeys("<up>");
+
+		impress.menuItem("View->Header and Footer...").select();
+		sleep(1);
+		SD_HeaderAndFooterOnNotesTabPage.select();
+		assertEquals(true,SD_HeaderTextOnNotes.isChecked());
+		assertEquals("Header Test",SD_HeaderTextOnNotesInput.getText());
+		assertEquals(true,SD_DateAndTimeFooterOnSlide.isChecked());
+		assertEquals(true,SD_FixedDateAndTimeFooterOnSlide.isChecked());
+		assertEquals("Fix Date: 20120323",SD_FixedDateAndTimeOnSlideInput.getText());
+		assertEquals(true,SD_FooterTextOnSlide.isChecked());
+		assertEquals("Footer Test",SD_FooterTextOnSlideInput.getText());
+		assertEquals(true,SD_SlideNumAsFooterOnSlide.isChecked());
+		//close header and footer dialog.
+		SD_ApplyToAllButtonOnSlideFooter.focus();
+		typeKeys("<tab>");
+		typeKeys("<enter>");
+		//end close
+
+		SD_InsertPageButtonOnToolbar.click();
+		impress.menuItem("View->Header and Footer...").select();
+		sleep(1);
+		SD_HeaderAndFooterOnNotesTabPage.select();
+		assertEquals(true,SD_HeaderTextOnNotes.isChecked());
+		assertEquals("Header Test",SD_HeaderTextOnNotesInput.getText());
+		assertEquals(true,SD_DateAndTimeFooterOnSlide.isChecked());
+		assertEquals(true,SD_FixedDateAndTimeFooterOnSlide.isChecked());
+		assertEquals("Fix Date: 20120323",SD_FixedDateAndTimeOnSlideInput.getText());
+		assertEquals(true,SD_FooterTextOnSlide.isChecked());
+		assertEquals("Footer Test",SD_FooterTextOnSlideInput.getText());
+		assertEquals(true,SD_SlideNumAsFooterOnSlide.isChecked());
+	}
+
+	/**
+	 * Test Insert Footer to Slide, use Apply to All
+	 * @throws Exception
+	 */
+	@Test
+	public void testInsertApplyToAllFooterOnSlide() throws Exception{
+
+		//add header and footer to focus slide.
+		impress.menuItem("View->Header and Footer...").select();
+		sleep(2);
+
+		SD_DateAndTimeFooterOnSlide.check();
+		SD_FixedDateAndTimeFooterOnSlide.check();
+		sleep(1);
+		SD_FixedDateAndTimeOnSlideInput.setText("Fix Date: 20120323");
+		sleep(1);
+		SD_FooterTextOnSlide.check();
+		sleep(1);
+		SD_FooterTextOnSlideInput.setText("Footer Test");
+		sleep(1);
+		SD_SlideNumAsFooterOnSlide.check();
+		sleep(1);
+		SD_ApplyToAllButtonOnSlideFooter.click();
+		sleep(1);
+
+		impress.menuItem("View->Header and Footer...").select();
+		sleep(1);
+		assertEquals(true,SD_DateAndTimeFooterOnSlide.isChecked());
+		assertEquals(true,SD_FixedDateAndTimeFooterOnSlide.isChecked());
+		assertEquals("Fix Date: 20120323",SD_FixedDateAndTimeOnSlideInput.getText());
+		assertEquals(true,SD_FooterTextOnSlide.isChecked());
+		assertEquals("Footer Test",SD_FooterTextOnSlideInput.getText());
+		assertEquals(true,SD_SlideNumAsFooterOnSlide.isChecked());
+		//close header and footer dialog.
+		SD_ApplyButtonOnSlideFooter.focus();
+		typeKeys("<tab>");
+		typeKeys("<enter>");
+		//end close
+
+		ImpressSlideSorter.focus();
+		typeKeys("<up>");
+
+		impress.menuItem("View->Header and Footer...").select();
+		sleep(1);
+		assertEquals(true,SD_DateAndTimeFooterOnSlide.isChecked());
+		assertEquals(true,SD_FixedDateAndTimeFooterOnSlide.isChecked());
+		assertEquals("Fix Date: 20120323",SD_FixedDateAndTimeOnSlideInput.getText());
+		assertEquals(true,SD_FooterTextOnSlide.isChecked());
+		assertEquals("Footer Test",SD_FooterTextOnSlideInput.getText());
+		assertEquals(true,SD_SlideNumAsFooterOnSlide.isChecked());
+		//close header and footer dialog.
+		SD_ApplyButtonOnSlideFooter.focus();
+		typeKeys("<tab>");
+		typeKeys("<enter>");
+		//end close
+
+		SD_InsertPageButtonOnToolbar.click();
+		impress.menuItem("View->Header and Footer...").select();
+		sleep(1);
+		assertEquals(true,SD_DateAndTimeFooterOnSlide.isChecked());
+		assertEquals(true,SD_FixedDateAndTimeFooterOnSlide.isChecked());
+		assertEquals("Fix Date: 20120323",SD_FixedDateAndTimeOnSlideInput.getText());
+		assertEquals(true,SD_FooterTextOnSlide.isChecked());
+		assertEquals("Footer Test",SD_FooterTextOnSlideInput.getText());
+		assertEquals(true,SD_SlideNumAsFooterOnSlide.isChecked());
+	}
+
+	/**
+	 * Test Insert update automatically time footer to slides.
+	 * @throws Exception
+	 */
+	@Test
+	public void testInsertAutoUpdateTimeFooter() throws Exception{
+
+		//add header and footer
+		impress.menuItem("View->Header and Footer...").select();
+		sleep(1);
+		SD_AutoUpdateTimeFooter.check();
+		SD_AutoUpdateTimeFooterType.select(7);
+		String currentTime=SD_AutoUpdateTimeFooterType.getItemText(7);
+		SD_ApplyToAllButtonOnSlideFooter.click();
+		sleep(2);
+
+		impress.menuItem("View->Header and Footer...").select();
+		sleep(1);
+
+		String currentTime2=SD_AutoUpdateTimeFooterType.getItemText(7);
+		assertFalse(currentTime.equals(currentTime2));
+	}
+
+	/**
+	 * Test Insert update automatically time footer to Notes view.
+	 * @throws Exception
+	 */
+	@Test
+	public void testInsertAutoUpdateTimeFooterOnNotes() throws Exception{
+
+		//add header and footer
+		impress.menuItem("View->Header and Footer...").select();
+		sleep(1);
+		SD_HeaderAndFooterOnNotesTabPage.select();
+		SD_AutoUpdateTimeFooter.check();
+		SD_AutoUpdateTimeFooterType.select(7);
+		String currentTime=SD_AutoUpdateTimeFooterType.getItemText(7);
+		SD_ApplyToAllButtonOnSlideFooter.click();
+		sleep(2);
+
+		impress.menuItem("View->Header and Footer...").select();
+		sleep(1);
+		SD_HeaderAndFooterOnNotesTabPage.select();
+		String currentTime2=SD_AutoUpdateTimeFooterType.getItemText(7);
+
+		assertFalse(currentTime.equals(currentTime2));
+	}
+
+	/**
+	 * Test Insert Header and Footer to Notes view.
+	 * Save and ReOpen
+	 * @throws Exception
+	 */
+	@Test
+	public void testInsertHeaderFooterOnNotes() throws Exception{
+
+		//add header and footer
+		impress.menuItem("View->Header and Footer...").select();
+		sleep(1);
+		SD_HeaderAndFooterOnNotesTabPage.select();
+		SD_HeaderTextOnNotes.check();
+		SD_HeaderTextOnNotesInput.setText("Header Test");
+		SD_DateAndTimeFooterOnSlide.check();
+		SD_FixedDateAndTimeFooterOnSlide.check();
+		sleep(1);
+		SD_FixedDateAndTimeOnSlideInput.setText("Fix Date: 20120329");
+		sleep(1);
+		SD_FooterTextOnSlide.check();
+		sleep(1);
+		SD_FooterTextOnSlideInput.setText("Footer Test");
+		sleep(1);
+		SD_SlideNumAsFooterOnSlide.check();
+		sleep(1);
+		SD_ApplyToAllButtonOnSlideFooter.click();
+		sleep(1);
+
+		ImpressSlideSorter.focus();
+		typeKeys("<up>");
+
+		impress.menuItem("View->Header and Footer...").select();
+		sleep(1);
+		SD_HeaderAndFooterOnNotesTabPage.select();
+		assertEquals("Header Test",SD_HeaderTextOnNotesInput.getText());
+		assertEquals("Fix Date: 20120329",SD_FixedDateAndTimeOnSlideInput.getText());
+		assertEquals("Footer Test",SD_FooterTextOnSlideInput.getText());
+		assertEquals(true,SD_SlideNumAsFooterOnSlide.isChecked());
+
+		//close header and footer dialog.
+		SD_ApplyToAllButtonOnSlideFooter.focus();
+		typeKeys("<tab>");
+		typeKeys("<enter>");
+
+		//save this file
+		impress.menuItem("File->Save").select();
+		String saveTo = fullPath("temp/" + "hello.odp");
+		FileUtil.deleteFile(saveTo);
+		submitSaveDlg(saveTo);	
+		impress.menuItem("File->Close").select();
+		sleep(2);
+
+		//Reopen this file
+		openStartcenter();
+		app.dispatch(".uno:Open");
+		String openFrom=fullPath("temp/" + "hello.odp");
+		submitOpenDlg(openFrom);
+
+		//check after reopen		
+		impress.menuItem("View->Header and Footer...").select();
+		sleep(1);
+		SD_HeaderAndFooterOnNotesTabPage.select();
+		assertEquals("Header Test",SD_HeaderTextOnNotesInput.getText());
+		assertEquals("Fix Date: 20120329",SD_FixedDateAndTimeOnSlideInput.getText());
+		assertEquals("Footer Test",SD_FooterTextOnSlideInput.getText());
+		assertEquals(true,SD_SlideNumAsFooterOnSlide.isChecked());
+	}
+
+	/**
+	 * Test Insert Header and Footer to Slide
+	 * Save and Reopen
+	 * @throws Exception
+	 */
+	@Test
+	public void testInsertHeaderFooterOnSlide() throws Exception{
+
+		//add header and footer
+		impress.menuItem("View->Header and Footer...").select();
+		sleep(1);
+		SD_DateAndTimeFooterOnSlide.check();
+		SD_FixedDateAndTimeFooterOnSlide.check();
+		sleep(1);
+		SD_FixedDateAndTimeOnSlideInput.setText("Fix Date: 20120329");
+		sleep(1);
+		SD_FooterTextOnSlide.check();
+		sleep(1);
+		SD_FooterTextOnSlideInput.setText("Footer Test");
+		sleep(1);
+		SD_SlideNumAsFooterOnSlide.check();
+		sleep(1);
+		SD_ApplyToAllButtonOnSlideFooter.click();
+		sleep(1);
+
+		ImpressSlideSorter.focus();
+		typeKeys("<up>");
+
+		impress.menuItem("View->Header and Footer...").select();
+		sleep(1);
+		assertEquals("Fix Date: 20120329",SD_FixedDateAndTimeOnSlideInput.getText());
+		assertEquals("Footer Test",SD_FooterTextOnSlideInput.getText());
+		assertEquals(true,SD_SlideNumAsFooterOnSlide.isChecked());
+
+		//close header and footer dialog.
+		SD_ApplyButtonOnSlideFooter.focus();
+		typeKeys("<tab>");
+		typeKeys("<enter>");
+
+		//save this file
+		impress.menuItem("File->Save").select();
+		String saveTo = fullPath("temp/" + "hello.odp");
+		FileUtil.deleteFile(saveTo);
+		submitSaveDlg(saveTo);	
+		impress.menuItem("File->Close").select();
+		sleep(2);
+
+		//Reopen this file
+		openStartcenter();
+		app.dispatch(".uno:Open");
+		String openFrom=fullPath("temp/" + "hello.odp");
+		submitOpenDlg(openFrom);
+
+		//check after reopen		
+		impress.menuItem("View->Header and Footer...").select();
+		sleep(1);
+		assertEquals("Fix Date: 20120329",SD_FixedDateAndTimeOnSlideInput.getText());
+		assertEquals("Footer Test",SD_FooterTextOnSlideInput.getText());
+		assertEquals(true,SD_SlideNumAsFooterOnSlide.isChecked());
+	}
+}

Added: incubator/ooo/trunk/main/test/testoo/src/testcase/presentation/headerandfooter/OpenDocumentWithHeaderFooter.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/test/testoo/src/testcase/presentation/headerandfooter/OpenDocumentWithHeaderFooter.java?rev=1362744&view=auto
==============================================================================
--- incubator/ooo/trunk/main/test/testoo/src/testcase/presentation/headerandfooter/OpenDocumentWithHeaderFooter.java (added)
+++ incubator/ooo/trunk/main/test/testoo/src/testcase/presentation/headerandfooter/OpenDocumentWithHeaderFooter.java Wed Jul 18 02:28:42 2012
@@ -0,0 +1,171 @@
+/**************************************************************
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+
+
+/**
+ * 
+ */
+package testcase.presentation.headerandfooter;
+
+import static testlib.AppUtil.fullPath;
+import static testlib.AppUtil.openStartcenter;
+import static testlib.AppUtil.submitSaveDlg;
+import static testlib.AppUtil.submitOpenDlg;
+import static testlib.AppUtil.testFile;
+import static testlib.UIMap.*;
+import static org.junit.Assert.*;
+import static org.openoffice.test.vcl.Tester.*;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.openoffice.test.common.FileUtil;
+import testlib.Log;
+
+public class OpenDocumentWithHeaderFooter {
+
+	@Rule
+	public Log LOG = new Log();
+
+	@Before
+	public void setUp() throws Exception {
+		app.start();
+	}
+
+	@After
+	public void tearDown() throws Exception {
+		app.close();
+	}
+
+	/**
+	 * Test open AOO3.4 presentation with header and footer.
+	 * edit and save to ODP
+	 * @throws Exception
+	 */
+	@Test
+	public void testOpenAOO34WithHeaderFooter() throws Exception{
+		//open sample file
+		String file = testFile("sd/AOO3.4HeaderFooter.odp");
+		app.dispatch(".uno:Open");
+		submitOpenDlg(file);
+
+		//check after reopen		
+		impress.menuItem("View->Header and Footer...").select();
+		sleep(1);
+		assertEquals(true,SD_DateAndTimeFooterOnSlide.isChecked());
+		assertEquals("fixed date",SD_FixedDateAndTimeOnSlideInput.getText());
+		assertEquals(true,SD_FooterTextOnSlide.isChecked());
+		assertEquals("footer test",SD_FooterTextOnSlideInput.getText());
+		assertEquals(true,SD_SlideNumAsFooterOnSlide.isChecked());
+
+		SD_SlideNumAsFooterOnSlide.uncheck();
+		SD_ApplyToAllButtonOnSlideFooter.click();
+
+		//save to odp and reopen
+		impress.menuItem("File->Save As...").select();
+		String saveTo2 = fullPath("temp/" + "AOO3.4HeaderFooter.odp");
+		FileUtil.deleteFile(saveTo2);
+		submitSaveDlg(saveTo2);	
+		impress.menuItem("File->Close").select();
+		sleep(1);
+
+		openStartcenter();
+		app.dispatch(".uno:Open");
+		String openFrom2=fullPath("temp/" + "AOO3.4HeaderFooter.odp");
+		submitOpenDlg(openFrom2);
+
+		impress.menuItem("View->Header and Footer...").select();
+		sleep(1);
+		assertEquals(false,SD_SlideNumAsFooterOnSlide.isChecked());
+		//end-save to odp and reopen
+	}
+
+	/**
+	 * Test open ppt file with header and footer.
+	 * edit and save to PPT/ODP
+	 * @throws Exception
+	 */
+	@Test
+	public void testOpenPPTWithHeaderFooter() throws Exception{
+		//open sample file
+		String file = testFile("sd/gfdd.ppt");
+		app.dispatch(".uno:Open");
+		submitOpenDlg(file);
+
+		//check after reopen		
+		impress.menuItem("View->Header and Footer...").select();
+		sleep(1);
+		assertEquals(true,SD_DateAndTimeFooterOnSlide.isChecked());
+		assertEquals("testdte",SD_FixedDateAndTimeOnSlideInput.getText());
+		assertEquals(true,SD_FooterTextOnSlide.isChecked());
+		assertEquals("yesy",SD_FooterTextOnSlideInput.getText());
+		assertEquals(true,SD_SlideNumAsFooterOnSlide.isChecked());
+
+		SD_SlideNumAsFooterOnSlide.uncheck();
+		SD_ApplyToAllButtonOnSlideFooter.click();
+
+		//save to ppt and reopen
+		impress.menuItem("File->Save As...").select();
+		String saveTo = fullPath("temp/" + "gfdd.ppt");
+		FileUtil.deleteFile(saveTo);
+		submitSaveDlg(saveTo);	
+		if (AlienFormatDlg.exists(3))
+			AlienFormatDlg.ok();
+		sleep(1);
+		impress.menuItem("File->Close").select();
+		sleep(1);
+
+		openStartcenter();
+		app.dispatch(".uno:Open");
+		String openFrom=fullPath("temp/" + "gfdd.ppt");
+		submitOpenDlg(openFrom);
+
+		impress.menuItem("View->Header and Footer...").select();
+		sleep(1);
+		assertEquals(false,SD_SlideNumAsFooterOnSlide.isChecked());
+		//end-save to ppt and reopen
+
+		//close Header and Footer dialog.
+		SD_ApplyButtonOnSlideFooter.focus();
+		typeKeys("<tab>");
+		typeKeys("<enter>");
+		//end
+
+		//save to odp and reopen
+		impress.menuItem("File->Save As...").select();
+		String saveTo2 = fullPath("temp/" + "gfdd.odp");
+		FileUtil.deleteFile(saveTo2);
+		submitSaveDlg(saveTo2);	
+		impress.menuItem("File->Close").select();
+		sleep(1);
+
+		openStartcenter();
+		app.dispatch(".uno:Open");
+		String openFrom2=fullPath("temp/" + "gfdd.odp");
+		submitOpenDlg(openFrom2);
+
+		impress.menuItem("View->Header and Footer...").select();
+		sleep(1);
+		assertEquals(false,SD_SlideNumAsFooterOnSlide.isChecked());
+		//end-save to odp and reopen
+	}
+}

Added: incubator/ooo/trunk/main/test/testoo/src/testcase/textdocument/table/Table.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/test/testoo/src/testcase/textdocument/table/Table.java?rev=1362744&view=auto
==============================================================================
--- incubator/ooo/trunk/main/test/testoo/src/testcase/textdocument/table/Table.java (added)
+++ incubator/ooo/trunk/main/test/testoo/src/testcase/textdocument/table/Table.java Wed Jul 18 02:28:42 2012
@@ -0,0 +1,90 @@
+/**************************************************************
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * 
+ *************************************************************/
+
+
+
+/**
+ * 
+ */
+package testcase.textdocument.table;
+
+import static testlib.AppUtil.*;
+import static testlib.UIMap.*;
+import static org.junit.Assert.*;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.openoffice.test.common.SystemUtil;
+
+import testlib.Log;
+
+/**
+ *
+ */
+public class Table {
+
+	@Rule
+	public Log LOG = new Log();
+
+	@Before
+	public void setUp() throws Exception {
+		app.start();
+	}
+
+	@After
+	public void tearDown() throws Exception {
+		app.close();
+	}
+
+	/**
+	 * Test convert table to text in text document
+	 * @throws Exception
+	 */
+	@Test
+	public void testConvertTableToText() throws Exception{
+
+		//Create a new text document
+		startcenter.menuItem("File->New->Text Document").select();
+		sleep(3);
+
+		// Insert a table and input some data
+		writer.menuItem("Insert->Table...").select();
+		writer_InsertTable.ok();
+		writer.focus();
+		typeKeys("1<right>2<right>3<right>4");
+		sleep(1);
+
+		// Convert table to text
+		writer.menuItem("Table->Convert->Table to Text...").select();
+		assertTrue("Convert Table to Text dialog pop up", writer_ConvertTableToTextDlg.exists());
+		typeKeys("<enter>");
+		sleep(1);
+
+		// Verify if text is converted successfully
+		writer.menuItem("Edit->Select All").select();
+		app.dispatch(".uno:Copy");
+		if (SystemUtil.isWindows())
+			assertEquals("Converted text", "1\t2\r\n3\t4\r\n", app.getClipboard());	// windows�лس�������\r\n
+		else
+			assertEquals("Converted text", "1\t2\n3\t4\n", app.getClipboard());
+	}
+}

Modified: incubator/ooo/trunk/main/test/testoo/src/testlib/AppUtil.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/test/testoo/src/testlib/AppUtil.java?rev=1362744&r1=1362743&r2=1362744&view=diff
==============================================================================
--- incubator/ooo/trunk/main/test/testoo/src/testlib/AppUtil.java (original)
+++ incubator/ooo/trunk/main/test/testoo/src/testlib/AppUtil.java Wed Jul 18 02:28:42 2012
@@ -57,6 +57,9 @@ public class AppUtil extends Tester {
 		} 
 	}
 	
+	public static void typeKeys(String keys) {
+		Tester.typeKeys(keys);
+	}
 
 	public static void openStartcenter() {
 		if (startcenter.exists())

Modified: incubator/ooo/trunk/main/test/testoo/src/testlib/UIMap.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/test/testoo/src/testlib/UIMap.java?rev=1362744&r1=1362743&r2=1362744&view=diff
==============================================================================
--- incubator/ooo/trunk/main/test/testoo/src/testlib/UIMap.java (original)
+++ incubator/ooo/trunk/main/test/testoo/src/testlib/UIMap.java Wed Jul 18 02:28:42 2012
@@ -235,17 +235,17 @@ public class UIMap {
 	public static final VclControl DataPilotFieldSelect = control("59030");
 	public static final VclButton DataPilotAutomaticallyUpdateCheckBox = button("3643262003");
 	public static final VclButton DataPilotTableUpdateButton = button("3643265586");
-	public static final VclButton SD_DateAndTimeFooterOnSlide = button("553255938");
-	public static final VclButton SD_FixedDateAndTimeFooterOnSlide = button("553255427");
-	public static final VclEditBox SD_FixedDateAndTimeOnSlideInput = editbox("553256964");
-	public static final VclButton SD_FooterTextOnSlide = button("553255946");
-	public static final VclEditBox SD_FooterTextOnSlideInput = editbox("553256972");
-	public static final VclButton SD_SlideNumAsFooterOnSlide = button("553255950");
-	public static final VclButton SD_ApplyToAllButtonOnSlideFooter = button("553259537");
-	public static final VclWindow SD_SlidesPanel = window("59787");
-	public static final VclControl SD_SlidelistInNaviagtor = control("59793");
-	public static final VclControl SD_HeaderAndFooterDialog = control("59901");
-	public static final VclButton SD_ApplyButtonOnSlideFooter = button("553259538");
+	public static final VclButton SD_DateAndTimeFooterOnSlide = button("sd:CheckBox:RID_SD_TABPAGE_HEADERFOOTER:CB_DATETIME");
+	public static final VclButton SD_FixedDateAndTimeFooterOnSlide = button("sd:RadioButton:RID_SD_TABPAGE_HEADERFOOTER:RB_DATETIME_FIXED");
+	public static final VclEditBox SD_FixedDateAndTimeOnSlideInput = editbox("sd:Edit:RID_SD_TABPAGE_HEADERFOOTER:TB_DATETIME_FIXED");
+	public static final VclButton SD_FooterTextOnSlide = button("sd:CheckBox:RID_SD_TABPAGE_HEADERFOOTER:CB_FOOTER");
+	public static final VclEditBox SD_FooterTextOnSlideInput = editbox("sd:Edit:RID_SD_TABPAGE_HEADERFOOTER:TB_FOOTER_FIXED");
+	public static final VclButton SD_SlideNumAsFooterOnSlide = button("sd:CheckBox:RID_SD_TABPAGE_HEADERFOOTER:CB_SLIDENUMBER");
+	public static final VclButton SD_ApplyToAllButtonOnSlideFooter = button("sd:PushButton:RID_SD_TABPAGE_HEADERFOOTER:BT_APPLYTOALL");
+//	public static final VclWindow SD_SlidesPanel = window("HID_SD_WIN_DOCUMENT");
+	public static final VclControl SD_SlidelistInNaviagtor = control("HID_SD_NAVIGATOR_TLB");
+	public static final VclControl SD_HeaderAndFooterDialog = control("HID_SD_TABPAGE_HEADERFOOTER_SLIDE");
+	public static final VclButton SD_ApplyButtonOnSlideFooter = button("sd:PushButton:RID_SD_TABPAGE_HEADERFOOTER:BT_APPLY");
 	public static final VclButton SD_InsertPageButtonOnToolbar = button(".uno:InsertPage");
 	public static final VclControl DataPilotPaneRowArea = control("59036");
 	public static final VclEditBox DataPilotFieldDisplayNameEditBox = editbox("971868166");
@@ -257,10 +257,10 @@ public class UIMap {
 	public static final VclButton DataPilotFieldOptionSortDescendingRadioButton = button("958972620");
 	public static final VclControl DataPiloPaneDataArea = control("59038");
 	public static final VclControl DataPilotColumnArea = control("59034");
-	public static final VclButton SD_HeaderTextOnNotes = button("553255958");
-	public static final VclEditBox SD_HeaderTextOnNotesInput = editbox("553256984");
-	public static final VclTabPage SD_HeaderAndFooterOnNotesTabPage = tabpage("59902");
-	public static final VclButton SD_FooterNotShowOn1stSlide = button("553255952");
+	public static final VclButton SD_HeaderTextOnNotes = button("sd:CheckBox:RID_SD_TABPAGE_HEADERFOOTER:CB_HEADER");
+	public static final VclEditBox SD_HeaderTextOnNotesInput = editbox("sd:Edit:RID_SD_TABPAGE_HEADERFOOTER:TB_HEADER_FIXED");
+	public static final VclTabPage SD_HeaderAndFooterOnNotesTabPage = tabpage("SD_HID_SD_TABPAGE_HEADERFOOTER_NOTESHANDOUT");
+	public static final VclButton SD_FooterNotShowOn1stSlide = button("sd:CheckBox:RID_SD_TABPAGE_HEADERFOOTER:CB_NOTONTITLE");
 	public static final VclTabPage SortOptionsPage = tabpage("SC_HID_SCPAGE_SORT_OPTIONS");
 	public static final VclButton SortOptionsPage_CaseSensitive = button("sc:CheckBox:RID_SCPAGE_SORT_OPTIONS:BTN_CASESENSITIVE");
 	public static final VclButton SortOptionsPage_CopyResultTo = button("sc:CheckBox:RID_SCPAGE_SORT_OPTIONS:BTN_COPYRESULT");
@@ -272,12 +272,11 @@ public class UIMap {
 	public static final VclButton DataPilotFieldOptionSubTotalsNeverRadioButton = button("958956135");
 	public static final VclButton DataPilotFieldOptionSortAscendingRadioButton = button("958972619");
 	public static final VclControl DataPilotPanePageArea = control("59032");
-	public static final VclDialog SaveInODFOrNot = dialog("33388");
 	public static final VclButton OnlyDisplayTopNItemCheckBox = button("1495745540");
 	public static final VclField NumberOfItemShowInTopNEditBox = field("1495750661");
 	public static final VclDialog FieldTopNSettingDialog = dialog("59039");
-	public static final VclButton SD_AutoUpdateTimeFooter = button("553255429");
-	public static final VclListBox SD_AutoUpdateTimeFooterType = listbox("553258502");
+	public static final VclButton SD_AutoUpdateTimeFooter = button("sd:RadioButton:RID_SD_TABPAGE_HEADERFOOTER:RB_DATETIME_AUTOMATIC");
+	public static final VclListBox SD_AutoUpdateTimeFooterType = listbox("sd:ListBox:RID_SD_TABPAGE_HEADERFOOTER:CB_DATETIME_FORMAT");
 	public static final VclButton DataPilotButton = button("59270");
 	public static final VclDockingWin DataPilotPanel = dockingwin("3643260928");
 	public static final VclListBox SCSubTotalsGroupByListBox = listbox("SC_HID_SC_SUBT_GROUP");



Mime
View raw message