Kaydet (Commit) fdfa8150 authored tarafından Liu Zhe's avatar Liu Zhe

#i120217# VCLAuto patch: Build Verification Test does not support multi-language except en-US.

Patch by: Li Lin Yi
Reviewed by: Liu Zhe
üst 1b6753f0
...@@ -99,7 +99,7 @@ public class BVTFileType { ...@@ -99,7 +99,7 @@ public class BVTFileType {
private void saveNewDocument(String file) { private void saveNewDocument(String file) {
String saveTo = fullPath("temp/" + file); String saveTo = fullPath("temp/" + file);
//Create a new text document //Create a new text document
startcenter.menuItem("File->New->Text Document").select(); app.dispatch("private:factory/swriter", 3);
sleep(3); sleep(3);
// Input some text by keyboard // Input some text by keyboard
...@@ -107,7 +107,7 @@ public class BVTFileType { ...@@ -107,7 +107,7 @@ public class BVTFileType {
String text = "~!@#$%^&*()_+QWERTYUIOP{}|:LKJHGFDSAZXCVBNM<>? "; String text = "~!@#$%^&*()_+QWERTYUIOP{}|:LKJHGFDSAZXCVBNM<>? ";
typeText(text); typeText(text);
writer.menuItem("Edit->Select All").select(); app.dispatch(".uno:SelectAll", 3);
app.setClipboard(".wrong"); app.setClipboard(".wrong");
sleep(1); sleep(1);
typeKeys("<$copy>"); typeKeys("<$copy>");
...@@ -119,14 +119,14 @@ public class BVTFileType { ...@@ -119,14 +119,14 @@ public class BVTFileType {
// Set the text style // Set the text style
writer.openContextMenu(); writer.openContextMenu();
// menuItem("Text Properties...").select(); // menuItem("Text Properties...").select();
menuItem("Character...").select(); app.dispatch(".uno:FontDialog", 3);
EffectsPage.select(); EffectsPage.select();
EffectsPage_Color.select("Magenta"); EffectsPage_Color.select(6);
EffectsPage.ok(); EffectsPage.ok();
sleep(2); sleep(2);
//Save the text document //Save the text document
writer.menuItem("File->Save As...").select(); app.dispatch(".uno:SaveAs");
FileUtil.deleteFile(saveTo); FileUtil.deleteFile(saveTo);
submitSaveDlg(saveTo); submitSaveDlg(saveTo);
if (AlienFormatDlg.exists(3)) if (AlienFormatDlg.exists(3))
...@@ -134,14 +134,14 @@ public class BVTFileType { ...@@ -134,14 +134,14 @@ public class BVTFileType {
// Close it by clicking main menu // Close it by clicking main menu
writer.menuItem("File->Close").select(); app.dispatch(".uno:CloseDoc", 3);
openStartcenter(); openStartcenter();
// Reopen the saved file // Reopen the saved file
startcenter.menuItem("File->Open...").select(); app.dispatch(".uno:Open", 3);
submitOpenDlg(saveTo); submitOpenDlg(saveTo);
writer.waitForExistence(10, 2); writer.waitForExistence(10, 2);
writer.menuItem("Edit->Select All").select(); app.dispatch(".uno:SelectAll", 3);
app.setClipboard(".wrong"); app.setClipboard(".wrong");
typeKeys("<$copy>"); typeKeys("<$copy>");
sleep(1); sleep(1);
...@@ -185,20 +185,20 @@ public class BVTFileType { ...@@ -185,20 +185,20 @@ public class BVTFileType {
private void saveNewSpreadsheet(String file) { private void saveNewSpreadsheet(String file) {
String saveTo = fullPath("temp/" + file); String saveTo = fullPath("temp/" + file);
String text = "Hello Openoffice"; String text = "Hello Openoffice";
startcenter.menuItem("File->New->Spreadsheet").select(); app.dispatch("private:factory/scalc");
calc.waitForExistence(10, 2); calc.waitForExistence(10, 2);
CalcUtil.selectRange("A65536"); CalcUtil.selectRange("A65536");
typeKeys(text); typeKeys(text);
calc.menuItem("File->Save As...").select(); app.dispatch(".uno:SaveAs");
FileUtil.deleteFile(saveTo); FileUtil.deleteFile(saveTo);
submitSaveDlg(saveTo); submitSaveDlg(saveTo);
if (AlienFormatDlg.exists(3)) if (AlienFormatDlg.exists(3))
AlienFormatDlg.ok(); AlienFormatDlg.ok();
// Close it by clicking main menu // Close it by clicking main menu
calc.menuItem("File->Close").select(); app.dispatch(".uno:CloseDoc");
openStartcenter(); openStartcenter();
// Reopen the saved file // Reopen the saved file
startcenter.menuItem("File->Open...").select(); app.dispatch(".uno:Open");
submitOpenDlg(saveTo); submitOpenDlg(saveTo);
calc.waitForExistence(10, 2); calc.waitForExistence(10, 2);
Assert.assertEquals("The typed text is saved!", text, CalcUtil.getCellText("A65536")); Assert.assertEquals("The typed text is saved!", text, CalcUtil.getCellText("A65536"));
...@@ -239,29 +239,29 @@ public class BVTFileType { ...@@ -239,29 +239,29 @@ public class BVTFileType {
private void saveNewPresentation(String file) { private void saveNewPresentation(String file) {
String saveTo = fullPath("temp/" + file); String saveTo = fullPath("temp/" + file);
String text = "Hello Openoffice"; String text = "Hello Openoffice";
startcenter.menuItem("File->New->Presentation").select(); app.dispatch("private:factory/simpress?slot=6686");
PresentationWizard.ok(); PresentationWizard.ok();
impress.click(0.01, 0.01); impress.click(0.01, 0.01);
typeKeys(text); typeKeys(text);
sleep(2); sleep(2);
impress.doubleClick(0.1, 0.5); impress.doubleClick(0.1, 0.5);
impress.menuItem("File->Save As...").select(); app.dispatch(".uno:SaveAs");
FileUtil.deleteFile(saveTo); FileUtil.deleteFile(saveTo);
submitSaveDlg(saveTo); submitSaveDlg(saveTo);
if (AlienFormatDlg.exists(3)) if (AlienFormatDlg.exists(3))
AlienFormatDlg.ok(); AlienFormatDlg.ok();
// Close it by clicking main menu // Close it by clicking main menu
impress.menuItem("File->Close").select(); app.dispatch(".uno:CloseDoc", 3);
openStartcenter(); openStartcenter();
// Reopen the saved file // Reopen the saved file
startcenter.menuItem("File->Open...").select(); app.dispatch(".uno:Open", 3);
submitOpenDlg(saveTo); submitOpenDlg(saveTo);
impress.waitForExistence(10, 2); impress.waitForExistence(10, 2);
sleep(2); sleep(2);
impress.click(3, 3); impress.click(3, 3);
typeKeys("<tab><enter>"); typeKeys("<tab><enter>");
impress.menuItem("Edit->Select All").select(); app.dispatch(".uno:SelectAll", 3);
// app.setClipboard(".wrong"); // app.setClipboard(".wrong");
typeKeys("<$copy>"); typeKeys("<$copy>");
sleep(1); sleep(1);
...@@ -274,7 +274,7 @@ public class BVTFileType { ...@@ -274,7 +274,7 @@ public class BVTFileType {
/** /**
* Test save a new drawing as .odg * Test save a new drawing as .odg
*/ */
@Ignore("There is bug in draw") @Test
public void testSaveNewODG() throws Exception { public void testSaveNewODG() throws Exception {
saveNewDrawing("draw_saveas.odg"); saveNewDrawing("draw_saveas.odg");
} }
...@@ -282,7 +282,7 @@ public class BVTFileType { ...@@ -282,7 +282,7 @@ public class BVTFileType {
/** /**
* Test save a new drawing as .otg * Test save a new drawing as .otg
*/ */
@Ignore("There is bug in draw") @Test
public void testSaveNewOTG() throws Exception { public void testSaveNewOTG() throws Exception {
saveNewDrawing("draw_saveas.otg"); saveNewDrawing("draw_saveas.otg");
} }
...@@ -290,7 +290,7 @@ public class BVTFileType { ...@@ -290,7 +290,7 @@ public class BVTFileType {
/** /**
* Test save a new drawing as .sxd * Test save a new drawing as .sxd
*/ */
@Ignore("There is bug in draw") @Test
public void testSaveNewSXD() throws Exception { public void testSaveNewSXD() throws Exception {
saveNewDrawing("draw_saveas.sxd"); saveNewDrawing("draw_saveas.sxd");
} }
...@@ -298,7 +298,7 @@ public class BVTFileType { ...@@ -298,7 +298,7 @@ public class BVTFileType {
/** /**
* Test save a new drawing as .std * Test save a new drawing as .std
*/ */
@Ignore("There is bug in draw") @Test
public void testSaveNewSTD() throws Exception { public void testSaveNewSTD() throws Exception {
saveNewDrawing("draw_saveas.std"); saveNewDrawing("draw_saveas.std");
} }
...@@ -318,11 +318,11 @@ public class BVTFileType { ...@@ -318,11 +318,11 @@ public class BVTFileType {
String bmp_green = testFile("pure_green_64x64.bmp"); String bmp_green = testFile("pure_green_64x64.bmp");
// Create a new drawing document // Create a new drawing document
startcenter.menuItem("File->New->Drawing").select(); app.dispatch("private:factory/sdraw", 3);
sleep(3); sleep(3);
// Insert a picture fully filled with green // Insert a picture fully filled with green
draw.menuItem("Insert->Picture->From File...").select(); app.dispatch(".uno:InsertGraphic", 3);
submitOpenDlg(bmp_green); submitOpenDlg(bmp_green);
sleep(3); sleep(3);
// Focus on edit pane // Focus on edit pane
...@@ -334,7 +334,7 @@ public class BVTFileType { ...@@ -334,7 +334,7 @@ public class BVTFileType {
assertNotNull("Green rectangle: " + rectangle, rectangle); assertNotNull("Green rectangle: " + rectangle, rectangle);
// Save the drawing // Save the drawing
draw.menuItem("File->Save As...").select(); app.dispatch(".uno:SaveAs");
FileUtil.deleteFile(saveTo); FileUtil.deleteFile(saveTo);
submitSaveDlg(saveTo); submitSaveDlg(saveTo);
// If the format is supported by OO1.0, ask whether to change to the latest format // If the format is supported by OO1.0, ask whether to change to the latest format
...@@ -342,11 +342,11 @@ public class BVTFileType { ...@@ -342,11 +342,11 @@ public class BVTFileType {
AlienFormatDlg.ok(); // Keep the current format AlienFormatDlg.ok(); // Keep the current format
// Close it by clicking main menu // Close it by clicking main menu
draw.menuItem("File->Close").select(); app.dispatch(".uno:CloseDoc", 3);
openStartcenter(); openStartcenter();
// Reopen the saved file // Reopen the saved file
startcenter.menuItem("File->Open...").select(); app.dispatch(".uno:Open", 3);
submitOpenDlg(saveTo); submitOpenDlg(saveTo);
draw.waitForExistence(10, 2); draw.waitForExistence(10, 2);
...@@ -394,7 +394,7 @@ public class BVTFileType { ...@@ -394,7 +394,7 @@ public class BVTFileType {
String saveTo = fullPath("temp/" + filename); String saveTo = fullPath("temp/" + filename);
// Create a new math // Create a new math
startcenter.menuItem("File->New->Formula").select(); app.dispatch("private:factory/smath", 3);
sleep(3); sleep(3);
// Verify if the Elements window is active // Verify if the Elements window is active
...@@ -403,7 +403,7 @@ public class BVTFileType { ...@@ -403,7 +403,7 @@ public class BVTFileType {
// Insert a formula // Insert a formula
String text = "5 times 3 = 15"; String text = "5 times 3 = 15";
typeText(text); typeText(text);
math_EditWindow.menuItem("Edit->Select All").select(); app.dispatch(".uno:Select", 3);
typeKeys("<$copy>"); typeKeys("<$copy>");
sleep(1); sleep(1);
...@@ -411,7 +411,7 @@ public class BVTFileType { ...@@ -411,7 +411,7 @@ public class BVTFileType {
assertEquals("The typed formula into math", text, app.getClipboard()); assertEquals("The typed formula into math", text, app.getClipboard());
// Save the formula // Save the formula
math_EditWindow.menuItem("File->Save As...").select(); app.dispatch(".uno:SaveAs");
FileUtil.deleteFile(saveTo); FileUtil.deleteFile(saveTo);
submitSaveDlg(saveTo); submitSaveDlg(saveTo);
// If the format is supported by OO1.0, ask whether to change to the latest format // If the format is supported by OO1.0, ask whether to change to the latest format
...@@ -419,22 +419,22 @@ public class BVTFileType { ...@@ -419,22 +419,22 @@ public class BVTFileType {
AlienFormatDlg.ok(); // Keep the current format AlienFormatDlg.ok(); // Keep the current format
// Close it by clicking main menu // Close it by clicking main menu
math_EditWindow.menuItem("File->Close").select(); app.dispatch(".uno:CloseDoc", 3);
openStartcenter(); openStartcenter();
// Reopen the saved file // Reopen the saved file
startcenter.menuItem("File->Open...").select(); app.dispatch(".uno:Open", 3);
submitOpenDlg(saveTo); submitOpenDlg(saveTo);
math_EditWindow.waitForExistence(10, 2); math_EditWindow.waitForExistence(10, 2);
// Verify if the formula still exists in the file // Verify if the formula still exists in the file
math_EditWindow.menuItem("Edit->Select All").select(); app.dispatch(".uno:Select", 3);
typeKeys("<$copy>"); typeKeys("<$copy>");
sleep(1); sleep(1);
assertEquals("The typed formula into math is saved", text, app.getClipboard()); assertEquals("The typed formula into math is saved", text, app.getClipboard());
// Close the file to avoid the app closing the Elements window automatically // Close the file to avoid the app closing the Elements window automatically
math_EditWindow.menuItem("File->Close").select(); app.dispatch(".uno:CloseDoc", 3);
} }
@AfterClass @AfterClass
......
...@@ -55,7 +55,7 @@ public class SmokeTest { ...@@ -55,7 +55,7 @@ public class SmokeTest {
testFile("TestExtension.oxt"); testFile("TestExtension.oxt");
String file = testFile("smoketestdoc.sxw"); String file = testFile("smoketestdoc.sxw");
// Open sample file smoketestdoc.sxw // Open sample file smoketestdoc.sxw
startcenter.menuItem("File->Open...").select(); app.dispatch(".uno:Open", 3);
submitOpenDlg(file); submitOpenDlg(file);
writer.waitForEnabled(10, 2); writer.waitForEnabled(10, 2);
// Run test cases // Run test cases
......
...@@ -92,29 +92,29 @@ public class SortOptionsIncludeFormats { ...@@ -92,29 +92,29 @@ public class SortOptionsIncludeFormats {
String[][] dataWithCurrencyFormats = new String[][] { String[][] dataWithCurrencyFormats = new String[][] {
{"Units"}, {"Units"},
{"$32.00"}, {"$32.00"},
{"57.00 "}, {"57.00 \u20ac"},
{" 74"}, {"\u20a4 74"},
{"R$ 50.00"}, {"R$ 50.00"},
{"ج.م. 27.00"}, {"\u062c.\u0645. 27.00"},
{"7.00 руб."}, {"7.00 \u0440\u0443\u0431."},
}; };
String[][] expectedSortedResultIncludeFormat = new String[][] { String[][] expectedSortedResultIncludeFormat = new String[][] {
{"Units"}, {"Units"},
{"7.00 руб."}, {"7.00 \u0440\u0443\u0431."},
{"ج.م. 27.00"}, {"\u062c.\u0645. 27.00"},
{"$32.00"}, {"$32.00"},
{"R$ 50.00"}, {"R$ 50.00"},
{"57.00 "}, {"57.00 \u20ac"},
{" 74"}, {"\u20a4 74"},
}; };
String[][] expectedSortedResultExcludeFormat = new String[][] { String[][] expectedSortedResultExcludeFormat = new String[][] {
{"Units"}, {"Units"},
{"$7.00"}, {"$7.00"},
{"27.00 "}, {"27.00 \u20ac"},
{" 32"}, {"\u20a4 32"},
{"R$ 50.00"}, {"R$ 50.00"},
{"ج.م. 57.00"}, {"\u062c.\u0645. 57.00"},
{"74.00 руб."}, {"74.00 \u0440\u0443\u0431."},
}; };
CalcUtil.selectRange("A1"); CalcUtil.selectRange("A1");
typeKeys("Units<down>32<down>57<down>74<down>50<down>27<down>7"); typeKeys("Units<down>32<down>57<down>74<down>50<down>27<down>7");
...@@ -131,13 +131,13 @@ public class SortOptionsIncludeFormats { ...@@ -131,13 +131,13 @@ public class SortOptionsIncludeFormats {
typeKeys("<ctrl 1>"); typeKeys("<ctrl 1>");
FormatCellsDlg_NumbersPage.select(); FormatCellsDlg_NumbersPage.select();
FormatCellsDlg_NumbersPageCategory.select("Currency"); FormatCellsDlg_NumbersPageCategory.select("Currency");
FormatCellsDlg_NumbersPageCurrencyFormat.select(" Spanish (Spain)"); FormatCellsDlg_NumbersPageCurrencyFormat.select("\u20ac Spanish (Spain)");
FormatCellsDlg_NumbersPage.ok(); FormatCellsDlg_NumbersPage.ok();
CalcUtil.selectRange("A4"); CalcUtil.selectRange("A4");
typeKeys("<ctrl 1>"); typeKeys("<ctrl 1>");
FormatCellsDlg_NumbersPage.select(); FormatCellsDlg_NumbersPage.select();
FormatCellsDlg_NumbersPageCategory.select("Currency"); FormatCellsDlg_NumbersPageCategory.select("Currency");
FormatCellsDlg_NumbersPageCurrencyFormat.select(" Latin"); FormatCellsDlg_NumbersPageCurrencyFormat.select("\u20a4 Latin");
FormatCellsDlg_NumbersPage.ok(); FormatCellsDlg_NumbersPage.ok();
CalcUtil.selectRange("A5"); CalcUtil.selectRange("A5");
typeKeys("<ctrl 1>"); typeKeys("<ctrl 1>");
...@@ -149,13 +149,13 @@ public class SortOptionsIncludeFormats { ...@@ -149,13 +149,13 @@ public class SortOptionsIncludeFormats {
typeKeys("<ctrl 1>"); typeKeys("<ctrl 1>");
FormatCellsDlg_NumbersPage.select(); FormatCellsDlg_NumbersPage.select();
FormatCellsDlg_NumbersPageCategory.select("Currency"); FormatCellsDlg_NumbersPageCategory.select("Currency");
FormatCellsDlg_NumbersPageCurrencyFormat.select("ج.م. Arabic (Egypt)"); FormatCellsDlg_NumbersPageCurrencyFormat.select("\u062c.\u0645. Arabic (Egypt)");
FormatCellsDlg_NumbersPage.ok(); FormatCellsDlg_NumbersPage.ok();
CalcUtil.selectRange("A7"); CalcUtil.selectRange("A7");
typeKeys("<ctrl 1>"); typeKeys("<ctrl 1>");
FormatCellsDlg_NumbersPage.select(); FormatCellsDlg_NumbersPage.select();
FormatCellsDlg_NumbersPageCategory.select("Currency"); FormatCellsDlg_NumbersPageCategory.select("Currency");
FormatCellsDlg_NumbersPageCurrencyFormat.select("руб. Russian"); FormatCellsDlg_NumbersPageCurrencyFormat.select("\u0440\u0443\u0431. Russian");
FormatCellsDlg_NumbersPage.ok(); FormatCellsDlg_NumbersPage.ok();
// "Data->Sort...", check "Range contains column labels", check "Include formats", sort first by "Units", "Ascending" // "Data->Sort...", check "Range contains column labels", check "Include formats", sort first by "Units", "Ascending"
......
...@@ -200,8 +200,8 @@ public class UIMap { ...@@ -200,8 +200,8 @@ public class UIMap {
public static final VclComboBox math_EditSymbolsDlgSymbol = combobox("starmath:ComboBox:RID_SYMDEFINEDIALOG:4"); 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 VclListBox math_EditSymbolsDlgFont = listbox("starmath:ListBox:RID_SYMDEFINEDIALOG:1");
public static final VclComboBox math_EditSymbolsDlgTypeface = combobox("starmath:ComboBox:RID_SYMDEFINEDIALOG:3"); public static final VclComboBox math_EditSymbolsDlgTypeface = combobox("starmath:ComboBox:RID_SYMDEFINEDIALOG:3");
public static final VclDialog Wizards_AgendaDialog = dialog("41051"); public static final VclDialog Wizards_AgendaDialog = dialog("WIZARDS_HID_AGWIZ");
public static final VclButton Wizards_AgendaDialog_FinishButton = button("41055"); 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 VclTabPage MacroDialogsPage = tabpage("basctl:TabPage:RID_TP_DLGS");
public static final VclDialog AboutDialog = dialog(".uno:About"); public static final VclDialog AboutDialog = dialog(".uno:About");
public static final VclButton math_ElementsRelations = button("STARMATH_HID_SMA_RELATIONS_CAT"); public static final VclButton math_ElementsRelations = button("STARMATH_HID_SMA_RELATIONS_CAT");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment