You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by le...@apache.org on 2012/06/27 04:24:18 UTC
svn commit: r1354315 [3/3] - in /incubator/ooo/trunk/main/test:
testassistant.feature/ testassistant/ testassistant/.settings/
testassistant/META-INF/ testassistant/icons/ testassistant/lib/
testassistant/src/ testassistant/src/org/ testassistant/src/o...
Modified: incubator/ooo/trunk/main/test/testoo/prj/build.lst
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/test/testoo/prj/build.lst?rev=1354315&r1=1354314&r2=1354315&view=diff
==============================================================================
--- incubator/ooo/trunk/main/test/testoo/prj/build.lst (original)
+++ incubator/ooo/trunk/main/test/testoo/prj/build.lst Wed Jun 27 02:24:12 2012
@@ -1,2 +1,2 @@
-atest test :: testgui NULL
+atest test :: testcommon NULL
atest test nmake - all test_all NULL
Modified: incubator/ooo/trunk/main/test/testoo/readme.txt
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/test/testoo/readme.txt?rev=1354315&r1=1354314&r2=1354315&view=diff
==============================================================================
--- incubator/ooo/trunk/main/test/testoo/readme.txt (original)
+++ incubator/ooo/trunk/main/test/testoo/readme.txt Wed Jun 27 02:24:12 2012
@@ -1 +1,5 @@
-The Java library enables developers to use Java to write automated GUI testing.
\ No newline at end of file
+The module stores GUI testing scripts. It's an eclipse project. Setup the project with the following steps:
+1. Open eclipse and then click menu "File -> Import...".
+2. Select "General -> Existing Projects into Workspace", click "Next", and then select the parent directory of this module as root directory.
+3. Choose "testcommon" and "testscript", and then click "Finish".
+4. Download JUnit-4.10.jar (Version MUST be higher than 4.10) into testscript/output/lib/junit.jar and then refresh the project.
\ No newline at end of file
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=1354315&r1=1354314&r2=1354315&view=diff
==============================================================================
--- incubator/ooo/trunk/main/test/testoo/src/testcase/BVTFileType.java (original)
+++ incubator/ooo/trunk/main/test/testoo/src/testcase/BVTFileType.java Wed Jun 27 02:24:12 2012
@@ -12,19 +12,13 @@
*/
package testcase;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.openoffice.test.vcl.Tester.sleep;
-import static org.openoffice.test.vcl.Tester.typeKeys;
-import static org.openoffice.test.vcl.Tester.typeText;
+import static org.junit.Assert.*;
+import static org.openoffice.test.vcl.Tester.*;
import static testlib.AppUtil.*;
import static testlib.UIMap.*;
import java.awt.Rectangle;
-
-import org.junit.After;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.Before;
@@ -110,7 +104,8 @@ public class BVTFileType {
// Set the text style
writer.openContextMenu();
- menuItem("Text Properties...").select();
+// menuItem("Text Properties...").select();
+ menuItem("Character...").select();
EffectsPage.select();
EffectsPage_Color.select("Magenta");
EffectsPage.ok();
@@ -120,8 +115,8 @@ public class BVTFileType {
writer.menuItem("File->Save As...").select();
FileUtil.deleteFile(saveTo);
submitSaveDlg(saveTo);
- if (dialog("33388").exists(3))
- dialog("33388").ok();
+ if (AlienFormatDlg.exists(3))
+ AlienFormatDlg.ok();
// Close it by clicking main menu
@@ -231,8 +226,8 @@ public class BVTFileType {
String saveTo = fullPath("temp/" + file);
String text = "Hello Openoffice";
startcenter.menuItem("File->New->Presentation").select();
- impress.waitForExistence(10, 2);
- sleep(2);
+ PresentationWizard.ok();
+ impress.click(0.01, 0.01);
typeKeys(text);
sleep(2);
impress.doubleClick(0.1, 0.5);
@@ -257,7 +252,7 @@ public class BVTFileType {
typeKeys("<$copy>");
sleep(1);
Assert.assertEquals("The typed text is saved!", text,
- app.getClipboard());
+ app.getClipboard().trim());
}
// drawing
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=1354315&r1=1354314&r2=1354315&view=diff
==============================================================================
--- incubator/ooo/trunk/main/test/testoo/src/testcase/BVTFunction.java (original)
+++ incubator/ooo/trunk/main/test/testoo/src/testcase/BVTFunction.java Wed Jun 27 02:24:12 2012
@@ -12,16 +12,14 @@
*/
package testcase;
+import static org.junit.Assert.*;
+import static org.openoffice.test.vcl.Tester.*;
import static testlib.AppUtil.*;
import static testlib.UIMap.*;
import java.awt.Rectangle;
import java.io.File;
-import org.junit.After;
-import static org.junit.Assert.*;
-import static org.openoffice.test.vcl.Tester.*;
-
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.Ignore;
@@ -29,6 +27,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.openoffice.test.common.FileUtil;
import org.openoffice.test.common.GraphicsUtil;
+import org.openoffice.test.common.SystemUtil;
import testlib.CalcUtil;
import testlib.Log;
@@ -84,7 +83,7 @@ public class BVTFunction {
//Create a new text document
startcenter.menuItem("File->New->Text Document").select();
sleep(3);
- writer.menuItem("File->Print").select();
+ writer.menuItem("File->Print...").select();
assertTrue(File_PrintDlg.exists(5));
File_PrintDlg.cancel();
}
@@ -94,6 +93,7 @@ public class BVTFunction {
*
*/
@Test
+ @Ignore
public void testJavaDialog()
{
@@ -135,7 +135,11 @@ public class BVTFunction {
@Test
public void testAboutDialog()
{
- startcenter.menuItem("Help->About OpenOffice.org").select();
+ if (SystemUtil.isMac()) {
+ app.dispatch(".uno:About");
+ } else {
+ startcenter.menuItem("Help->About OpenOffice.org").select();
+ }
assertTrue(AboutDialog.exists(5));
AboutDialog.ok();
}
@@ -220,6 +224,7 @@ public class BVTFunction {
//Create a new text document
startcenter.menuItem("File->New->Presentation").select();
+ PresentationWizard.ok();
sleep(3);
//Insert a picture fully filled with green
@@ -370,9 +375,7 @@ public class BVTFunction {
CalcUtil.selectRange("E1:F5");
calc.menuItem("Edit->Fill->Series...").select();
- assertTrue(button("1493549573").isChecked());
- assertFalse(button("1493549571").isChecked());
- dialog("26229").ok();
+ FillSeriesDlg.ok();
sleep(1);
assertArrayEquals("Fill series..", expected5, CalcUtil.getCellTexts("E1:F5"));
}
@@ -423,44 +426,48 @@ public class BVTFunction {
calc.waitForExistence(10, 2);
CalcUtil.selectRange("A1:A10");
calc.menuItem("Data->Sort...").select();
- assertEquals("Column A", listbox("956468740").getSelText());
- tabpage("58873").ok();
+ SortWarningDlg_Current.click();
+ assertEquals("Column A", SortPage_By1.getSelText());
+ SortPage.ok();
sleep(1);
assertArrayEquals("Sorted Data", expected1, CalcUtil.getCellTexts("A1:A10"));
CalcUtil.selectRange("B1:C10");
calc.menuItem("Data->Sort...").select();
- listbox("956468740").select("Column C");
- button("956465674").check();
- assertFalse(listbox("956468742").isEnabled());
- assertFalse(button("956465673").isEnabled());
- assertFalse(button("956465676").isEnabled());
- listbox("956468741").select("Column B");
- assertTrue(listbox("956468742").isEnabled());
- assertTrue(button("956465673").isEnabled());
- assertTrue(button("956465676").isEnabled());
- button("956465675").check();
- listbox("956468741").select("- undefined -");
- assertFalse(listbox("956468742").isEnabled());
- assertFalse(button("956465673").isEnabled());
- assertFalse(button("956465676").isEnabled());
- listbox("956468741").select("Column B");
- tabpage("58873").ok();
+
+ SortPage_By1.select("Column C");
+ SortPage_Descending1.check();
+ assertFalse(SortPage_By3.isEnabled());
+ assertFalse(SortPage_Ascending3.isEnabled());
+ assertFalse(SortPage_Descending3.isEnabled());
+ SortPage_By2.select("Column B");
+ assertTrue(SortPage_By3.isEnabled());
+ assertTrue(SortPage_Ascending3.isEnabled());
+ assertTrue(SortPage_Descending3.isEnabled());
+ SortPage_Descending2.check();
+ SortPage_By2.select("- undefined -");
+ assertFalse(SortPage_By3.isEnabled());
+ assertFalse(SortPage_Ascending3.isEnabled());
+ assertFalse(SortPage_Descending3.isEnabled());
+ SortPage_By2.select("Column B");
+ SortPage.ok();
sleep(1);
assertArrayEquals("Sorted Data", expected2, CalcUtil.getCellTexts("B1:C10"));
CalcUtil.selectRange("D1:D7");
calc.menuItem("Data->Sort...").select();
- tabpage("58874").select();
- button("956482569").uncheck();
- button("956482567").check();
- listbox("956485122").select("Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday");
- tabpage("58874").ok();
+ SortWarningDlg_Current.click();
+ SortOptionsPage.select();
+ SortOptionsPage_RangeContainsColumnLabels.uncheck();
+ SortOptionsPage_CustomSortOrder.check();
+ SortOptionsPage_CustomSortOrderList.select("Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday");
+ SortOptionsPage.ok();
sleep(1);
assertArrayEquals("Sorted Data", expected3, CalcUtil.getCellTexts("D1:D7"));
CalcUtil.selectRange("E1:E10");
calc.menuItem("Data->Sort...").select();
- tabpage("58873").ok();
+ SortWarningDlg_Current.click();
+ SortPage.ok();
sleep(1);
assertArrayEquals("Sorted Data", expected4, CalcUtil.getCellTexts("E1:E10"));
}
Modified: incubator/ooo/trunk/main/test/testoo/src/testcase/BVTFunction2.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/test/testoo/src/testcase/BVTFunction2.java?rev=1354315&r1=1354314&r2=1354315&view=diff
==============================================================================
--- incubator/ooo/trunk/main/test/testoo/src/testcase/BVTFunction2.java (original)
+++ incubator/ooo/trunk/main/test/testoo/src/testcase/BVTFunction2.java Wed Jun 27 02:24:12 2012
@@ -12,23 +12,16 @@
*/
package testcase;
-import static testlib.AppUtil.*;
-import static testlib.UIMap.*;
-
-import java.awt.Rectangle;
-import java.io.File;
-
-import org.junit.After;
import static org.junit.Assert.*;
import static org.openoffice.test.vcl.Tester.*;
+import static testlib.AppUtil.*;
+import static testlib.UIMap.*;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
-import org.openoffice.test.common.FileUtil;
-import org.openoffice.test.common.GraphicsUtil;
import testlib.CalcUtil;
import testlib.Log;
@@ -148,6 +141,7 @@ public class BVTFunction2 {
// Create a new presentation document
startcenter.menuItem("File->New->Presentation").select();
+ PresentationWizard.ok();
sleep(3);
// Insert a chart
@@ -181,7 +175,7 @@ public class BVTFunction2 {
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));
@@ -231,6 +225,7 @@ public class BVTFunction2 {
// Create a new presentation document
startcenter.menuItem("File->New->Presentation").select();
+ PresentationWizard.ok();
sleep(3);
// Insert a table
Added: incubator/ooo/trunk/main/test/testoo/src/testcase/LongRun.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/test/testoo/src/testcase/LongRun.java?rev=1354315&view=auto
==============================================================================
--- incubator/ooo/trunk/main/test/testoo/src/testcase/LongRun.java (added)
+++ incubator/ooo/trunk/main/test/testoo/src/testcase/LongRun.java Wed Jun 27 02:24:12 2012
@@ -0,0 +1,346 @@
+package testcase;
+import static org.junit.Assert.*;
+import static org.openoffice.test.vcl.Tester.*;
+import static testlib.AppUtil.*;
+import static testlib.UIMap.*;
+
+import java.awt.Rectangle;
+import java.awt.image.BufferedImage;
+
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.openoffice.test.common.Condition;
+import org.openoffice.test.common.FileUtil;
+import org.openoffice.test.common.GraphicsUtil;
+import org.openoffice.test.common.SystemUtil;
+
+import testlib.CalcUtil;
+import testlib.Log;
+
+public class LongRun {
+
+ @Rule
+ public Log LOG = new Log();
+
+ /**
+ * @throws java.lang.Exception
+ */
+ @Before
+ public void setUp() throws Exception {
+ initApp();
+ }
+
+ Rectangle rect = new Rectangle(400, 200, 60, 60);
+ Condition condition = new Condition() {
+ @Override
+ public boolean value() {
+ BufferedImage image = GraphicsUtil.screenshot(rect);
+ for (int x = 0; x < image.getWidth();x++) {
+ for (int y = 0; y < image.getHeight();y++) {
+ if (image.getRGB(x, y) == 0xFF000000) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ };
+
+ /**
+ * Test New/Save a text document
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testLongRun() throws Exception {
+ startcenter.menuItem("File->New->Text Document").select();
+ writer.focus();
+ typeText("Long-running test...");
+// for (int i = 0; i < 1000000; i++) {
+// long start = System.currentTimeMillis();
+// calc.menuItem("File->New->Spreadsheet").select();
+//// Tester.click(840, 420);
+//// sleep(1);
+//
+//// condition.waitForTrue("Time out to wait the control to be enabled!", 5, 0.5);
+//// Tester.click(400, 200);
+//// // Close it by clicking main menu
+// calc.menuItem("File->Close").select();
+//// app.dispatch(".uno:CloseDoc");
+//// sleep(0.3);
+//// System.out.println(calc.getScreenRectangle());
+//// Tester.click(1670, 70);
+// long end = System.currentTimeMillis();
+// System.out.println("Iterator: " + i + ", Elapsed Hours: " + ((end - start)));
+// //
+// // // sleep(1);
+// }
+
+// app.reset();
+
+ for(int i = 0 ; i < 1000; i++){
+ long start = System.currentTimeMillis();
+ saveNewDocument("helloworld_saveas.odt");
+ saveNewDocument("helloworld_saveas.ott");
+ saveNewDocument("helloworld_saveas.sxw");
+ saveNewDocument("helloworld_saveas.stw");
+ saveNewDocument("helloworld_saveas.doc");
+ saveNewDocument("helloworld_saveas.txt");
+ saveNewSpreadsheet("helloworld_saveas.ods");
+ saveNewSpreadsheet("helloworld_saveas.ots");
+ saveNewSpreadsheet("helloworld_saveas.sxc");
+ saveNewSpreadsheet("helloworld_saveas.stc");
+ saveNewSpreadsheet("helloworld_saveas.xls");
+ saveNewPresentation("helloworld_saveas.odp");
+ saveNewPresentation("helloworld_saveas.otp");
+ saveNewPresentation("helloworld_saveas.ppt");
+ saveNewPresentation("helloworld_saveas.pot");
+ saveNewPresentation("helloworld_saveas.sxi");
+ saveNewPresentation("helloworld_saveas.sti");
+ saveNewMath("math_saveas.sxm");
+ saveNewMath("math_saveas.mml");
+ saveNewDrawing("draw_saveas.odg");
+ saveNewDrawing("draw_saveas.otg");
+ saveNewDrawing("draw_saveas.sxd");
+ saveNewDrawing("draw_saveas.std");
+ long end = System.currentTimeMillis();
+ LOG.info("Iterator: " + i + ", Elapsed Hours: " + ((end - start) / 3600000));
+ SystemUtil.execScript("ps -eo vsz,rss,comm | grep soffice.bin", false);
+ }
+ }
+
+ private void saveNewDocument(String file) {
+ String saveTo = fullPath("temp/" + file);
+ // Create a new text document
+ writer.menuItem("File->New->Text Document").select();
+ sleep(3);
+
+ // Input some text by keyboard
+ writer.focus();
+
+ String text = "~!@#$%^&*()_+QWERTYUIOP{}|:LKJHGFDSAZXCVBNM<>? ";
+ typeText(text);
+ writer.menuItem("Edit->Select All").select();
+ app.setClipboard(".wrong");
+ sleep(1);
+ typeKeys("<$copy>");
+ sleep(1);
+
+ // Verify the text via system clip board
+ Assert.assertEquals("The typed text into writer", text,
+ app.getClipboard());
+
+ // Set the text style
+ writer.openContextMenu();
+ menuItem("Character...").select();
+ EffectsPage.select();
+ EffectsPage_Color.select("Magenta");
+ EffectsPage.ok();
+ sleep(2);
+
+ // Save the text document
+ writer.menuItem("File->Save As...").select();
+ FileUtil.deleteFile(saveTo);
+ submitSaveDlg(saveTo);
+ if (AlienFormatDlg.exists(3))
+ AlienFormatDlg.ok();
+
+ // Close it by clicking main menu
+ writer.menuItem("File->Close").select();
+// openStartcenter();
+ // Reopen the saved file
+ writer.menuItem("File->Open...").select();
+ submitOpenDlg(saveTo);
+ writer.waitForExistence(10, 2);
+
+ writer.menuItem("Edit->Select All").select();
+ app.setClipboard(".wrong");
+ typeKeys("<$copy>");
+ sleep(1);
+ // Verify if the text still exists in the file
+ Assert.assertEquals("The typed text into writer is saved!", text,
+ app.getClipboard());
+ writer.menuItem("File->Close").select();
+ }
+
+ private void saveNewSpreadsheet(String file) {
+ String saveTo = fullPath("temp/" + file);
+ String text = "Hello Openoffice";
+ writer.menuItem("File->New->Spreadsheet").select();
+ calc.waitForExistence(10, 2);
+ CalcUtil.selectRange("A65536");
+ typeKeys(text);
+ calc.menuItem("File->Save As...").select();
+ FileUtil.deleteFile(saveTo);
+ submitSaveDlg(saveTo);
+ if (AlienFormatDlg.exists(3))
+ AlienFormatDlg.ok();
+ // Close it by clicking main menu
+ calc.menuItem("File->Close").select();
+// openStartcenter();
+ // Reopen the saved file
+ writer.menuItem("File->Open...").select();
+ submitOpenDlg(saveTo);
+ calc.waitForExistence(10, 2);
+ Assert.assertEquals("The typed text is saved!", text,
+ CalcUtil.getCellText("A65536"));
+ calc.menuItem("File->Close").select();
+ }
+
+ private void saveNewPresentation(String file) {
+ String saveTo = fullPath("temp/" + file);
+ String text = "Hello Openoffice";
+ writer.menuItem("File->New->Presentation").select();
+ PresentationWizard.ok();
+ impress.waitForExistence(10, 2);
+ sleep(2);
+ impress.click(0.01, 0.01);
+ typeKeys(text);
+ sleep(2);
+ impress.doubleClick(0.1, 0.5);
+
+ impress.menuItem("File->Save As...").select();
+ FileUtil.deleteFile(saveTo);
+ submitSaveDlg(saveTo);
+ if (AlienFormatDlg.exists(3))
+ AlienFormatDlg.ok();
+ // Close it by clicking main menu
+ impress.menuItem("File->Close").select();
+// openStartcenter();
+ // Reopen the saved file
+ sleep(2);
+ writer.menuItem("File->Open...").select();
+ submitOpenDlg(saveTo);
+ impress.waitForExistence(10, 2);
+ sleep(2);
+ impress.click(3, 3);
+ typeKeys("<tab><enter>");
+ impress.menuItem("Edit->Select All").select();
+ // app.setClipboard(".wrong");
+ typeKeys("<$copy>");
+ sleep(1);
+ Assert.assertEquals("The typed text is saved!", text,
+ app.getClipboard());
+ impress.menuItem("File->Close").select();
+ }
+
+
+ /**
+ * New/Save a draw document 1. New a draw document 2. Insert a picture 3.
+ * Save it as the input filename 4. Reopen the saved file 5. Check if the
+ * picture is still there
+ *
+ * @param filename
+ * : filename to be saved
+ * @throws Exception
+ */
+ public void saveNewDrawing(String filename) {
+ String saveTo = fullPath("temp/" + filename);
+ String bmp_green = testFile("pure_green_64x64.bmp");
+
+ // Create a new drawing document
+ writer.menuItem("File->New->Drawing").select();
+ sleep(3);
+
+ // Insert a picture fully filled with green
+ draw.menuItem("Insert->Picture->From File...").select();
+ submitOpenDlg(bmp_green);
+ sleep(3);
+ // Focus on edit pane
+ draw.click(5, 5);
+ sleep(1);
+
+ // Verify if the picture is inserted successfully
+ Rectangle rectangle = GraphicsUtil.findRectangle(
+ draw.getScreenRectangle(), 0xFF00FF00);
+ assertNotNull("Green rectangle: " + rectangle, rectangle);
+
+ // Save the drawing
+ draw.menuItem("File->Save As...").select();
+ FileUtil.deleteFile(saveTo);
+ submitSaveDlg(saveTo);
+ // If the format is supported by OO1.0, ask whether to change to the
+ // latest format
+ if (AlienFormatDlg.exists(3))
+ AlienFormatDlg.ok(); // Keep the current format
+
+ // Close it by clicking main menu
+ draw.menuItem("File->Close").select();
+// openStartcenter();
+
+ // Reopen the saved file
+ writer.menuItem("File->Open...").select();
+ submitOpenDlg(saveTo);
+ draw.waitForExistence(10, 2);
+ draw.click(5, 5);
+ sleep(1);
+ // Verify if the picture still exists in the file
+ Rectangle rectangle1 = GraphicsUtil.findRectangle(
+ draw.getScreenRectangle(), 0xFF00FF00);
+ assertNotNull("Green rectangle: " + rectangle1, rectangle1);
+ draw.menuItem("File->Close").select();
+ }
+
+
+ /**
+ * New/Save a math 1. New a math 2. Insert a formula 3. Save it as the input
+ * filename 4. Reopen the saved file 5. Check if the formula is still there
+ *
+ * @param filename
+ * : filename to be saved
+ * @throws Exception
+ */
+ public void saveNewMath(String filename) {
+ String saveTo = fullPath("temp/" + filename);
+
+ // Create a new math
+ writer.menuItem("File->New->Formula").select();
+ sleep(3);
+
+ // Verify if the Elements window is active
+ assertTrue(math_ElementsWindow.exists(3));
+
+ // Insert a formula
+ String text = "5 times 3 = 15";
+ typeText(text);
+ math_EditWindow.menuItem("Edit->Select All").select();
+ typeKeys("<$copy>");
+ sleep(1);
+
+ // Verify the text via system clip board
+ assertEquals("The typed formula into math", text, app.getClipboard());
+
+ // Save the formula
+ math_EditWindow.menuItem("File->Save As...").select();
+ FileUtil.deleteFile(saveTo);
+ submitSaveDlg(saveTo);
+ // If the format is supported by OO1.0, ask whether to change to the
+ // latest format
+ if (AlienFormatDlg.exists(3))
+ AlienFormatDlg.ok(); // Keep the current format
+
+ // Close it by clicking main menu
+ math_EditWindow.menuItem("File->Close").select();
+// openStartcenter();
+
+ // Reopen the saved file
+ writer.menuItem("File->Open...").select();
+ submitOpenDlg(saveTo);
+ math_EditWindow.waitForExistence(10, 2);
+
+ // Verify if the formula still exists in the file
+ math_EditWindow.menuItem("Edit->Select All").select();
+ 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();
+ }
+
+}
Modified: incubator/ooo/trunk/main/test/testoo/src/testcase/SayHelloToOO.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/test/testoo/src/testcase/SayHelloToOO.java?rev=1354315&r1=1354314&r2=1354315&view=diff
==============================================================================
--- incubator/ooo/trunk/main/test/testoo/src/testcase/SayHelloToOO.java (original)
+++ incubator/ooo/trunk/main/test/testoo/src/testcase/SayHelloToOO.java Wed Jun 27 02:24:12 2012
@@ -20,6 +20,12 @@ import org.junit.Test;
import testlib.CalcUtil;
import testlib.Log;
+/**
+ * Before running the testing class, you need specify the AOO location firstly with system property openoffice.home.
+ *
+ * @author test
+ *
+ */
public class SayHelloToOO {
/**
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=1354315&r1=1354314&r2=1354315&view=diff
==============================================================================
--- incubator/ooo/trunk/main/test/testoo/src/testlib/UIMap.java (original)
+++ incubator/ooo/trunk/main/test/testoo/src/testlib/UIMap.java Wed Jun 27 02:24:12 2012
@@ -157,7 +157,7 @@ public class UIMap {
public static final VclButton FindDlg_More = button("svx:MoreButton:RID_SVXDLG_SEARCH:BTN_MORE");
public static final VclWindow chart = window("CHART2_HID_SCH_WIN_DOCUMENT");
public static final VclDialog Chart_Wizard = dialog("CHART2_HID_SCH_CHART_AUTO_FORMAT");
- public static final VclDialog File_PrintDlg = dialog(".HelpId:vcl:PrintDialog:Dialog");
+ public static final VclDialog File_PrintDlg = dialog(".HelpID:vcl:PrintDialog:Dialog");
public static final VclWindow ImpressOutline = window("SD_HID_SDOUTLINEVIEWSHELL");
public static final VclWindow ImpressSlideSorter = window("SD_HID_SD_WIN_DOCUMENT");
public static final VclWindow ImpressHandout = window(".uno:HandoutMode");
@@ -316,4 +316,9 @@ public class UIMap {
public static final VclListBox FormatCellsDlg_NumbersPageCurrencyFormat = listbox("cui:ListBox:RID_SVXPAGE_NUMBERFORMAT:LB_CURRENCY");
public static final VclTabPage DataPilotFieldOptionFiledSubtotalsPage = tabpage("25762");
public static final VclControl SC_DataPilotOptionSubtotalFunctionList = control("59029");
+ public static final VclDialog PresentationWizard = dialog("SD_HID_SD_AUTOPILOT_PAGE1");
+ public static final VclDialog FillSeriesDlg = dialog(".uno:FillSeries");
+ public static final VclDialog SortWarningDlg = dialog("sc:ModalDialog:RID_SCDLG_SORT_WARNING");
+ public static final VclButton SortWarningDlg_Extend = button("sc:PushButton:RID_SCDLG_SORT_WARNING:BTN_EXTSORT");
+ public static final VclButton SortWarningDlg_Current = button("sc:PushButton:RID_SCDLG_SORT_WARNING:BTN_CURSORT");
}