incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From liu...@apache.org
Subject svn commit: r1364472 - in /incubator/ooo/trunk/main/test/testoo/src: testcase/presentation/headerandfooter/ testcase/sc/celltext/ testcase/sc/chart/ testcase/sc/datapilot/ testcase/sc/filter/ testcase/sc/sheet/ testcase/sc/sort/ testcase/sc/validity/ t...
Date Mon, 23 Jul 2012 02:01:41 GMT
Author: liuzhe
Date: Mon Jul 23 02:01:39 2012
New Revision: 1364472

URL: http://svn.apache.org/viewvc?rev=1364472&view=rev
Log:
#120321# - Automated Test: Refactor the test code under testcase.sc.* 

Removed:
    incubator/ooo/trunk/main/test/testoo/src/testcase/presentation/headerandfooter/HeaderAndFooterSetting.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/presentation/headerandfooter/OpenDocumentWithHeaderFooter.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/celltext/InsertColumnsFromMainMenu.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/celltext/InsertRowsFromMainMenu.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/chart/ChartDialogCancelBack.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/chart/ChartWizardTitle.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/datapilot/CopyPasteDataPilotTable.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/datapilot/DataPilotAddFieldsAutoUpdate.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/datapilot/DataPilotAddFieldsManualUpdate.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/datapilot/DataPilotChangeDataFieldOptionAutoUpdate.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/datapilot/DragMoveFunctionOfGroupedField.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/datapilot/HideShowPanel.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/datapilot/MoveFieldInSameAreaManualUpdate.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/datapilot/MoveFieldToOtherAreaAutoUpdate.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/datapilot/MoveFieldToOtherAreaDiscardChange.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/datapilot/MoveTableNarrowSpaceToShowTheTable.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/datapilot/OneMRowDataPilotRefresh.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/datapilot/RemoveFieldsDiscardChange.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/datapilot/RemoveFunctionOfGroupedField.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/datapilot/RenameFieldAutoUpdate.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/datapilot/SortFunctionInGroupedField.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/datapilot/SubtotalsFunctionInGroupedField.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/datapilot/TopNFunctionInGroupedField.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/filter/AutoFilterSortAscendingMutiColumns.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/filter/AutoFitlerWithPlusSign.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/sort/RowsSortWithOptionsCaseSensitive.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/sort/RowsSortWithOptionsCopyResultTo.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/sort/SortCriteriaSortFirstBy.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/sort/SortCriteriaSortSecondBy.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/sort/SortCriteriaSortThirdBy.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/sort/SortOptionsCustomSortOrderPredefineFromCopyList.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/sort/SortOptionsCustomSortOrderPredefineFromNewList.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/sort/SortOptionsDirectionSortColumns.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/sort/SortOptionsIncludeFormats.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/sort/SortOptionsMultipleSortDataOverlap.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/sort/SortOptionsMultipleSortParameterSaved.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/validity/AllowBlankCells.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/validity/AllowDateNotBetween.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/validity/AllowDecimalEqual.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/validity/AllowGreaterTextLength.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/validity/AllowLessThanTextLength.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/validity/AllowList.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/validity/AllowTimeBetween.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/validity/AllowTimeGreaterThan.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/validity/AllowWholeNumLessThan.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/validity/DefaultErrorAlertMessage.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/validity/FFCIgnoreBlank.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/validity/FFCNotIgnoreBlank.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/validity/NotLockCellFromValidityCell.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/validity/UncheckErrorAlert.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/validity/ValidityCellRangeSourcePicker.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/validity/ValidityUIAllowDecimal.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/validity/ValidityUICellRange.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/validity/ValidityUIErrorAlert.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/textdocument/table/Table.java
Modified:
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/sheet/InsertSheet.java
    incubator/ooo/trunk/main/test/testoo/src/testcase/sc/validity/ValidityDateSupport1024Columns.java
    incubator/ooo/trunk/main/test/testoo/src/testlib/UIMap.java

