openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wan...@apache.org
Subject svn commit: r1409084 - in /incubator/ooo/trunk/test/testgui/source: fvt/gui/sd/headerandfooter/ fvt/gui/sd/shape/ fvt/gui/sd/table/ testlib/gui/
Date Wed, 14 Nov 2012 05:46:01 GMT
Author: wanglf
Date: Wed Nov 14 05:45:59 2012
New Revision: 1409084

URL: http://svn.apache.org/viewvc?rev=1409084&view=rev
Log:
reconstruct GUI FVT case about Presentation

Added:
    incubator/ooo/trunk/test/testgui/source/fvt/gui/sd/headerandfooter/DocumentWithHeaderFooter.java
      - copied, changed from r1408174, incubator/ooo/trunk/test/testgui/source/fvt/gui/sd/headerandfooter/OpenDocumentWithHeaderFooter.java
    incubator/ooo/trunk/test/testgui/source/fvt/gui/sd/table/TableBackgroundProperty.java
      - copied, changed from r1408174, incubator/ooo/trunk/test/testgui/source/fvt/gui/sd/table/ChangeTableBackgroundProperty.java
    incubator/ooo/trunk/test/testgui/source/fvt/gui/sd/table/TableBorderProperty.java
      - copied, changed from r1408174, incubator/ooo/trunk/test/testgui/source/fvt/gui/sd/table/ChangeTableBorderProperty.java
    incubator/ooo/trunk/test/testgui/source/fvt/gui/sd/table/TableFontEffectsProperty.java
      - copied, changed from r1408174, incubator/ooo/trunk/test/testgui/source/fvt/gui/sd/table/ChangeTableFontEffectsProperty.java
Removed:
    incubator/ooo/trunk/test/testgui/source/fvt/gui/sd/headerandfooter/OpenDocumentWithHeaderFooter.java
    incubator/ooo/trunk/test/testgui/source/fvt/gui/sd/table/ChangeTableBackgroundProperty.java
    incubator/ooo/trunk/test/testgui/source/fvt/gui/sd/table/ChangeTableBorderProperty.java
    incubator/ooo/trunk/test/testgui/source/fvt/gui/sd/table/ChangeTableFontEffectsProperty.java
Modified:
    incubator/ooo/trunk/test/testgui/source/fvt/gui/sd/headerandfooter/HeaderAndFooterSetting.java
    incubator/ooo/trunk/test/testgui/source/fvt/gui/sd/shape/ShapeTypes.java
    incubator/ooo/trunk/test/testgui/source/testlib/gui/AppTool.java

Copied: incubator/ooo/trunk/test/testgui/source/fvt/gui/sd/headerandfooter/DocumentWithHeaderFooter.java
(from r1408174, incubator/ooo/trunk/test/testgui/source/fvt/gui/sd/headerandfooter/OpenDocumentWithHeaderFooter.java)
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testgui/source/fvt/gui/sd/headerandfooter/DocumentWithHeaderFooter.java?p2=incubator/ooo/trunk/test/testgui/source/fvt/gui/sd/headerandfooter/DocumentWithHeaderFooter.java&p1=incubator/ooo/trunk/test/testgui/source/fvt/gui/sd/headerandfooter/OpenDocumentWithHeaderFooter.java&r1=1408174&r2=1409084&rev=1409084&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testgui/source/fvt/gui/sd/headerandfooter/OpenDocumentWithHeaderFooter.java
(original)
+++ incubator/ooo/trunk/test/testgui/source/fvt/gui/sd/headerandfooter/DocumentWithHeaderFooter.java
Wed Nov 14 05:45:59 2012
@@ -32,19 +32,14 @@ import static testlib.gui.UIMap.*;
 
 import org.junit.After;
 import org.junit.Before;
-import org.junit.Rule;
 import org.junit.Test;
 import org.openoffice.test.common.FileUtil;
-import org.openoffice.test.common.Logger;
 
