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 {
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
......
......@@ -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
......
......@@ -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"
......
......@@ -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");
......
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