Modified: incubator/ooo/trunk/main/test/testoo/src/testcase/sc/sheet/InsertSheet.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/test/testoo/src/testcase/sc/sheet/InsertSheet.java?rev=1364472&r1=1364471&r2=1364472&view=diff
==============================================================================
--- incubator/ooo/trunk/main/test/testoo/src/testcase/sc/sheet/InsertSheet.java (original)
+++ incubator/ooo/trunk/main/test/testoo/src/testcase/sc/sheet/InsertSheet.java Mon Jul 23
02:01:39 2012
@@ -21,14 +21,11 @@
 package testcase.sc.sheet;
 
 import static org.junit.Assert.*;
-import static org.openoffice.test.vcl.Tester.*;
 import static testlib.UIMap.*;
-
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
-
 import testlib.Log;
 
 /**
@@ -41,7 +38,7 @@ public class InsertSheet {
 
 	@Rule
 	public Log LOG = new Log();
-	
+
 	@Before
 	public void setUp() throws Exception {
 		app.start();
@@ -53,7 +50,7 @@ public class InsertSheet {
 	public void tearDown() throws Exception {
 		app.close();
 	}
-	
+
 	/**
 	 * Insert one sheet in different place
 	 * @throws Exception
@@ -71,7 +68,7 @@ public class InsertSheet {
 		assertArrayEquals(new String[] { "Sheet4", "Sheet5", "Sheet6", "Sheet1", "Sheet2", "Sheet3"
}, SCSheetsList.getItemsText());
 		SCSelectSheetsDlg.ok();
 	}
-	
+
 	/**
 	 * Insert one sheet in different place
 	 * @throws Exception

Modified: incubator/ooo/trunk/main/test/testoo/src/testcase/sc/validity/ValidityDateSupport1024Columns.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/test/testoo/src/testcase/sc/validity/ValidityDateSupport1024Columns.java?rev=1364472&r1=1364471&r2=1364472&view=diff
==============================================================================
--- incubator/ooo/trunk/main/test/testoo/src/testcase/sc/validity/ValidityDateSupport1024Columns.java
(original)
+++ incubator/ooo/trunk/main/test/testoo/src/testcase/sc/validity/ValidityDateSupport1024Columns.java
Mon Jul 23 02:01:39 2012
@@ -46,42 +46,29 @@ import testlib.Log;
 public class ValidityDateSupport1024Columns {
 	private static IDList idList = new IDList(new File("./ids"));
 	public static final VclMessageBox ActiveMsgBox = new VclMessageBox(idList.getId("UID_ACTIVE"),
"Message on message box.");
-	
-	/**
-	 * TestCapture helps us to do
-	 * 1. Take a screenshot when failure occurs.
-	 * 2. Collect extra data when OpenOffice crashes.
-	 */	
+
 	@Rule
 	public Log LOG = new Log();
-	
-	/**
-	 * initApp helps us to do 
-	 * 1. Patch the OpenOffice to enable automation if necessary.
-	 * 2. Start OpenOffice with automation enabled if necessary.
-	 * 3. Reset OpenOffice to startcenter.
-	 * 
-	 * @throws java.lang.Exception
-	 */
+
 	@Before
 	public void setUp() throws Exception {
-		initApp();
+		app.start();
+	}
+
+	@After
+	public void tearDown() throws Exception {
+		app.close();
 	}
