Author: liuzhe
Date: Fri Aug 17 06:15:06 2012
New Revision: 1374150
URL: http://svn.apache.org/viewvc?rev=1374150&view=rev
Log:
#120467# - tesgui: testscripts for TableBackgroundProperty Function in
presentation
Patch by: Tan Liu Ping <[email protected]>
Review by: Liu Zhe <[email protected]>
Added:
incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sd/table/
incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sd/table/ChangeTableBackgroundProperty.java
Modified:
incubator/ooo/trunk/main/test/testgui/source/testcase/gui/LongRun.java
incubator/ooo/trunk/main/test/testgui/source/testlib/gui/UIMap.java
Modified: incubator/ooo/trunk/main/test/testgui/source/testcase/gui/LongRun.java
URL:
http://svn.apache.org/viewvc/incubator/ooo/trunk/main/test/testgui/source/testcase/gui/LongRun.java?rev=1374150&r1=1374149&r2=1374150&view=diff
==============================================================================
--- incubator/ooo/trunk/main/test/testgui/source/testcase/gui/LongRun.java
(original)
+++ incubator/ooo/trunk/main/test/testgui/source/testcase/gui/LongRun.java Fri
Aug 17 06:15:06 2012
@@ -104,28 +104,28 @@ public class LongRun {
writer.typeKeys("Long-running test...");
for(int i = 0 ; i < 1000; i++){
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");
+ 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");
HashMap<String, Object> perfData =
SystemUtil.getProcessPerfData(pid);
String record = i + "," + System.currentTimeMillis() +
"," + perfData.get("rss") + "," + perfData.get("pcpu");
LOG.info("Record: " + record);
Added:
incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sd/table/ChangeTableBackgroundProperty.java
URL:
http://svn.apache.org/viewvc/incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sd/table/ChangeTableBackgroundProperty.java?rev=1374150&view=auto
==============================================================================
---
incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sd/table/ChangeTableBackgroundProperty.java
(added)
+++
incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sd/table/ChangeTableBackgroundProperty.java
Fri Aug 17 06:15:06 2012
@@ -0,0 +1,110 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+package testcase.gui.sd.table;
+
+import static testlib.gui.UIMap.*;
+import static org.junit.Assert.*;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import testlib.gui.Log;
+
+public class ChangeTableBackgroundProperty {
+ @Rule
+ public Log LOG = new Log();
+
+ @Before
+ public void setUp() throws Exception {
+ app.start();
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ app.close();
+ }
+
+ /**
+ * Open the Table Background property dialog in Presentation
+ *
+ * @throws Exception
+ */
+
+ @Test
+ public void OpenTableBackgroundPropertyDialog() throws Exception {
+
+ // Create a new presentation document
+ app.dispatch("private:factory/simpress?slot=6686");
+ PresentationWizard.ok();
+
+ // Insert a table
+ app.dispatch(".uno:InsertTable", 3);
+ InsertTable.ok();
+
+ // Verify if the table toolbar is active
+ assertTrue(Table_Toolbar.exists(3));
+
+ // open Table Properties Dialog
+ app.dispatch(".uno:TableDialog", 3);
+ Area_Area_page.select();
+ // select Color
+ Area_Fill_Type.select(1);
+ assertEquals("Area_Fill_Type is
Color",Area_Fill_Type.getSelText(), Area_Fill_Type.getItemText(1));
+ Area_Fill_Color.select(2);
+ //Area_Fill_Color.getItemCount();
+ assertEquals("Area_Fill_Color is second
item",Area_Fill_Color.getSelText(), Area_Fill_Color.getItemText(2));
+ Area_Area_page.ok();
+
+ // open Table Properties Dialog
+ app.dispatch(".uno:TableDialog", 3);
+ Area_Area_page.select();
+ // select Gradient
+ Area_Fill_Type.select(2);
+ assertEquals("Area_Fill_Type is
Gradient",Area_Fill_Type.getSelText(), Area_Fill_Type.getItemText(2));
+ Area_Fill_Gradient.select(2);
+ assertEquals("Area_Fill_Gradient is second
item",Area_Fill_Gradient.getSelText(), Area_Fill_Gradient.getItemText(2));
+ Area_Area_page.ok();
+
+
+ // open Table Properties Dialog
+ app.dispatch(".uno:TableDialog", 3);
+ Area_Area_page.select();
+ // select Hatching
+ Area_Fill_Type.select(3);
+ assertEquals("Area_Fill_Type is
Hatching",Area_Fill_Type.getSelText(), Area_Fill_Type.getItemText(3));
+ Area_Fill_Hatching.select(2);
+ assertEquals("Area_Fill_Hatching is second
item",Area_Fill_Hatching.getSelText(), Area_Fill_Hatching.getItemText(2));
+ Area_Area_page.ok();
+
+ // open Table Properties Dialog
+ app.dispatch(".uno:TableDialog", 3);
+ Area_Area_page.select();
+ // select Bitmap
+ Area_Fill_Type.select(4);
+ assertEquals("Area_Fill_Type is
Bitmap",Area_Fill_Type.getSelText(), Area_Fill_Type.getItemText(4));
+ Area_Fill_Bitmap.select(2);
+ assertEquals("Area_Fill_Bitmap is second
item",Area_Fill_Bitmap.getSelText(), Area_Fill_Bitmap.getItemText(2));
+ Area_Area_page.ok();
+
+ }
+
+}
Modified: incubator/ooo/trunk/main/test/testgui/source/testlib/gui/UIMap.java
URL:
http://svn.apache.org/viewvc/incubator/ooo/trunk/main/test/testgui/source/testlib/gui/UIMap.java?rev=1374150&r1=1374149&r2=1374150&view=diff
==============================================================================
--- incubator/ooo/trunk/main/test/testgui/source/testlib/gui/UIMap.java
(original)
+++ incubator/ooo/trunk/main/test/testgui/source/testlib/gui/UIMap.java Fri Aug
17 06:15:06 2012
@@ -357,5 +357,46 @@ public class UIMap {
public static final VclTreeListBox OptionsDlg_PathTabTree =
tree("CUI_HID_OPTPATH_CTL_PATH");
public static final VclTreeListBox OptionsDlg_MicorOfficeTree =
tree("CUI_HID_OFAPAGE_MSFLTR2_CLB");
-
+ // Presentation:"Table Property" dialog
+ public static final VclButton impress_WizardDlg_Next =
button("sd:PushButton:DLG_ASS:BUT_NEXT");
+ public static final VclListBox Area_Fill_Color =
listbox("cui:ListBox:RID_SVXPAGE_AREA:LB_COLOR");
+ public static final VclTabPage Area_Area_page =
tabpage("CUI_HID_AREA_AREA");
+ public static final VclListBox Area_Fill_Type =
listbox("cui:ListBox:RID_SVXPAGE_AREA:LB_AREA_TYPE");
+ public static final VclListBox Area_Fill_Gradient =
listbox("cui:ListBox:RID_SVXPAGE_AREA:LB_GRADIENT");
+ public static final VclListBox Area_Fill_Hatching =
listbox("cui:ListBox:RID_SVXPAGE_AREA:LB_HATCHING");
+ public static final VclListBox Area_Fill_Bitmap =
listbox("cui:ListBox:RID_SVXPAGE_AREA:LB_BITMAP");
+ public static final VclTabPage Area_Border_page =
tabpage("CUI_HID_BORDER");
+ public static final VclTabPage Area_Font_page =
tabpage("CUI_HID_SVXPAGE_CHAR_NAME");
+ public static final VclComboBox Area_Font_Western_Font_Name =
combobox("cui:ComboBox:RID_SVXPAGE_CHAR_NAME:LB_WEST_NAME");
+ public static final VclComboBox Area_Font_Western_Style =
combobox("cui:ComboBox:RID_SVXPAGE_CHAR_NAME:LB_WEST_STYLE");
+ public static final VclListBox Area_Font_Western_Size =
listbox("cui:MetricBox:RID_SVXPAGE_CHAR_NAME:LB_WEST_SIZE");
+ public static final VclListBox Area_Font_Western_Lang =
listbox("cui:ListBox:RID_SVXPAGE_CHAR_NAME:LB_WEST_LANG");
+ public static final VclComboBox Area_Font_Eastern_Font_Name =
combobox("cui:ComboBox:RID_SVXPAGE_CHAR_NAME:LB_EAST_NAME");
+ public static final VclComboBox Area_Font_Eastern_Style =
combobox("cui:ComboBox:RID_SVXPAGE_CHAR_NAME:LB_EAST_STYLE");
+ public static final VclListBox Area_Font_Eastern_Size =
listbox("cui:MetricBox:RID_SVXPAGE_CHAR_NAME:LB_EAST_SIZE");
+ public static final VclListBox Area_Font_Eastern_Lang =
listbox("cui:ListBox:RID_SVXPAGE_CHAR_NAME:LB_EAST_LANG");
+ public static final VclListBox EffectsPage_Relief =
listbox("cui:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_RELIEF");
+ public static final VclButton EffectsPage_Outline =
button("cui:TriStateBox:RID_SVXPAGE_CHAR_EFFECTS:CB_OUTLINE");
+ public static final VclButton EffectsPage_Shadow =
button("cui:TriStateBox:RID_SVXPAGE_CHAR_EFFECTS:CB_SHADOW");
+ public static final VclListBox EffectsPage_Overline =
listbox("cui:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_OVERLINE");
+ public static final VclListBox EffectsPage_Overline_Color =
listbox("cui:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_OVERLINE_COLOR");
+ public static final VclListBox EffectsPage_Strikeout =
listbox("cui:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_STRIKEOUT");
+ public static final VclListBox EffectsPage_Underline =
listbox("cui:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_UNDERLINE");
+ public static final VclListBox EffectsPage_Underline_Color =
listbox("cui:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_UNDERLINE_COLOR");
+ public static final VclButton EffectsPage_InvidiualWords =
button("cui:CheckBox:RID_SVXPAGE_CHAR_EFFECTS:CB_INDIVIDUALWORDS");
+ public static final VclListBox EffectsPage_Emphasis =
listbox("cui:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_EMPHASIS");
+ public static final VclListBox EffectsPage_Position =
listbox("cui:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_POSITION");
+ public static final VclControl Area_Border_Presets =
control("CUI_HID_BORDER_CTL_PRESETS");
+ public static final VclListBox Area_Border_LineStyle =
listbox("cui:ListBox:RID_SVXPAGE_BORDER:LB_LINESTYLE");
+ public static final VclListBox Area_Border_LineColor =
listbox("cui:ListBox:RID_SVXPAGE_BORDER:LB_LINECOLOR");
+ public static final VclField Area_Border_Mf_Left =
field("cui:MetricField:RID_SVXPAGE_BORDER:MF_LEFT");
+ public static final VclField Area_Border_Mf_Right =
field("cui:MetricField:RID_SVXPAGE_BORDER:MF_RIGHT");
+ public static final VclField Area_Border_Mf_Top =
field("cui:MetricField:RID_SVXPAGE_BORDER:MF_TOP");
+ public static final VclField Area_Border_Mf_Bottom =
field("cui:MetricField:RID_SVXPAGE_BORDER:MF_BOTTOM");
+ public static final VclButton Area_Border_Sync =
button("cui:CheckBox:RID_SVXPAGE_BORDER:CB_SYNC");
+ // Presentation:"Textbox Property" dialog
+ public static final VclToolBox Textbox_Toolbar =
toolbox(".HelpId:textbar");
+ public static final VclButton SD_InsertTextboxButtonOnToolbar =
button(".uno:Text");
+ public static final VclButton SD_FormatArea = button(".uno:FormatArea");
+
}