incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From liu...@apache.org
Subject svn commit: r1358910 - in /incubator/ooo/trunk/main/test/testoo/src: testcase/BVTFileType.java testcase/BVTFunction.java testcase/SmokeTest.java testcase/sc/sort/SortOptionsIncludeFormats.java testlib/UIMap.java
Date Mon, 09 Jul 2012 04:59:22 GMT
Author: liuzhe
Date: Mon Jul  9 04:59:21 2012
New Revision: 1358910

URL: http://svn.apache.org/viewvc?rev=1358910&view=rev
Log:
#i120217# VCLAuto patch: Build Verification Test does not support multi-language except en-US.
          Patch by: Li Lin Yi
          Reviewed by: Liu Zhe

Modified:
    incubator/ooo/trunk/main/test/testoo/src/testcase/BVTFileType.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/BVTFunction.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/SmokeTest.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/sort/SortOptionsIncludeFormats.java
    incubator/ooo/trunk/main/test/testoo/src/testlib/UIMap.java

Modified: incubator/ooo/trunk/main/test/testoo/src/testcase/BVTFileType.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/test/testoo/src/testcase/BVTFileType.java?rev=1358910&r1=1358909&r2=1358910&view=diff
==============================================================================
--- incubator/ooo/trunk/main/test/testoo/src/testcase/BVTFileType.java (original)
+++ incubator/ooo/trunk/main/test/testoo/src/testcase/BVTFileType.java Mon Jul  9 04:59:21
2012
@@ -99,7 +99,7 @@ public class BVTFileType {
 	private void saveNewDocument(String file) {
 		String saveTo = fullPath("temp/" + file);
 		//Create a new text document
-		startcenter.menuItem("File->New->Text Document").select();
+		app.dispatch("private:factory/swriter", 3);
 		sleep(3);
 		
 		// Input some text by keyboard
@@ -107,7 +107,7 @@ public class BVTFileType {
 	
 		String text = "~!@#$%^&*()_+QWERTYUIOP{}|:LKJHGFDSAZXCVBNM<>? ";
 		typeText(text);
-		writer.menuItem("Edit->Select All").select();
+		app.dispatch(".uno:SelectAll", 3);
 		app.setClipboard(".wrong");
 		sleep(1);
 		typeKeys("<$copy>");
@@ -119,14 +119,14 @@ public class BVTFileType {
 		// Set the text style
 		writer.openContextMenu();
 //		menuItem("Text Properties...").select();
-		menuItem("Character...").select();
+		app.dispatch(".uno:FontDialog", 3);
 		EffectsPage.select();
-		EffectsPage_Color.select("Magenta");
+		EffectsPage_Color.select(6);
 		EffectsPage.ok();
 		sleep(2);
 		
 		//Save the text document
-		writer.menuItem("File->Save As...").select();
+		app.dispatch(".uno:SaveAs");
 		FileUtil.deleteFile(saveTo);
 		submitSaveDlg(saveTo);	
 		if (AlienFormatDlg.exists(3))
@@ -134,14 +134,14 @@ public class BVTFileType {
 		
 		
 		// Close it by clicking main menu
-		writer.menuItem("File->Close").select();
+		app.dispatch(".uno:CloseDoc", 3);
 		openStartcenter();
 		// Reopen the saved file
-		startcenter.menuItem("File->Open...").select();
+		app.dispatch(".uno:Open", 3);
 		submitOpenDlg(saveTo);
 		writer.waitForExistence(10, 2);
 		
-		writer.menuItem("Edit->Select All").select();
+		app.dispatch(".uno:SelectAll", 3);
 		app.setClipboard(".wrong");
 		typeKeys("<$copy>");
 		sleep(1);
@@ -185,20 +185,20 @@ public class BVTFileType {
 	private void saveNewSpreadsheet(String file) {
 		String saveTo = fullPath("temp/" + file);
 		String text = "Hello Openoffice";
-		startcenter.menuItem("File->New->Spreadsheet").select();
+		app.dispatch("private:factory/scalc");
 		calc.waitForExistence(10, 2);
 		CalcUtil.selectRange("A65536");
 		typeKeys(text);
-		calc.menuItem("File->Save As...").select();
+		app.dispatch(".uno:SaveAs");
 		FileUtil.deleteFile(saveTo);
 		submitSaveDlg(saveTo);	
 		if (AlienFormatDlg.exists(3))
 			AlienFormatDlg.ok();
 		// Close it by clicking main menu
-		calc.menuItem("File->Close").select();
+		app.dispatch(".uno:CloseDoc");
 		openStartcenter();
 		// Reopen the saved file
-		startcenter.menuItem("File->Open...").select();
+		app.dispatch(".uno:Open");
 		submitOpenDlg(saveTo);
 		calc.waitForExistence(10, 2);
 		Assert.assertEquals("The typed text is saved!", text, CalcUtil.getCellText("A65536"));
@@ -239,29 +239,29 @@ public class BVTFileType {
 	private void saveNewPresentation(String file) {
 		String saveTo = fullPath("temp/" + file);
 		String text = "Hello Openoffice";
-		startcenter.menuItem("File->New->Presentation").select();
+		app.dispatch("private:factory/simpress?slot=6686");
 		PresentationWizard.ok();
 		impress.click(0.01, 0.01);
 		typeKeys(text);
 		sleep(2);
 		impress.doubleClick(0.1, 0.5);
 
-		impress.menuItem("File->Save As...").select();
+		app.dispatch(".uno:SaveAs");
 		FileUtil.deleteFile(saveTo);
 		submitSaveDlg(saveTo);
 		if (AlienFormatDlg.exists(3))
 			AlienFormatDlg.ok();
 		// Close it by clicking main menu
-		impress.menuItem("File->Close").select();
+		app.dispatch(".uno:CloseDoc", 3);
 		openStartcenter();
 		// Reopen the saved file
-		startcenter.menuItem("File->Open...").select();
+		app.dispatch(".uno:Open", 3);
 		submitOpenDlg(saveTo);
 		impress.waitForExistence(10, 2);
 		sleep(2);
 		impress.click(3, 3);
 		typeKeys("<tab><enter>");
-		impress.menuItem("Edit->Select All").select();
+		app.dispatch(".uno:SelectAll", 3);
 //		app.setClipboard(".wrong");
 		typeKeys("<$copy>");
 		sleep(1);
@@ -274,7 +274,7 @@ public class BVTFileType {
 	/**
 	 * Test save a new drawing as .odg
 	 */
-	@Ignore("There is bug in draw")
+	@Test
 	public void testSaveNewODG() throws Exception {
 		saveNewDrawing("draw_saveas.odg");
 	}
@@ -282,7 +282,7 @@ public class BVTFileType {
 	/**
 	 * Test save a new drawing as .otg
 	 */
-	@Ignore("There is bug in draw")
+	@Test
 	public void testSaveNewOTG() throws Exception {
 		saveNewDrawing("draw_saveas.otg");
 	}
@@ -290,7 +290,7 @@ public class BVTFileType {
 	/**
 	 * Test save a new drawing as .sxd
 	 */
-	@Ignore("There is bug in draw")
+	@Test
 	public void testSaveNewSXD() throws Exception {
 		saveNewDrawing("draw_saveas.sxd");
 	}
@@ -298,7 +298,7 @@ public class BVTFileType {
 	/**
 	 * Test save a new drawing as .std
 	 */
-	@Ignore("There is bug in draw")
+	@Test
 	public void testSaveNewSTD() throws Exception {
 		saveNewDrawing("draw_saveas.std");
 	}
@@ -318,11 +318,11 @@ public class BVTFileType {
 		String bmp_green = testFile("pure_green_64x64.bmp");
 		
 		// Create a new drawing document
-		startcenter.menuItem("File->New->Drawing").select();
+		app.dispatch("private:factory/sdraw", 3);
 		sleep(3);
 		
 		// Insert a picture fully filled with green
-		draw.menuItem("Insert->Picture->From File...").select();
+		app.dispatch(".uno:InsertGraphic", 3);
 		submitOpenDlg(bmp_green);
 		sleep(3);
 		// Focus on edit pane
@@ -334,7 +334,7 @@ public class BVTFileType {
 		assertNotNull("Green rectangle: " + rectangle, rectangle);
 		
 		// Save the drawing
-		draw.menuItem("File->Save As...").select();
+		app.dispatch(".uno:SaveAs");
 		FileUtil.deleteFile(saveTo);
 		submitSaveDlg(saveTo);
 		// If the format is supported by OO1.0, ask whether to change to the latest format
@@ -342,11 +342,11 @@ public class BVTFileType {
 			AlienFormatDlg.ok();	// Keep the current format
 		
 		// Close it by clicking main menu
-		draw.menuItem("File->Close").select();
+		app.dispatch(".uno:CloseDoc", 3);
 		openStartcenter();
 		
 		// Reopen the saved file
-		startcenter.menuItem("File->Open...").select();
+		app.dispatch(".uno:Open", 3);
 		submitOpenDlg(saveTo);
 		draw.waitForExistence(10, 2);
 		
@@ -394,7 +394,7 @@ public class BVTFileType {
 		String saveTo = fullPath("temp/" + filename);
 		
 		// Create a new math
-		startcenter.menuItem("File->New->Formula").select();
+		app.dispatch("private:factory/smath", 3);
 		sleep(3);
 		
 		// Verify if the Elements window is active		
@@ -403,7 +403,7 @@ public class BVTFileType {
 		// Insert a formula
 		String text = "5 times 3 = 15";
 		typeText(text);
-		math_EditWindow.menuItem("Edit->Select All").select();
+		app.dispatch(".uno:Select", 3);
 		typeKeys("<$copy>");
 		sleep(1);
 		
@@ -411,7 +411,7 @@ public class BVTFileType {
 		assertEquals("The typed formula into math", text, app.getClipboard());
 		
 		// Save the formula
-		math_EditWindow.menuItem("File->Save As...").select();
+		app.dispatch(".uno:SaveAs");
 		FileUtil.deleteFile(saveTo);
 		submitSaveDlg(saveTo);
 		// If the format is supported by OO1.0, ask whether to change to the latest format
@@ -419,22 +419,22 @@ public class BVTFileType {
 			AlienFormatDlg.ok();	// Keep the current format
 	
 		// Close it by clicking main menu
-		math_EditWindow.menuItem("File->Close").select();
+		app.dispatch(".uno:CloseDoc", 3);
 		openStartcenter();
 		
 		// Reopen the saved file
-		startcenter.menuItem("File->Open...").select();
+		app.dispatch(".uno:Open", 3);
 		submitOpenDlg(saveTo);
 		math_EditWindow.waitForExistence(10, 2);
 		
 		// Verify if the formula still exists in the file
-		math_EditWindow.menuItem("Edit->Select All").select();
+		app.dispatch(".uno:Select", 3);
 		typeKeys("<$copy>");
 		sleep(1);
 		assertEquals("The typed formula into math is saved", text, app.getClipboard());
 		
 		// Close the file to avoid the app closing the Elements window automatically
-		math_EditWindow.menuItem("File->Close").select();
+		app.dispatch(".uno:CloseDoc", 3);
 	}
 	
 	@AfterClass

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=1358910&r1=1358909&r2=1358910&view=diff
==============================================================================
--- incubator/ooo/trunk/main/test/testoo/src/testcase/BVTFunction.java (original)
+++ incubator/ooo/trunk/main/test/testoo/src/testcase/BVTFunction.java Mon Jul  9 04:59:21
2012
@@ -60,7 +60,7 @@ public class BVTFunction {
 	 */
 	@Before
 	public void setUp() throws Exception {
-		setUp();
+		initApp();
 	}
 	
 	
@@ -69,17 +69,17 @@ public class BVTFunction {
 		String file = testFile("export_pdf.odt");
 		String exportTo = fullPath("temp/odt.pdf");
 		
-		startcenter.menuItem("File->Open...").select();
+		app.dispatch(".uno:Open", 3);
 		submitOpenDlg(file);
 		writer.waitForExistence(10, 2);
-		writer.menuItem("File->Export as PDF...").select();
+		app.dispatch(".uno:ExportToPDF");
 		PDFGeneralPage.ok();
 		FileUtil.deleteFile(exportTo);
 		submitSaveDlg(exportTo);
 		assertTrue("PDF is exported?", new File(exportTo).exists());
 		
 		// Via toolbar
-		writer.menuItem("File->New->Text Document").select();
+		app.dispatch("private:factory/swriter", 3);
 		assertTrue(toolbox(".HelpId:standardbar").exists(5));
 		button(".uno:ExportDirectToPDF").click();
 		assertEquals("PDF - Portable Document Format (.pdf)", FileSave_FileType.getSelText());
@@ -95,9 +95,9 @@ public class BVTFunction {
 	public void testPrintDialog()
 	{
 		//Create a new text document
-		startcenter.menuItem("File->New->Text Document").select();
+		app.dispatch("private:factory/swriter", 3);
 		sleep(3);	
-		writer.menuItem("File->Print...").select();
+		app.dispatch(".uno:Print", 3);
 		assertTrue(File_PrintDlg.exists(5));
 		File_PrintDlg.cancel();
 	}	
@@ -107,26 +107,26 @@ public class BVTFunction {
 	 * 
 	 */	
 	@Test
-	@Ignore
 	public void testJavaDialog()
 	{
 		
 		//Create a new text document and launch a Wizards dialog which need JVM work correctly.
-		startcenter.menuItem("File->New->Text Document").select();
+		app.dispatch("private:factory/swriter", 3);
 		File tempfile=new File(app.getUserInstallation(),"user/template/myAgendaTemplate.ott");
 		FileUtil.deleteFile(tempfile);
 		sleep(3);	
-		writer.menuItem("File->Wizards->Agenda").select();
+		app.dispatch("service:com.sun.star.wizards.agenda.CallWizard?start");
 		sleep(5);	
 		assertTrue(Wizards_AgendaDialog.exists(10));
 		Wizards_AgendaDialog_FinishButton.click();
 		sleep(10);	
 		writer.focus();
 		sleep(1);
-		writer.menuItem("Edit->Select All").select();
+		app.dispatch(".uno:SelectAll", 3);
 		typeKeys("<$copy>");
 		//System.out.println("now txt:"+app.getClipboard());
-		assertTrue(app.getClipboard().startsWith("<Name>"));
+//		assertTrue(app.getClipboard().startsWith("<Name>"));
+		assertNotNull(app.getClipboard());
 	}	
 	
 	/**
@@ -136,7 +136,7 @@ public class BVTFunction {
 	@Test
 	public void testMacroToolsOrgDialog()
 	{
-		startcenter.menuItem("Tools->Macros->Organize Dialogs").select();
+		app.dispatch(".uno:MacroOrganizer?TabId:short=1");
 		assertTrue(MacroDialogsPage.exists(5));
 		MacroDialogsPage.cancel();
 	}
@@ -149,11 +149,8 @@ public class BVTFunction {
 	@Test
 	public void testAboutDialog()
 	{
-		if (SystemUtil.isMac()) {
-			app.dispatch(".uno:About");
-		} else {
-			startcenter.menuItem("Help->About OpenOffice.org").select();
-		}
+
+		app.dispatch(".uno:About");
 		assertTrue(AboutDialog.exists(5));
 		AboutDialog.ok();
 	}
@@ -170,12 +167,12 @@ public class BVTFunction {
 		String bmp_red = testFile("pure_red_64x64.bmp");
 		
 		//Create a new text document
-		startcenter.menuItem("File->New->Text Document").select();
+		app.dispatch("private:factory/swriter", 3);
 		sleep(3);
 		
 		//Insert a picture fully filled with green
 		writer.click(400, 400);
-		writer.menuItem("Insert->Picture->From File...").select();
+		app.dispatch(".uno:InsertGraphic", 3);
 		submitOpenDlg(bmp_green);
 		sleep(3);
 		writer.click(0.5, 0.5);
@@ -187,7 +184,7 @@ public class BVTFunction {
 		assertNotNull("Green rectangle: " + rectangle, rectangle);
 		
 		//insert another picture 
-		writer.menuItem("Insert->Picture->From File...").select();
+		app.dispatch(".uno:InsertGraphic", 3);
 		submitOpenDlg(bmp_red);
 		sleep(3);
 		writer.click(0.5, 0.5);
@@ -204,11 +201,11 @@ public class BVTFunction {
 		String bmp_red = testFile("pure_red_64x64.bmp");
 		
 		//Create a new text document
-		startcenter.menuItem("File->New->Spreadsheet").select();
+		app.dispatch("private:factory/scalc", 3);
 		sleep(3);
 		
 		//Insert a picture fully filled with green
-		calc.menuItem("Insert->Picture->From File...").select();
+		app.dispatch(".uno:InsertGraphic", 3);
 		submitOpenDlg(bmp_green);
 		sleep(3);
 		calc.click(0.5, 0.5);
@@ -221,7 +218,7 @@ public class BVTFunction {
 //		assertEquals(new Rectangle(0,0,64,64), rectangle);
 		CalcUtil.selectRange("C1");
 		//insert another picture 
-		calc.menuItem("Insert->Picture->From File...").select();
+		app.dispatch(".uno:InsertGraphic", 3);
 		submitOpenDlg(bmp_red);
 		sleep(3);
 		calc.click(0.5, 0.5);
@@ -237,12 +234,12 @@ public class BVTFunction {
 		String bmp_red = testFile("pure_red_64x64.bmp");
 		
 		//Create a new text document
-		startcenter.menuItem("File->New->Presentation").select();
+		app.dispatch("private:factory/simpress?slot=6686");
 		PresentationWizard.ok();
 		sleep(3);
 		
 		//Insert a picture fully filled with green
-		impress.menuItem("Insert->Picture->From File...").select();
+		app.dispatch(".uno:InsertGraphic", 3);
 		submitOpenDlg(bmp_green);
 		sleep(3);
 		impress.click(5,5);
@@ -255,7 +252,7 @@ public class BVTFunction {
 //		assertEquals(new Rectangle(0,0,64,64), rectangle);
 		
 		//insert another picture 
-		impress.menuItem("Insert->Picture->From File...").select();
+		app.dispatch(".uno:InsertGraphic", 3);
 		submitOpenDlg(bmp_red);
 		sleep(3);
 		impress.click(1, 1);
@@ -268,10 +265,10 @@ public class BVTFunction {
 	@Test
 	public void testSlideShow() throws Exception {
 		String file = testFile("slideshow.odp");
-		startcenter.menuItem("File->Open...").select();
+		app.dispatch(".uno:Open", 3);
 		submitOpenDlg(file);
 		impress.waitForExistence(10, 2);
-		impress.menuItem("Slide Show->Slide Show").select();
+		app.dispatch(".uno:Presentation", 3);
 		sleep(3);
 		Rectangle rectangle = GraphicsUtil.findRectangle(SlideShow.getScreenRectangle(), 0xFFFF0000);
 		assertNotNull("1st slide appears", rectangle);
@@ -295,10 +292,10 @@ public class BVTFunction {
 	@Test
 	public void testFind() {
 		String file = testFile("find.odt");
-		startcenter.menuItem("File->Open...").select();
+		app.dispatch(".uno:Open", 3);
 		submitOpenDlg(file);
 		writer.waitForExistence(10, 2);
-		writer.menuItem("Edit->Find & Replace...").select();
+		app.dispatch(".uno:SearchDialog", 3);
 		FindDlg_For.setText("OpenOffice");
 		FindDlg_Find.click();
 		sleep(1);
@@ -316,7 +313,7 @@ public class BVTFunction {
 		msgbox("Search key replaced 3 times.").ok();
 		FindDlg.close();
 		sleep(1);
-		writer.menuItem("Edit->Select All").select();
+		app.dispatch(".uno:SelectAll", 3);
 		typeKeys("<$copy>");
 		assertEquals("Apache Awesome OpenOffice is comprised of six personal productivity applications:
a word processor (and its web-authoring component), spreadsheet, presentation graphics, drawing,
equation editor, and database. Awesome OpenOffice is released on Windows, Solaris, Linux and
Macintosh operation systems, with more communities joining, including a mature FreeBSD port.
Awesome OpenOffice is localized, supporting over 110 languages worldwide. ", app.getClipboard());
 	}
@@ -357,38 +354,38 @@ public class BVTFunction {
 
 		};
 		//Create a new text document
-		startcenter.menuItem("File->New->Spreadsheet").select();
+		app.dispatch("private:factory/scalc", 3);
 		sleep(3);
 		
 		CalcUtil.selectRange("C5");
 		typeKeys("1<enter>");
 		CalcUtil.selectRange("C5:C10");
-		calc.menuItem("Edit->Fill->Down").select();
+		app.dispatch(".uno:FillDown", 3);
 		assertArrayEquals("Fill Down:", expected1, CalcUtil.getCellTexts("C5:C10"));
 		
 		CalcUtil.selectRange("D10");
 		typeKeys("2<enter>");
 		CalcUtil.selectRange("D5:D10");
-		calc.menuItem("Edit->Fill->Up").select();
+		app.dispatch(".uno:FillUp", 3);
 		assertArrayEquals("Fill Up:", expected2, CalcUtil.getCellTexts("D5:D10"));
 		
 		CalcUtil.selectRange("A1");
 		typeKeys("Hi friends<enter>");
 		CalcUtil.selectRange("A1:D1");
-		calc.menuItem("Edit->Fill->Right").select();
+		app.dispatch(".uno:FillRight", 3);
 		assertArrayEquals("Fill Right:", expected3, CalcUtil.getCellTexts("A1:D1"));
 		
 		CalcUtil.selectRange("D2");
 		typeKeys("99999.999<enter>");
 		CalcUtil.selectRange("A2:D2");
-		calc.menuItem("Edit->Fill->Left").select();
+		app.dispatch(".uno:FillLeft", 3);
 		assertArrayEquals("Fill left:", expected4, CalcUtil.getCellTexts("A2:D2"));
 
 		CalcUtil.selectRange("E1");
 		typeKeys("99999.999<tab>-10<enter>");
 		
 		CalcUtil.selectRange("E1:F5");
-		calc.menuItem("Edit->Fill->Series...").select();
+		app.dispatch(".uno:FillSeries", 3);
 		FillSeriesDlg.ok();
 		sleep(1);
 		assertArrayEquals("Fill series..", expected5, CalcUtil.getCellTexts("E1:F5"));
@@ -435,40 +432,40 @@ public class BVTFunction {
 
 		};
 		String file = testFile("sort.ods");
-		startcenter.menuItem("File->Open...").select();
+		app.dispatch(".uno:Open", 3);
 		submitOpenDlg(file);
 		calc.waitForExistence(10, 2);
 		CalcUtil.selectRange("A1:A10");
-		calc.menuItem("Data->Sort...").select();
+		app.dispatch(".uno:DataSort");
 		SortWarningDlg_Current.click();
-		assertEquals("Column A", SortPage_By1.getSelText());
+		assertEquals(1, SortPage_By1.getSelIndex());
 		SortPage.ok();
 		sleep(1);
 		assertArrayEquals("Sorted Data", expected1, CalcUtil.getCellTexts("A1:A10"));
 		CalcUtil.selectRange("B1:C10");
-		calc.menuItem("Data->Sort...").select();
+		app.dispatch(".uno:DataSort");
 
-		SortPage_By1.select("Column C");
+		SortPage_By1.select(2);
 		SortPage_Descending1.check();
 		assertFalse(SortPage_By3.isEnabled());
 		assertFalse(SortPage_Ascending3.isEnabled());
 		assertFalse(SortPage_Descending3.isEnabled());
-		SortPage_By2.select("Column B");
+		SortPage_By2.select(1);
 		assertTrue(SortPage_By3.isEnabled());
 		assertTrue(SortPage_Ascending3.isEnabled());
 		assertTrue(SortPage_Descending3.isEnabled());
 		SortPage_Descending2.check();
-		SortPage_By2.select("- undefined -");
+		SortPage_By2.select(0);
 		assertFalse(SortPage_By3.isEnabled());
 		assertFalse(SortPage_Ascending3.isEnabled());
 		assertFalse(SortPage_Descending3.isEnabled());
-		SortPage_By2.select("Column B");
+		SortPage_By2.select(1);
 		SortPage.ok();
 		sleep(1);
 		
 		assertArrayEquals("Sorted Data", expected2, CalcUtil.getCellTexts("B1:C10"));
 		CalcUtil.selectRange("D1:D7");
-		calc.menuItem("Data->Sort...").select();
+		app.dispatch(".uno:DataSort");
 		SortWarningDlg_Current.click();
 		SortOptionsPage.select();
 		SortOptionsPage_RangeContainsColumnLabels.uncheck();
@@ -479,7 +476,7 @@ public class BVTFunction {
 		assertArrayEquals("Sorted Data", expected3, CalcUtil.getCellTexts("D1:D7"));
 		
 		CalcUtil.selectRange("E1:E10");
-		calc.menuItem("Data->Sort...").select();
+		app.dispatch(".uno:DataSort");
 		SortWarningDlg_Current.click();
 		SortPage.ok();
 		sleep(1);
@@ -497,11 +494,11 @@ public class BVTFunction {
 	public void testInsertChartInDraw() throws Exception{
 		
 		// Create a new drawing document
-		startcenter.menuItem("File->New->Drawing").select();
+		app.dispatch("private:factory/sdraw", 3);
 		sleep(3);
 		
 		// Insert a chart
-		draw.menuItem("Insert->Chart...").select();
+		app.dispatch(".uno:InsertObjectChart", 3);
 		sleep(3);
 		
 		// Verify if the chart is inserted successfully
@@ -522,11 +519,11 @@ public class BVTFunction {
 	public void testInsertChartInDocument() throws Exception{
 		
 		// Create a new text document
-		startcenter.menuItem("File->New->Text Document").select();
+		app.dispatch("private:factory/swriter", 3);
 		sleep(3);
 		
 		// Insert a chart
-		writer.menuItem("Insert->Object->Chart...").select();
+		app.dispatch(".uno:InsertObjectChart", 3);
 		sleep(3);
 		
 		// Verify if the chart is inserted successfully
@@ -547,11 +544,11 @@ public class BVTFunction {
 	public void testInsertChartInSpreadsheet() throws Exception{
 		
 		// Create a new spreadsheet document
-		startcenter.menuItem("File->New->Spreadsheet").select();
+		app.dispatch("private:factory/scalc", 3);
 		sleep(3);
 		
 		// Insert a chart
-		calc.menuItem("Insert->Chart...").select();
+		app.dispatch(".uno:InsertObjectChart", 3);
 		sleep(3);
 		Chart_Wizard.ok();
 		
@@ -573,12 +570,12 @@ public class BVTFunction {
 	public void testInsertChartInPresentation() throws Exception{
 		
 		// Create a new presentation document
-		startcenter.menuItem("File->New->Presentation").select();
+		app.dispatch("private:factory/simpress?slot=6686");
 		PresentationWizard.ok();
 		sleep(3);
 		
 		// Insert a chart
-		impress.menuItem("Insert->Chart...").select();
+		app.dispatch(".uno:InsertObjectChart", 3);
 		sleep(3);
 		
 		// Verify if the chart is inserted successfully
@@ -599,19 +596,17 @@ public class BVTFunction {
 	public void testInsertTableInDraw() throws Exception{
 		
 		// Create a new drawing document
-		startcenter.menuItem("File->New->Drawing").select();
+		app.dispatch("private:factory/sdraw", 3);
 		sleep(3);
 		
 		// Insert a table
-		draw.menuItem("Insert->Table...").select();
+		app.dispatch(".uno:InsertTable", 3);
 		InsertTable.ok();
 		sleep(3);
 		
 		// Verify if the table toolbar is active
-//		assertTrue(Table_Toolbar.exists(3));
+		assertTrue(Table_Toolbar.exists(3));
 		
-		// Check the statusbar to verify if the table is inserted successfully
-		assertEquals("Table selected", StatusBar.getItemText(0));
 		// Focus on edit pane
 		draw.click(5,5);
 		sleep(1);
@@ -628,19 +623,19 @@ public class BVTFunction {
 	public void testInsertTableInDocument() throws Exception{
 		
 		// Create a new text document
-		startcenter.menuItem("File->New->Text Document").select();
+		app.dispatch("private:factory/swriter", 3);
 		sleep(3);
 		
 		// Insert a table
-		writer.menuItem("Insert->Table...").select();
+		app.dispatch(".uno:InsertTable", 3);
 		writer_InsertTable.ok();
 		sleep(3);
 		
 		// Verify if the table toolbar is active
 		assertTrue(Table_Toolbar.exists(3));
 		
-		// Check the statusbar to verify if the table is inserted successfully
-		assertEquals("Table1:A1", StatusBar.getItemText(7));
+//		// Check the statusbar to verify if the table is inserted successfully
+//		assertEquals("Table1:A1", StatusBar.getItemText(7));
 		// Focus on edit pane
 		writer.click(5,5);
 		sleep(1);
@@ -657,20 +652,20 @@ public class BVTFunction {
 	public void testInsertTableInPresentation() throws Exception{
 		
 		// Create a new presentation document
-		startcenter.menuItem("File->New->Presentation").select();
+		app.dispatch("private:factory/simpress?slot=6686");
 		PresentationWizard.ok();
 		sleep(3);
 		
 		// Insert a table
-		impress.menuItem("Insert->Table...").select();
+		app.dispatch(".uno:InsertTable", 3);
 		InsertTable.ok();
 		sleep(3);
 		
 		// Verify if the table toolbar is active
 		assertTrue(Table_Toolbar.exists(3));
 		
-		// Check the statusbar to verify if the table is inserted successfully
-		assertEquals("Table selected", StatusBar.getItemText(0));
+//		// Check the statusbar to verify if the table is inserted successfully
+//		assertEquals("Table selected", StatusBar.getItemText(0));
 		// Focus on edit pane
 		impress.click(5,5);
 		sleep(1);
@@ -688,7 +683,7 @@ public class BVTFunction {
 	public void testInsertFunctionInSCViaSumButton() throws Exception{
 		
 		// Create a new spreadsheet document
-		startcenter.menuItem("File->New->Spreadsheet").select();
+		app.dispatch("private:factory/scalc", 3);
 		sleep(3);
 		
 		// Insert source numbers
@@ -720,7 +715,7 @@ public class BVTFunction {
 	public void testInsertFunctionInSCViaInputbar() throws Exception{
 		
 		// Create a new spreadsheet document
-		startcenter.menuItem("File->New->Spreadsheet").select();
+		app.dispatch("private:factory/scalc", 3);
 		sleep(3);
 		
 		// Insert source numbers and expected result
@@ -752,7 +747,7 @@ public class BVTFunction {
 	public void testInsertFunctionInSCViaFunctionWizard() throws Exception{
 		
 		// Create a new spreadsheet document
-		startcenter.menuItem("File->New->Spreadsheet").select();
+		app.dispatch("private:factory/scalc", 3);
 		sleep(3);
 		
 		// Insert source number
@@ -764,7 +759,7 @@ public class BVTFunction {
 		
 		// Insert a function via Function Wizard Dialog: ABS
 		CalcUtil.selectRange("B1");
-		calc.menuItem("Insert->Function...").select();
+		app.dispatch(".uno:FunctionDialog", 3);
 		SC_FunctionWizardDlg_FunctionList.doubleClick(5,5);
 
 		SC_FunctionWizardDlg_Edit1.inputKeys("A1");

Modified: incubator/ooo/trunk/main/test/testoo/src/testcase/SmokeTest.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/test/testoo/src/testcase/SmokeTest.java?rev=1358910&r1=1358909&r2=1358910&view=diff
==============================================================================
--- incubator/ooo/trunk/main/test/testoo/src/testcase/SmokeTest.java (original)
+++ incubator/ooo/trunk/main/test/testoo/src/testcase/SmokeTest.java Mon Jul  9 04:59:21 2012
@@ -55,7 +55,7 @@ public class SmokeTest {
 		testFile("TestExtension.oxt");
 		String file = testFile("smoketestdoc.sxw");
 		// Open sample file smoketestdoc.sxw
-		startcenter.menuItem("File->Open...").select();
+		app.dispatch(".uno:Open", 3);
 		submitOpenDlg(file);
 		writer.waitForEnabled(10, 2);
 		// Run test cases

Modified: incubator/ooo/trunk/main/test/testoo/src/testcase/sc/sort/SortOptionsIncludeFormats.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/test/testoo/src/testcase/sc/sort/SortOptionsIncludeFormats.java?rev=1358910&r1=1358909&r2=1358910&view=diff
==============================================================================
--- incubator/ooo/trunk/main/test/testoo/src/testcase/sc/sort/SortOptionsIncludeFormats.java
(original)
+++ incubator/ooo/trunk/main/test/testoo/src/testcase/sc/sort/SortOptionsIncludeFormats.java
Mon Jul  9 04:59:21 2012
@@ -92,29 +92,29 @@ public class SortOptionsIncludeFormats {
 		String[][] dataWithCurrencyFormats = new String[][] {
 				{"Units"},
 				{"$32.00"},
-				{"57.00 €"},
-				{"₤ 74"},
+				{"57.00 \u20ac"},
+				{"\u20a4 74"},
 				{"R$ 50.00"},
-				{"ج.م. 27.00"},
-				{"7.00 руб."},
+				{"\u062c.\u0645. 27.00"},
+				{"7.00 \u0440\u0443\u0431."},
 		};
 		String[][] expectedSortedResultIncludeFormat = new String[][] {
 				{"Units"},
-				{"7.00 руб."},
-				{"ج.م. 27.00"},
+				{"7.00 \u0440\u0443\u0431."},
+				{"\u062c.\u0645. 27.00"},
 				{"$32.00"},
 				{"R$ 50.00"},
-				{"57.00 €"},
-				{"₤ 74"},
+				{"57.00 \u20ac"},
+				{"\u20a4 74"},
 		};
 		String[][] expectedSortedResultExcludeFormat = new String[][] {
 				{"Units"},
 				{"$7.00"},
-				{"27.00 €"},
-				{"₤ 32"},
+				{"27.00 \u20ac"},
+				{"\u20a4 32"},
 				{"R$ 50.00"},
-				{"ج.م. 57.00"},
-				{"74.00 руб."},
+				{"\u062c.\u0645. 57.00"},
+				{"74.00 \u0440\u0443\u0431."},
 		};
 		CalcUtil.selectRange("A1");
 		typeKeys("Units<down>32<down>57<down>74<down>50<down>27<down>7");
@@ -131,13 +131,13 @@ public class SortOptionsIncludeFormats {
 		typeKeys("<ctrl 1>");
 		FormatCellsDlg_NumbersPage.select();
 		FormatCellsDlg_NumbersPageCategory.select("Currency");
-		FormatCellsDlg_NumbersPageCurrencyFormat.select("€ Spanish (Spain)");
+		FormatCellsDlg_NumbersPageCurrencyFormat.select("\u20ac Spanish (Spain)");
 		FormatCellsDlg_NumbersPage.ok();
 		CalcUtil.selectRange("A4");
 		typeKeys("<ctrl 1>");
 		FormatCellsDlg_NumbersPage.select();
 		FormatCellsDlg_NumbersPageCategory.select("Currency");
-		FormatCellsDlg_NumbersPageCurrencyFormat.select("₤ Latin");
+		FormatCellsDlg_NumbersPageCurrencyFormat.select("\u20a4 Latin");
 		FormatCellsDlg_NumbersPage.ok();		
 		CalcUtil.selectRange("A5");
 		typeKeys("<ctrl 1>");
@@ -149,13 +149,13 @@ public class SortOptionsIncludeFormats {
 		typeKeys("<ctrl 1>");
 		FormatCellsDlg_NumbersPage.select();
 		FormatCellsDlg_NumbersPageCategory.select("Currency");
-		FormatCellsDlg_NumbersPageCurrencyFormat.select("ج.م. Arabic (Egypt)");
+		FormatCellsDlg_NumbersPageCurrencyFormat.select("\u062c.\u0645. Arabic (Egypt)");
 		FormatCellsDlg_NumbersPage.ok();	
 		CalcUtil.selectRange("A7");
 		typeKeys("<ctrl 1>");
 		FormatCellsDlg_NumbersPage.select();
 		FormatCellsDlg_NumbersPageCategory.select("Currency");
-		FormatCellsDlg_NumbersPageCurrencyFormat.select("руб. Russian");
+		FormatCellsDlg_NumbersPageCurrencyFormat.select("\u0440\u0443\u0431. Russian");
 		FormatCellsDlg_NumbersPage.ok();	
 		
 		// "Data->Sort...", check "Range contains column labels", check "Include formats", sort
first by "Units", "Ascending"

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=1358910&r1=1358909&r2=1358910&view=diff
==============================================================================
--- incubator/ooo/trunk/main/test/testoo/src/testlib/UIMap.java (original)
+++ incubator/ooo/trunk/main/test/testoo/src/testlib/UIMap.java Mon Jul  9 04:59:21 2012
@@ -200,8 +200,8 @@ public class UIMap {
 	public static final VclComboBox math_EditSymbolsDlgSymbol = combobox("starmath:ComboBox:RID_SYMDEFINEDIALOG:4");
 	public static final VclListBox math_EditSymbolsDlgFont = listbox("starmath:ListBox:RID_SYMDEFINEDIALOG:1");
 	public static final VclComboBox math_EditSymbolsDlgTypeface = combobox("starmath:ComboBox:RID_SYMDEFINEDIALOG:3");
-	public static final VclDialog Wizards_AgendaDialog = dialog("41051");
-	public static final VclButton Wizards_AgendaDialog_FinishButton = button("41055");
+	public static final VclDialog Wizards_AgendaDialog = dialog("WIZARDS_HID_AGWIZ");
+	public static final VclButton Wizards_AgendaDialog_FinishButton = button("WIZARDS_HID_AGWIZ_CREATE");
 	public static final VclTabPage MacroDialogsPage = tabpage("basctl:TabPage:RID_TP_DLGS");
 	public static final VclDialog AboutDialog = dialog(".uno:About");
 	public static final VclButton math_ElementsRelations = button("STARMATH_HID_SMA_RELATIONS_CAT");



Mime
View raw message