-	
+
 	/**
 	 * test Allow Greater than or equal to Date type in Validity, support 1024 columns.
 	 */
 	@Test
 	public void testValidityDateSupport1024Columns() {
 		startcenter.menuItem("File->New->Spreadsheet").select();
-		sleep(1);
-		
-		CalcUtil.selectRange("Sheet1.ALM1000");
 		CalcUtil.selectRange("Sheet1.ALM1000:Sheet1.ALO1005");	
-		
 		calc.menuItem("Data->Validity...").select();	
-		sleep(1);	
-		
+
 		SC_ValidityCriteriaTabpage.select();
 		SC_ValidityCriteriaAllowList.select("Date");
 		SC_ValidityDecimalCompareOperator.select("greater than");
@@ -90,39 +77,31 @@ public class ValidityDateSupport1024Colu
 		SC_ValidityShowErrorMessage.check();
 		SC_ValidityErrorMessageTitle.setText("Stop to enter");
 		SC_ValidityErrorMessage.setText("Invalid value");
-		typeKeys("<tab>");
-		typeKeys("<enter>");	
-		sleep(1);
-				
+		SC_ValidityErrorAlertTabPage.ok();
+
 		CalcUtil.selectRange("Sheet1.ALM1001");
-		SC_CellInput.activate();
-		typeKeys("02/01/08");
-		typeKeys("<enter>");
+		SC_InputBar_Input.activate();
+		typeKeys("02/01/08<enter>");
 		assertEquals("02/01/08",CalcUtil.getCellText("Sheet1.ALM1001"));
-		
+
 		CalcUtil.selectRange("Sheet1.ALM1002");
-		SC_CellInput.activate();
-		typeKeys("01/02/08");
-		typeKeys("<enter>");
+		SC_InputBar_Input.activate();
+		typeKeys("01/02/08<enter>");
 		assertEquals("01/02/08",CalcUtil.getCellText("Sheet1.ALM1002"));
-		
+
 		CalcUtil.selectRange("Sheet1.ALM1003");
-		SC_CellInput.activate();
-		typeKeys("01/01/08");
-		typeKeys("<enter>");
+		SC_InputBar_Input.activate();
+		typeKeys("01/01/08<enter>");
 		assertEquals("Invalid value",ActiveMsgBox.getMessage());
 		ActiveMsgBox.ok();
 		assertEquals("",CalcUtil.getCellText("Sheet1.ALM1003"));
 
 		CalcUtil.selectRange("Sheet1.AML1003");
-		SC_CellInput.activate();
-		typeKeys("12/31/07");
-		typeKeys("<enter>");
+		SC_InputBar_Input.activate();
+		typeKeys("12/31/07<enter>");
 		assertEquals("Invalid value",ActiveMsgBox.getMessage());
 		ActiveMsgBox.ok();
 		assertEquals("",CalcUtil.getCellText("Sheet1.AML1003"));
-		
-		}
-
+	}
 }
 

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=1364472&r1=1364471&r2=1364472&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 23 02:01:39 2012
@@ -242,7 +242,6 @@ public class UIMap {
 	public static final VclEditBox SD_FooterTextOnSlideInput = editbox("sd:Edit:RID_SD_TABPAGE_HEADERFOOTER:TB_FOOTER_FIXED");
 	public static final VclButton SD_SlideNumAsFooterOnSlide = button("sd:CheckBox:RID_SD_TABPAGE_HEADERFOOTER:CB_SLIDENUMBER");
 	public static final VclButton SD_ApplyToAllButtonOnSlideFooter = button("sd:PushButton:RID_SD_TABPAGE_HEADERFOOTER:BT_APPLYTOALL");
-//	public static final VclWindow SD_SlidesPanel = window("HID_SD_WIN_DOCUMENT");
 	public static final VclControl SD_SlidelistInNaviagtor = control("HID_SD_NAVIGATOR_TLB");
 	public static final VclControl SD_HeaderAndFooterDialog = control("HID_SD_TABPAGE_HEADERFOOTER_SLIDE");
 	public static final VclButton SD_ApplyButtonOnSlideFooter = button("sd:PushButton:RID_SD_TABPAGE_HEADERFOOTER:BT_APPLY");
@@ -290,42 +289,41 @@ public class UIMap {
 	public static final VclButton SCSubtotalsIncludeFormatsCheckBox = button("sc:CheckBox:RID_SCPAGE_SUBT_OPTIONS:BTN_FORMATS");
 	public static final VclButton SCSubtotalsCustomSortOrderCheckBox = button("sc:CheckBox:RID_SCPAGE_SUBT_OPTIONS:BTN_USERDEF");
 	public static final VclListBox SCSubtotalsCustomSortListBox = listbox("sc:ListBox:RID_SCPAGE_SUBT_OPTIONS:LB_USERDEF");
-	public static final VclListBox SC_ValidityCriteriaAllowList = listbox("548277762");
-	public static final VclTabPage SC_ValidityCriteriaTabpage = tabpage("548274176");
-	public static final VclButton SC_ValidityAllowBlankCells = button("548275203");
-	public static final VclButton SC_ValidityShowSelectionList = button("548275227");
-	public static final VclButton SC_ValiditySortEntriesAscending = button("548275228");
-	public static final VclButton SC_ValiditySourcePicker = button("548286040");
-	public static final VclTabPage SC_ValidityErrorAlertTabPage = tabpage("548306944");
-	public static final VclButton SC_ValidityShowErrorMessage = button("548308501");
-	public static final VclListBox SC_ValidityErrorAlertActionList = listbox("548310552");
-	public static final VclEditBox SC_ValidityErrorMessageTitle = editbox("548309005");
-	public static final VclEditBox SC_ValidityErrorMessage = editbox("548309529");
-	public static final VclButton SC_ValidityErrorBrowseButton = button("548311578");
+	public static final VclListBox SC_ValidityCriteriaAllowList = listbox("sc:ListBox:TP_VALIDATION_VALUES:LB_ALLOW");
+	public static final VclTabPage SC_ValidityCriteriaTabpage = tabpage("sc:TabPage:TP_VALIDATION_VALUES");
+	public static final VclButton SC_ValidityAllowBlankCells = button("sc:CheckBox:TP_VALIDATION_VALUES:TSB_ALLOW_BLANKS");
+	public static final VclButton SC_ValidityShowSelectionList = button("sc:CheckBox:TP_VALIDATION_VALUES:CB_SHOWLIST");
+	public static final VclButton SC_ValiditySortEntriesAscending = button("sc:CheckBox:TP_VALIDATION_VALUES:CB_SORTLIST");
+	public static final VclButton SC_ValiditySourcePicker = button("sc:ImageButton:TP_VALIDATION_VALUES:RB_VALIDITY_REF");
+	public static final VclTabPage SC_ValidityErrorAlertTabPage = tabpage("sc:TabPage:TP_VALIDATION_ERROR");
+	public static final VclButton SC_ValidityShowErrorMessage = button("sc:TriStateBox:TP_VALIDATION_ERROR:TSB_SHOW");
+	public static final VclListBox SC_ValidityErrorAlertActionList = listbox("sc:ListBox:TP_VALIDATION_ERROR:LB_ACTION");
+	public static final VclEditBox SC_ValidityErrorMessageTitle = editbox("sc:Edit:TP_VALIDATION_ERROR:EDT_TITLE");
+	public static final VclEditBox SC_ValidityErrorMessage = editbox("sc:MultiLineEdit:TP_VALIDATION_ERROR:EDT_ERROR");
+	public static final VclButton SC_ValidityErrorBrowseButton = button("sc:PushButton:TP_VALIDATION_ERROR:BTN_SEARCH");
 	public static final VclTabPage SCSubTotalsOptionsTabPage = tabpage("SC_HID_SCPAGE_SUBT_OPTIONS");
 	public static final VclButton SCDeleteCellsDeleteRowsRadioButton = button("sc:RadioButton:RID_SCDLG_DELCELL:BTN_DELROWS");
 	public static final VclDialog SCDeleteCellsDialog = dialog(".uno:DeleteCell");
 	public static final VclTabPage SCSubTotalsGroup2Dialog = tabpage("SC_HID_SCPAGE_SUBT_GROUP2");
 	public static final VclTabPage SCSubTotalsGroup3Dialog = tabpage("SC_HID_SCPAGE_SUBT_GROUP3");
 	public static final VclListBox SCCalcSubTotolsFuncionList = listbox("SC_HID_SC_SUBT_FUNC");
-	public static final VclEditBox SC_ValiditySourceInput = editbox("548276231");
-	public static final VclWindow SC_CellInput = window("58774");
-	public static final VclListBox SC_ValidityDecimalCompareOperator = listbox("548277765");
-	public static final VclEditBox SC_ValidityMaxValueInput = editbox("548276233");
-	public static final VclEditBox SC_ValidityEntries = editbox("548276765");
-	public static final VclTabPage SC_ValidityInputHelpTabPage = tabpage("548290560");
-	public static final VclButton SC_ValidityInputHelpCheckbox = button("548292107");
-	public static final VclEditBox SC_ValidityInputHelpTitle = editbox("548292621");
-	public static final VclEditBox SC_ValidityHelpMessage = editbox("548293135");
-	public static final VclButton OptionsDlg_Copy = button("sc:PushButton:RID_SCPAGE_USERLISTS:BTN_COPY");
+	public static final VclEditBox SC_ValiditySourceInput = editbox("sc:Edit:TP_VALIDATION_VALUES:EDT_MIN");
+	public static final VclListBox SC_ValidityDecimalCompareOperator = listbox("sc:ListBox:TP_VALIDATION_VALUES:LB_VALUE");
+	public static final VclEditBox SC_ValidityMaxValueInput = editbox("sc:Edit:TP_VALIDATION_VALUES:EDT_MAX");
+	public static final VclEditBox SC_ValidityEntries = editbox("sc:MultiLineEdit:TP_VALIDATION_VALUES:EDT_LIST");
+	public static final VclTabPage SC_ValidityInputHelpTabPage = tabpage("sc:TabPage:TP_VALIDATION_INPUTHELP");
+	public static final VclButton SC_ValidityInputHelpCheckbox = button("sc:TriStateBox:TP_VALIDATION_INPUTHELP:TSB_HELP");
+	public static final VclEditBox SC_ValidityInputHelpTitle = editbox("sc:Edit:TP_VALIDATION_INPUTHELP:EDT_TITLE");
+	public static final VclEditBox SC_ValidityHelpMessage = editbox("sc:MultiLineEdit:TP_VALIDATION_INPUTHELP:EDT_INPUTHELP");
+	public static final VclButton OptionsDlg_SortListsTabCopy = button("sc:PushButton:RID_SCPAGE_USERLISTS:BTN_COPY");
 	public static final VclButton SortOptionsPage_RangeContainsColumnLabels = button("sc:CheckBox:RID_SCPAGE_SORT_OPTIONS:BTN_LABEL");
 	public static final VclButton SortOptionsPage_CustomSortOrder = button("sc:CheckBox:RID_SCPAGE_SORT_OPTIONS:BTN_SORT_USER");
 	public static final VclButton SortOptionsPage_IncludeFormats = button("sc:CheckBox:RID_SCPAGE_SORT_OPTIONS:BTN_FORMATS");
 	public static final VclListBox SortOptionsPage_CustomSortOrderList = listbox("sc:ListBox:RID_SCPAGE_SORT_OPTIONS:LB_SORT_USER");
 	public static final VclButton SortOptionsPage_TopToBottom = button("sc:RadioButton:RID_SCPAGE_SORT_OPTIONS:BTN_TOP_DOWN");
 	public static final VclButton SortOptionsPage_LeftToRight = button("sc:RadioButton:RID_SCPAGE_SORT_OPTIONS:BTN_LEFT_RIGHT");
-	public static final VclButton OptionsDlg_New = button("sc:PushButton:RID_SCPAGE_USERLISTS:BTN_NEW");
-	public static final VclButton OptionsDlg_Add = button("sc:PushButton:RID_SCPAGE_USERLISTS:BTN_ADD");
+	public static final VclButton OptionsDlg_SortListsTabNew = button("sc:PushButton:RID_SCPAGE_USERLISTS:BTN_NEW");
+	public static final VclButton OptionsDlg_SortListsTabAdd = button("sc:PushButton:RID_SCPAGE_USERLISTS:BTN_ADD");
 	public static final VclTabPage FormatCellsDlg_NumbersPage = tabpage("CUI_HID_NUMBERFORMAT");
 	public static final VclListBox FormatCellsDlg_NumbersPageCategory = listbox("cui:ListBox:RID_SVXPAGE_NUMBERFORMAT:LB_CATEGORY");
 	public static final VclListBox FormatCellsDlg_NumbersPageCurrencyFormat = listbox("cui:ListBox:RID_SVXPAGE_NUMBERFORMAT:LB_CURRENCY");



Mime
View raw message