-public class OpenDocumentWithHeaderFooter {
-
-	@Rule
-	public Logger log = Logger.getLogger(this);
+public class DocumentWithHeaderFooter {
 
 	@Before
 	public void setUp() throws Exception {
-		app.start(true); // Bug 120476
+		app.start(true); 
 	}
 
 	@After
@@ -63,8 +58,7 @@ public class OpenDocumentWithHeaderFoote
 	public void testOpenAOO34WithHeaderFooter() throws Exception {
 		// open sample file
 		String file = prepareData("sd/AOO3.4HeaderFooter.odp");
-		app.dispatch(".uno:Open");
-		submitOpenDlg(file);
+		open(file);
 		impress.waitForExistence(10, 2);
 
 		// check after reopen
@@ -79,24 +73,15 @@ public class OpenDocumentWithHeaderFoote
 		sdApplyToAllButtonOnSlideFooter.click();
 
 		// save to odp and reopen
-		app.dispatch(".uno:SaveAs");
 		String saveTo2 = getPath("temp/" + "AOO3.4HeaderFooter.odp");
 		FileUtil.deleteFile(saveTo2);
-		submitSaveDlg(saveTo2);
-		if (activeMsgBox.exists()) {
-			activeMsgBox.yes();
-			sleep(2);
-		}
-		app.dispatch(".uno:CloseDoc");
-
-		openStartcenter();
-		app.dispatch(".uno:Open");
-		String openFrom2 = getPath("temp/" + "AOO3.4HeaderFooter.odp");
-		submitOpenDlg(openFrom2);
-		sleep(3);
+		saveAs(saveTo2);
+		close();
+		open(saveTo2);
+		impress.waitForExistence(10, 2);
+
 		app.dispatch(".uno:HeaderAndFooter");
 		assertEquals(false, sdSlideNumAsFooterOnSlide.isChecked());
-		// end-save to odp and reopen
 	}
 
 	/**
@@ -108,8 +93,7 @@ public class OpenDocumentWithHeaderFoote
 	public void testOpenPPTWithHeaderFooter() throws Exception {
 		// open sample file
 		String file = prepareData("sd/gfdd.ppt");
-		app.dispatch(".uno:Open");
-		submitOpenDlg(file);
+		open(file);
 		impress.waitForExistence(10, 2);
 
 		// check after reopen
@@ -124,52 +108,30 @@ public class OpenDocumentWithHeaderFoote
 		sdApplyToAllButtonOnSlideFooter.click();
 
 		// save to ppt and reopen
-		app.dispatch(".uno:SaveAs");
 		String saveTo = getPath("temp/" + "gfdd.ppt");
 		FileUtil.deleteFile(saveTo);
-		submitSaveDlg(saveTo);
-		sleep(5);
-		if (activeMsgBox.exists()) {
-			activeMsgBox.yes();
-			sleep(2);
-		}
-		if (alienFormatDlg.exists())
-			alienFormatDlg.ok();
-		app.dispatch(".uno:CloseDoc");
-
-		openStartcenter();
-		app.dispatch(".uno:Open");
-		String openFrom = getPath("temp/" + "gfdd.ppt");
-		submitOpenDlg(openFrom);
-		sleep(5);
+		saveAs(saveTo);
+		close();
+		open(saveTo);
+		impress.waitForExistence(10, 2);
+
 		app.dispatch(".uno:HeaderAndFooter");
 		assertEquals(false, sdSlideNumAsFooterOnSlide.isChecked());
-		// end-save to ppt and reopen
 
 		// close Header and Footer dialog.
 		sdApplyButtonOnSlideFooter.focus();
 		typeKeys("<tab>");
 		typeKeys("<enter>");
-		// end
 
 		// save to odp and reopen
-		app.dispatch(".uno:SaveAs");
 		String saveTo2 = getPath("temp/" + "gfdd.odp");
-		FileUtil.deleteFile(saveTo2);
-		submitSaveDlg(saveTo2);
-		if (activeMsgBox.exists()) {
-			activeMsgBox.yes();
-			sleep(2);
-		}
-		app.dispatch(".uno:CloseDoc");
-
-		openStartcenter();
-		app.dispatch(".uno:Open");
-		String openFrom2 = getPath("temp/" + "gfdd.odp");
-		submitOpenDlg(openFrom2);
-		sleep(3);
+		FileUtil.deleteFile(saveTo);
+		saveAs(saveTo2);
+		close();
+		open(saveTo2);
+		impress.waitForExistence(10, 2);
+
 		app.dispatch(".uno:HeaderAndFooter");
 		assertEquals(false, sdSlideNumAsFooterOnSlide.isChecked());
-		// end-save to odp and reopen
 	}
 }

Modified: incubator/ooo/trunk/test/testgui/source/fvt/gui/sd/headerandfooter/HeaderAndFooterSetting.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testgui/source/fvt/gui/sd/headerandfooter/HeaderAndFooterSetting.java?rev=1409084&r1=1409083&r2=1409084&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testgui/source/fvt/gui/sd/headerandfooter/HeaderAndFooterSetting.java
(original)
+++ incubator/ooo/trunk/test/testgui/source/fvt/gui/sd/headerandfooter/HeaderAndFooterSetting.java
Wed Nov 14 05:45:59 2012
@@ -32,27 +32,18 @@ import static testlib.gui.UIMap.*;
 
 import org.junit.After;
 import org.junit.Before;
-import org.junit.Rule;
 import org.junit.Test;
 import org.openoffice.test.common.FileUtil;
-import org.openoffice.test.common.Logger;
 
+import testlib.gui.AppTool;
 import testlib.gui.SDTool;
 
 public class HeaderAndFooterSetting {
 
-	@Rule
-	public Logger log = Logger.getLogger(this);
-
 	@Before
 	public void setUp() throws Exception {
-		app.start(true); // Bug 120476
-
-		// New a impress, insert some slides
-		app.dispatch("private:factory/simpress?slot=6686");
-		presentationWizard.ok();
-		impress.waitForExistence(10, 2);
-
+		app.start(true); 
+		AppTool.newPresentation();
 		for (int i = 0; i < 5; i++) {
 			sdInsertPageButtonOnToolbar.click();
 		}
@@ -492,7 +483,7 @@ public class HeaderAndFooterSetting {
 		sdAutoUpdateTimeFooterType.select(7);
 		String currentTime = sdAutoUpdateTimeFooterType.getItemText(7);
 		sdApplyToAllButtonOnSlideFooter.click();
-		sleep(1); // Wait some time to check the time update
+		sleep(1);
 
 		app.dispatch(".uno:HeaderAndFooter");
 		String updatedTime = sdAutoUpdateTimeFooterType.getItemText(7);
@@ -514,7 +505,7 @@ public class HeaderAndFooterSetting {
 		sdAutoUpdateTimeFooter.check();
 		String currentTime = sdAutoUpdateTimeFooterType.getItemText(7);
 		sdApplyToAllButtonOnSlideFooter.click();
-		sleep(1); // Wait some time to check the time update
+		sleep(1); 
 
 		app.dispatch(".uno:HeaderAndFooter");
 		sdHeaderAndFooterOnNotesTabPage.select();
@@ -556,24 +547,14 @@ public class HeaderAndFooterSetting {
 		assertEquals(true, sdSlideNumAsFooterOnSlide.isChecked());
 		sdHeaderAndFooterOnNotesTabPage.cancel();
 
-		// save this file
-		app.dispatch(".uno:SaveAs");
+		// save and reopen this file
 		String saveTo = getPath("temp/" + "hello.odp");
 		FileUtil.deleteFile(saveTo);
-		submitSaveDlg(saveTo);
-		if (activeMsgBox.exists()) {
-			activeMsgBox.yes();
-			sleep(2);
-		}
-		sleep(5);
-		app.dispatch(".uno:CloseDoc");
+		saveAs(saveTo);
+		close();
+		open(saveTo);
+		impress.waitForExistence(10, 2);
 
-		// Reopen this file
-		openStartcenter();
-		app.dispatch(".uno:Open");
-		String openFrom = getPath("temp/" + "hello.odp");
-		submitOpenDlg(openFrom);
-		sleep(5);
 		// check after reopen
 		app.dispatch(".uno:HeaderAndFooter");
 		sdHeaderAndFooterOnNotesTabPage.select();
@@ -616,23 +597,13 @@ public class HeaderAndFooterSetting {
 		typeKeys("<enter>");
 
 		// save this file
-		app.dispatch(".uno:SaveAs");
 		String saveTo = getPath("temp/" + "hello.odp");
 		FileUtil.deleteFile(saveTo);
-		submitSaveDlg(saveTo);
-		if (activeMsgBox.exists()) {
-			activeMsgBox.yes();
-			sleep(2);
-		}
-		sleep(5);
-		app.dispatch(".uno:CloseDoc");
+		saveAs(saveTo);
+		close();
+		open(saveTo);
+		impress.waitForExistence(10, 2);
 
-		// Reopen this file
-		openStartcenter();
-		app.dispatch(".uno:Open");
-		String openFrom = getPath("temp/" + "hello.odp");
-		submitOpenDlg(openFrom);
-		sleep(5);
 		// check after reopen
 		app.dispatch(".uno:HeaderAndFooter");
 		assertEquals("Fix Date: 20120329", sdFixedDateAndTimeOnSlideInput.getText());

Modified: incubator/ooo/trunk/test/testgui/source/fvt/gui/sd/shape/ShapeTypes.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testgui/source/fvt/gui/sd/shape/ShapeTypes.java?rev=1409084&r1=1409083&r2=1409084&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testgui/source/fvt/gui/sd/shape/ShapeTypes.java (original)
+++ incubator/ooo/trunk/test/testgui/source/fvt/gui/sd/shape/ShapeTypes.java Wed Nov 14 05:45:59
2012
@@ -34,24 +34,22 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.openoffice.test.common.Logger;
 
+import testlib.gui.AppTool;
+
 
 
 public class ShapeTypes {
-	@Rule
-	public Logger log = Logger.getLogger(this);
 
 	@Before
 	public void setUp() throws Exception {
 		app.start();
+		AppTool.newPresentation();
 
-		// New a impress, insert some slides
-		app.dispatch("private:factory/simpress?slot=6686");
-		presentationWizard.ok();
 		// Pop up navigator panel
 		if (!sdNavigatorDlg.exists()) {
 			app.dispatch(".uno:Navigator");
 		}
-			
+		//Pop up drawing toolbar
 		if(!sdDrawingToolbar.exists()){
 			app.dispatch(".uno:AvailableToolbars?Toolbar:string=toolbar");
 		}
@@ -60,6 +58,7 @@ public class ShapeTypes {
 	@After
 	public void tearDown() throws Exception {
 		sleep(3);
+		//close navigator
 		if (sdNavigatorDlg.exists()) {
 			app.dispatch(".uno:Navigator");
 		}
@@ -74,7 +73,7 @@ public class ShapeTypes {
 	public void testCalloutShapes() throws Exception{
 
 		impress.focus();
-		//---before insert CallOut Shape
+		//before insert CallOut Shape
 		sdNavigator.focus();
 		sdNavigatorShapeFilter.click();
 		typeKeys("<down><down>");
@@ -84,7 +83,7 @@ public class ShapeTypes {
 		String[] allShapes=sdNavigator.getAllItemsText();
 		assertEquals(3, allShapes.length);
 		
-		//--- After insert CallOut shape
+		//After insert CallOut shape
 		sdCalloutShapes.click();
 		impress.focus();
 		impress.drag(100, 100, 200, 200);
@@ -108,7 +107,7 @@ public class ShapeTypes {
 	public void testStarsShapes() throws Exception{
 
 		impress.focus();
-		//---before insert CallOut Shape
+		//before insert CallOut Shape
 		sdNavigator.focus();
 		sdNavigatorShapeFilter.click();
 		typeKeys("<down><down>");
@@ -118,7 +117,7 @@ public class ShapeTypes {
 		String[] allShapes=sdNavigator.getAllItemsText();
 		assertEquals(3, allShapes.length);
 		
-		//--- After insert CallOut shape
+		//After insert CallOut shape
 		sdStarShapes.click();
 		impress.focus();
 		impress.drag(100, 100, 200, 200);

Copied: incubator/ooo/trunk/test/testgui/source/fvt/gui/sd/table/TableBackgroundProperty.java
(from r1408174, incubator/ooo/trunk/test/testgui/source/fvt/gui/sd/table/ChangeTableBackgroundProperty.java)
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testgui/source/fvt/gui/sd/table/TableBackgroundProperty.java?p2=incubator/ooo/trunk/test/testgui/source/fvt/gui/sd/table/TableBackgroundProperty.java&p1=incubator/ooo/trunk/test/testgui/source/fvt/gui/sd/table/ChangeTableBackgroundProperty.java&r1=1408174&r2=1409084&rev=1409084&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testgui/source/fvt/gui/sd/table/ChangeTableBackgroundProperty.java
(original)
+++ incubator/ooo/trunk/test/testgui/source/fvt/gui/sd/table/TableBackgroundProperty.java
Wed Nov 14 05:45:59 2012
@@ -30,9 +30,9 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.openoffice.test.common.Logger;
 
-public class ChangeTableBackgroundProperty {
-	@Rule
-	public Logger log = Logger.getLogger(this);
+import testlib.gui.AppTool;
+
+public class TableBackgroundProperty {
 
 	@Before
 	public void setUp() throws Exception {
@@ -41,21 +41,18 @@ public class ChangeTableBackgroundProper
 
 	@After
 	public void tearDown() throws Exception {
-		app.close();
+		app.stop();
 	}
 
 	/**
-	 * Open the Table Background property dialog in Presentation
+	 * Test the Table Background property dialog in Presentation
 	 * 
 	 * @throws Exception
 	 */
 
 	@Test
-	public void OpenTableBackgroundPropertyDialog() throws Exception {
-
-		// Create a new presentation document
-		app.dispatch("private:factory/simpress?slot=6686");
-		presentationWizard.ok();
+	public void testTableBackgroundPropertyDialog() throws Exception {
+		AppTool.newPresentation();
 
 		// Insert a table
 		app.dispatch(".uno:InsertTable", 3);
@@ -69,10 +66,10 @@ public class ChangeTableBackgroundProper
 		areaAreapage.select();
 		// select Color
 		areaFillType.select(1);
-		assertEquals("Area_Fill_Type is Color", areaFillType.getSelText(), areaFillType.getItemText(1));
+		assertEquals("Area_Fill_Type is not Color", areaFillType.getSelText(), areaFillType.getItemText(1));
 		areaFillColor.select(2);
 		// Area_Fill_Color.getItemCount();
-		assertEquals("Area_Fill_Color is second item", areaFillColor.getSelText(), areaFillColor.getItemText(2));
+		assertEquals("Area_Fill_Color is not the second item", areaFillColor.getSelText(), areaFillColor.getItemText(2));
 		areaAreapage.ok();
 
 		// open Table Properties Dialog
@@ -80,9 +77,9 @@ public class ChangeTableBackgroundProper
 		areaAreapage.select();
 		// select Gradient
 		areaFillType.select(2);
-		assertEquals("Area_Fill_Type is Gradient", areaFillType.getSelText(), areaFillType.getItemText(2));
+		assertEquals("Area_Fill_Type is not Gradient", areaFillType.getSelText(), areaFillType.getItemText(2));
 		areaFillGradient.select(2);
-		assertEquals("Area_Fill_Gradient is second item", areaFillGradient.getSelText(), areaFillGradient.getItemText(2));
+		assertEquals("Area_Fill_Gradient is not the second item", areaFillGradient.getSelText(),
areaFillGradient.getItemText(2));
 		areaAreapage.ok();
 
 		// open Table Properties Dialog
@@ -90,9 +87,9 @@ public class ChangeTableBackgroundProper
 		areaAreapage.select();
 		// select Hatching
 		areaFillType.select(3);
-		assertEquals("Area_Fill_Type is Hatching", areaFillType.getSelText(), areaFillType.getItemText(3));
+		assertEquals("Area_Fill_Type is not Hatching", areaFillType.getSelText(), areaFillType.getItemText(3));
 		areaFillHatching.select(2);
-		assertEquals("Area_Fill_Hatching is second item", areaFillHatching.getSelText(), areaFillHatching.getItemText(2));
+		assertEquals("Area_Fill_Hatching is not the second item", areaFillHatching.getSelText(),
areaFillHatching.getItemText(2));
 		areaAreapage.ok();
 
 		// open Table Properties Dialog
@@ -100,9 +97,9 @@ public class ChangeTableBackgroundProper
 		areaAreapage.select();
 		// select Bitmap
 		areaFillType.select(4);
-		assertEquals("Area_Fill_Type is Bitmap", areaFillType.getSelText(), areaFillType.getItemText(4));
+		assertEquals("Area_Fill_Type is not Bitmap", areaFillType.getSelText(), areaFillType.getItemText(4));
 		areaFillBitmap.select(2);
-		assertEquals("Area_Fill_Bitmap is second item", areaFillBitmap.getSelText(), areaFillBitmap.getItemText(2));
+		assertEquals("Area_Fill_Bitmap is not the second item", areaFillBitmap.getSelText(), areaFillBitmap.getItemText(2));
 		areaAreapage.ok();
 
 	}

Copied: incubator/ooo/trunk/test/testgui/source/fvt/gui/sd/table/TableBorderProperty.java
(from r1408174, incubator/ooo/trunk/test/testgui/source/fvt/gui/sd/table/ChangeTableBorderProperty.java)
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testgui/source/fvt/gui/sd/table/TableBorderProperty.java?p2=incubator/ooo/trunk/test/testgui/source/fvt/gui/sd/table/TableBorderProperty.java&p1=incubator/ooo/trunk/test/testgui/source/fvt/gui/sd/table/ChangeTableBorderProperty.java&r1=1408174&r2=1409084&rev=1409084&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testgui/source/fvt/gui/sd/table/ChangeTableBorderProperty.java
(original)
+++ incubator/ooo/trunk/test/testgui/source/fvt/gui/sd/table/TableBorderProperty.java Wed
Nov 14 05:45:59 2012
@@ -31,9 +31,9 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.openoffice.test.common.Logger;
 
-public class ChangeTableBorderProperty {
-	@Rule
-	public Logger log = Logger.getLogger(this);
+import testlib.gui.AppTool;
+
+public class TableBorderProperty {
 
 	@Before
 	public void setUp() throws Exception {
@@ -42,22 +42,20 @@ public class ChangeTableBorderProperty {
 
 	@After
 	public void tearDown() throws Exception {
-		app.close();
+		app.stop();
 	}
 
 	/**
-	 * Open the table border property in Presentation
+	 * Test the table border property in Presentation
 	 * 
 	 * @throws Exception
 	 */
 
 	@Test
-	public void OpenTableBorderPropertyDialog() throws Exception {
+	public void testTableBorderPropertyDialog() throws Exception {
 
 		// Create a new presentation document
-		app.dispatch("private:factory/simpress?slot=6686");
-		presentationWizard.ok();
-		sleep(3);
+		AppTool.newPresentation();
 
 		// Insert a table
 		app.dispatch(".uno:InsertTable", 3);
@@ -75,26 +73,26 @@ public class ChangeTableBorderProperty {
 
 		// select Line
 		areaBorderLineStyle.select(1);
-		assertEquals("Area_Border_LineStyle is first item", areaBorderLineStyle.getSelText(), areaBorderLineStyle.getItemText(1));
+		assertEquals("Area_Border_LineStyle is not the first item", areaBorderLineStyle.getSelText(),
areaBorderLineStyle.getItemText(1));
 
 		areaBorderLineColor.select(1);
-		assertEquals("Area_Border_LineColor is first item", areaBorderLineColor.getSelText(), areaBorderLineColor.getItemText(1));
+		assertEquals("Area_Border_LineColor is not the first item", areaBorderLineColor.getSelText(),
areaBorderLineColor.getItemText(1));
 
 		// select Spacing to Contents
 		areaBorderSync.check();
-		assertTrue("Area_Border_Sync is checked", areaBorderSync.isChecked());
+		assertTrue("Area_Border_Sync isn't checked", areaBorderSync.isChecked());
 
 		areaBorderMfLeft.setText("0.5");
-		assertTrue("Area_Border_Mf_Left is 0.5", areaBorderMfLeft.getText().startsWith("0.5"));
+		assertTrue("Area_Border_Mf_Left isn't 0.5", areaBorderMfLeft.getText().startsWith("0.5"));
 
 		areaBorderMfRight.setText("0.5");
-		assertTrue("Area_Border_Mf_Right is 0.5", areaBorderMfRight.getText().startsWith("0.5"));
+		assertTrue("Area_Border_Mf_Right isn't 0.5", areaBorderMfRight.getText().startsWith("0.5"));
 
 		areaBorderMfTop.setText("0.5");
-		assertTrue("Area_Border_Mf_Top is 0.5", areaBorderMfTop.getText().startsWith("0.5"));
+		assertTrue("Area_Border_Mf_Top isn't 0.5", areaBorderMfTop.getText().startsWith("0.5"));
 
 		areaBorderMfBottom.setText("0.5");
-		assertTrue("Area_Border_Mf_Bottom is 0.5", areaBorderMfBottom.getText().startsWith("0.5"));
+		assertTrue("Area_Border_Mf_Bottom isn't 0.5", areaBorderMfBottom.getText().startsWith("0.5"));
 
 		areaBorderpage.ok();
 

Copied: incubator/ooo/trunk/test/testgui/source/fvt/gui/sd/table/TableFontEffectsProperty.java
(from r1408174, incubator/ooo/trunk/test/testgui/source/fvt/gui/sd/table/ChangeTableFontEffectsProperty.java)
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testgui/source/fvt/gui/sd/table/TableFontEffectsProperty.java?p2=incubator/ooo/trunk/test/testgui/source/fvt/gui/sd/table/TableFontEffectsProperty.java&p1=incubator/ooo/trunk/test/testgui/source/fvt/gui/sd/table/ChangeTableFontEffectsProperty.java&r1=1408174&r2=1409084&rev=1409084&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testgui/source/fvt/gui/sd/table/ChangeTableFontEffectsProperty.java
(original)
+++ incubator/ooo/trunk/test/testgui/source/fvt/gui/sd/table/TableFontEffectsProperty.java
Wed Nov 14 05:45:59 2012
@@ -30,9 +30,9 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.openoffice.test.common.Logger;
 
-public class ChangeTableFontEffectsProperty {
-	@Rule
-	public Logger log = Logger.getLogger(this);
+import testlib.gui.AppTool;
+
+public class TableFontEffectsProperty {
 
 	@Before
 	public void setUp() throws Exception {
@@ -41,21 +41,20 @@ public class ChangeTableFontEffectsPrope
 
 	@After
 	public void tearDown() throws Exception {
-		app.close();
+		app.stop();
 	}
 
 	/**
-	 * Open the Font Effect property dialog in Presentation
+	 * Test the Font Effect property dialog in Presentation
 	 * 
 	 * @throws Exception
 	 */
 
 	@Test
-	public void OpenTableFontEffectPropertyDialog() throws Exception {
+	public void testTableFontEffectPropertyDialog() throws Exception {
 
 		// Create a new presentation document
-		app.dispatch("private:factory/simpress?slot=6686");
-		presentationWizard.ok();
+		AppTool.newPresentation();
 
 		// Insert a table
 		app.dispatch(".uno:InsertTable", 3);
@@ -69,35 +68,35 @@ public class ChangeTableFontEffectsPrope
 		effectsPage.select();
 		// select Font color
 		effectsPageColor.select(1);
-		assertEquals("EffectsPage_Color is black", effectsPageColor.getSelText(), "Black");
+		assertEquals("EffectsPage_Color isn't black", effectsPageColor.getSelText(), "Black");
 
 		// select Relief
 		effectsPageRelief.select(0);
-		assertEquals("EffectsPage_Relief is no", effectsPageRelief.getSelText(), "(Without)");
+		assertEquals("EffectsPage_Relief isn't no", effectsPageRelief.getSelText(), "(Without)");
 		effectsPageOutline.check();
-		assertTrue("EffectsPage_Outline is checked", effectsPageOutline.isChecked());
+		assertTrue("EffectsPage_Outline isn't checked", effectsPageOutline.isChecked());
 		effectsPageShadow.check();
-		assertTrue("EffectsPage_Shadow is checked", effectsPageShadow.isChecked());
+		assertTrue("EffectsPage_Shadow isn't checked", effectsPageShadow.isChecked());
 
 		// select Overlining
 		effectsPageOverline.select(1);
-		assertEquals("EffectsPage_Overline is first item", effectsPageOverline.getSelText(), effectsPageOverline.getItemText(1));
+		assertEquals("EffectsPage_Overline isn't the first item", effectsPageOverline.getSelText(),
effectsPageOverline.getItemText(1));
 		effectsPageOverlineColor.select(1);
-		assertEquals("EffectsPage_Overline_Color is first item", effectsPageOverlineColor.getSelText(),
effectsPageOverlineColor.getItemText(1));
+		assertEquals("EffectsPage_Overline_Color isn't the first item", effectsPageOverlineColor.getSelText(),
effectsPageOverlineColor.getItemText(1));
 
 		// select Strikethrough
 		effectsPageStrikeout.select(1);
-		assertEquals("EffectsPage_Strikeout is first item", effectsPageStrikeout.getSelText(),
effectsPageStrikeout.getItemText(1));
+		assertEquals("EffectsPage_Strikeout isn't the first item", effectsPageStrikeout.getSelText(),
effectsPageStrikeout.getItemText(1));
 
 		// select Underlining
 		effectsPageUnderline.select(1);
-		assertEquals("EffectsPage_Underline is first item", effectsPageUnderline.getSelText(),
effectsPageUnderline.getItemText(1));
+		assertEquals("EffectsPage_Underline isn't the first item", effectsPageUnderline.getSelText(),
effectsPageUnderline.getItemText(1));
 		effectsPageUnderlineColor.select(1);
-		assertEquals("EffectsPage_Underline_Color is first item", effectsPageUnderlineColor.getSelText(),
effectsPageUnderlineColor.getItemText(1));
+		assertEquals("EffectsPage_Underline_Color isn't the first item", effectsPageUnderlineColor.getSelText(),
effectsPageUnderlineColor.getItemText(1));
 
 		// select individual workds
 		effectsPageInvidiualWords.check();
-		assertTrue("EffectsPage_InvidiualWords is checked", effectsPageInvidiualWords.isChecked());
+		assertTrue("EffectsPage_InvidiualWords isn't checked", effectsPageInvidiualWords.isChecked());
 
 		// select Emphasis Mark
 		// EffectsPage_Emphasis.select(1);

Modified: incubator/ooo/trunk/test/testgui/source/testlib/gui/AppTool.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/test/testgui/source/testlib/gui/AppTool.java?rev=1409084&r1=1409083&r2=1409084&view=diff
==============================================================================
--- incubator/ooo/trunk/test/testgui/source/testlib/gui/AppTool.java (original)
+++ incubator/ooo/trunk/test/testgui/source/testlib/gui/AppTool.java Wed Nov 14 05:45:59 2012
@@ -104,6 +104,12 @@ public class AppTool extends Tester {
 		app.dispatch(".uno:CloseDoc");
 	}
 	
+	public static void saveAndReopen(String path){
+		saveAs(path);
+		close();
+		open(path);
+	}
+	
 	public static void discard() {
 		app.dispatch(".uno:CloseDoc");
 		if (activeMsgBox.exists(2))



Mime
View raw message