### Eclipse Workspace Patch 1.0 #P testgui Index: source/testlib/gui/UIMap.java =================================================================== --- source/testlib/gui/UIMap.java (revision 1369733) +++ source/testlib/gui/UIMap.java (working copy) @@ -351,11 +351,52 @@ // Spreadsheet: "Select Sheets" dialog public static final VclDialog SCSelectSheetsDlg = dialog(".uno:SelectTables"); public static final VclListBox SCSheetsList = listbox("SC_HID_SELECTTABLES"); + + // Presentation:"Table" 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"); + + public static final VclWindow SD_NavigatorDlg = window("SD_HID_SD_NAVIGATOR"); public static final VclTabPage SD_HeaderAndFooterDlgSlideTab = tabpage("SD_HID_SD_TABPAGE_HEADERFOOTER_SLIDE"); public static final VclButton SC_FunctionWizardDlg_Next = button("formula:PushButton:RID_FORMULADLG_FORMULA:BTN_FORWARD"); public static final VclTreeListBox OptionsDlg_PathTabTree = tree("CUI_HID_OPTPATH_CTL_PATH"); public static final VclTreeListBox OptionsDlg_MicorOfficeTree = tree("CUI_HID_OFAPAGE_MSFLTR2_CLB"); + } Index: source/testcase/gui/sd/table/ChangeTableBackgroundProperty.java =================================================================== --- source/testcase/gui/sd/table/ChangeTableBackgroundProperty.java (revision 0) +++ source/testcase/gui/sd/table/ChangeTableBackgroundProperty.java (revision 0) @@ -0,0 +1,127 @@ +/************************************************************** + * + * 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.AppUtil.*; +import static testlib.gui.UIMap.*; +import static org.junit.Assert.*; +import static org.openoffice.test.common.Testspace.getPath; +import static org.openoffice.test.vcl.Tester.sleep; + +import org.junit.After; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.openoffice.test.common.FileUtil; +import org.openoffice.test.common.SystemUtil; +import org.openoffice.test.vcl.widgets.VclDialog; + +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(); + sleep(3); + + // Insert a table + app.dispatch(".uno:InsertTable", 3); + InsertTable.ok(); + sleep(3); + + // 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.getSelText(), Area_Fill_Type.getItemText(1)); + Area_Fill_Color.select(2); + //Area_Fill_Color.getItemCount(); + assertEquals(Area_Fill_Color.getSelText(), Area_Fill_Color.getItemText(2)); + sleep(3); + Area_Area_page.ok(); + sleep(3); + + // open Table Properties Dialog + app.dispatch(".uno:TableDialog", 3); + Area_Area_page.select(); + // select Gradient + Area_Fill_Type.select(2); + assertEquals(Area_Fill_Type.getSelText(), Area_Fill_Type.getItemText(2)); + Area_Fill_Gradient.select(2); + assertEquals(Area_Fill_Gradient.getSelText(), Area_Fill_Gradient.getItemText(2)); + sleep(3); + Area_Area_page.ok(); + sleep(3); + + // open Table Properties Dialog + app.dispatch(".uno:TableDialog", 3); + Area_Area_page.select(); + // select Hatching + Area_Fill_Type.select(3); + assertEquals(Area_Fill_Type.getSelText(), Area_Fill_Type.getItemText(3)); + Area_Fill_Hatching.select(2); + assertEquals(Area_Fill_Hatching.getSelText(), Area_Fill_Hatching.getItemText(2)); + sleep(3); + Area_Area_page.ok(); + sleep(3); + + // open Table Properties Dialog + app.dispatch(".uno:TableDialog", 3); + Area_Area_page.select(); + // select Bitmap + Area_Fill_Type.select(4); + assertEquals(Area_Fill_Type.getSelText(), Area_Fill_Type.getItemText(4)); + Area_Fill_Bitmap.select(2); + assertEquals(Area_Fill_Bitmap.getSelText(), Area_Fill_Bitmap.getItemText(2)); + sleep(3); + Area_Area_page.ok(); + sleep(3); + + } + +}