View | Details | Raw Unified | Return to issue 120467
Collapse All | Expand All

(-)source/testlib/gui/UIMap.java (-1 / +42 lines)
Lines 357-361 Link Here
357
	public static final VclTreeListBox OptionsDlg_PathTabTree = tree("CUI_HID_OPTPATH_CTL_PATH");
357
	public static final VclTreeListBox OptionsDlg_PathTabTree = tree("CUI_HID_OPTPATH_CTL_PATH");
358
	public static final VclTreeListBox OptionsDlg_MicorOfficeTree = tree("CUI_HID_OFAPAGE_MSFLTR2_CLB");
358
	public static final VclTreeListBox OptionsDlg_MicorOfficeTree = tree("CUI_HID_OFAPAGE_MSFLTR2_CLB");
359
	
359
	
360
	
360
	// Presentation:"Table Property" dialog
361
	public static final VclButton impress_WizardDlg_Next = button("sd:PushButton:DLG_ASS:BUT_NEXT");
362
	public static final VclListBox Area_Fill_Color = listbox("cui:ListBox:RID_SVXPAGE_AREA:LB_COLOR");
363
	public static final VclTabPage Area_Area_page = tabpage("CUI_HID_AREA_AREA");
364
	public static final VclListBox Area_Fill_Type = listbox("cui:ListBox:RID_SVXPAGE_AREA:LB_AREA_TYPE");
365
	public static final VclListBox Area_Fill_Gradient = listbox("cui:ListBox:RID_SVXPAGE_AREA:LB_GRADIENT");
366
	public static final VclListBox Area_Fill_Hatching = listbox("cui:ListBox:RID_SVXPAGE_AREA:LB_HATCHING");
367
	public static final VclListBox Area_Fill_Bitmap = listbox("cui:ListBox:RID_SVXPAGE_AREA:LB_BITMAP");
368
	public static final VclTabPage Area_Border_page = tabpage("CUI_HID_BORDER");
369
	public static final VclTabPage Area_Font_page = tabpage("CUI_HID_SVXPAGE_CHAR_NAME");
370
	public static final VclComboBox Area_Font_Western_Font_Name = combobox("cui:ComboBox:RID_SVXPAGE_CHAR_NAME:LB_WEST_NAME");
371
	public static final VclComboBox Area_Font_Western_Style = combobox("cui:ComboBox:RID_SVXPAGE_CHAR_NAME:LB_WEST_STYLE");
372
	public static final VclListBox Area_Font_Western_Size = listbox("cui:MetricBox:RID_SVXPAGE_CHAR_NAME:LB_WEST_SIZE");
373
	public static final VclListBox Area_Font_Western_Lang = listbox("cui:ListBox:RID_SVXPAGE_CHAR_NAME:LB_WEST_LANG");
374
	public static final VclComboBox Area_Font_Eastern_Font_Name = combobox("cui:ComboBox:RID_SVXPAGE_CHAR_NAME:LB_EAST_NAME");
375
	public static final VclComboBox Area_Font_Eastern_Style = combobox("cui:ComboBox:RID_SVXPAGE_CHAR_NAME:LB_EAST_STYLE");
376
	public static final VclListBox Area_Font_Eastern_Size = listbox("cui:MetricBox:RID_SVXPAGE_CHAR_NAME:LB_EAST_SIZE");
377
	public static final VclListBox Area_Font_Eastern_Lang = listbox("cui:ListBox:RID_SVXPAGE_CHAR_NAME:LB_EAST_LANG");
378
	public static final VclListBox EffectsPage_Relief = listbox("cui:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_RELIEF");
379
	public static final VclButton EffectsPage_Outline = button("cui:TriStateBox:RID_SVXPAGE_CHAR_EFFECTS:CB_OUTLINE");
380
	public static final VclButton EffectsPage_Shadow = button("cui:TriStateBox:RID_SVXPAGE_CHAR_EFFECTS:CB_SHADOW");
381
	public static final VclListBox EffectsPage_Overline = listbox("cui:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_OVERLINE");
382
	public static final VclListBox EffectsPage_Overline_Color = listbox("cui:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_OVERLINE_COLOR");
383
	public static final VclListBox EffectsPage_Strikeout = listbox("cui:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_STRIKEOUT");
384
	public static final VclListBox EffectsPage_Underline = listbox("cui:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_UNDERLINE");
385
	public static final VclListBox EffectsPage_Underline_Color = listbox("cui:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_UNDERLINE_COLOR");
386
	public static final VclButton EffectsPage_InvidiualWords = button("cui:CheckBox:RID_SVXPAGE_CHAR_EFFECTS:CB_INDIVIDUALWORDS");
387
	public static final VclListBox EffectsPage_Emphasis = listbox("cui:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_EMPHASIS");
388
	public static final VclListBox EffectsPage_Position = listbox("cui:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_POSITION");
389
	public static final VclControl Area_Border_Presets = control("CUI_HID_BORDER_CTL_PRESETS");
390
	public static final VclListBox Area_Border_LineStyle = listbox("cui:ListBox:RID_SVXPAGE_BORDER:LB_LINESTYLE");
391
	public static final VclListBox Area_Border_LineColor = listbox("cui:ListBox:RID_SVXPAGE_BORDER:LB_LINECOLOR");
392
	public static final VclField Area_Border_Mf_Left = field("cui:MetricField:RID_SVXPAGE_BORDER:MF_LEFT");
393
	public static final VclField Area_Border_Mf_Right = field("cui:MetricField:RID_SVXPAGE_BORDER:MF_RIGHT");
394
	public static final VclField Area_Border_Mf_Top = field("cui:MetricField:RID_SVXPAGE_BORDER:MF_TOP");
395
	public static final VclField Area_Border_Mf_Bottom = field("cui:MetricField:RID_SVXPAGE_BORDER:MF_BOTTOM");
396
	public static final VclButton Area_Border_Sync = button("cui:CheckBox:RID_SVXPAGE_BORDER:CB_SYNC");
397
	// Presentation:"Textbox Property" dialog
398
	public static final VclToolBox Textbox_Toolbar = toolbox(".HelpId:textbar");
399
	public static final VclButton SD_InsertTextboxButtonOnToolbar = button(".uno:Text");
400
	public static final VclButton SD_FormatArea = button(".uno:FormatArea");
401
361
}
402
}
(-)source/testcase/gui/sd/table/ChangeTableBackgroundProperty.java (+118 lines)
Line 0 Link Here
1
/**************************************************************
2
 * 
3
 * Licensed to the Apache Software Foundation (ASF) under one
4
 * or more contributor license agreements.  See the NOTICE file
5
 * distributed with this work for additional information
6
 * regarding copyright ownership.  The ASF licenses this file
7
 * to you under the Apache License, Version 2.0 (the
8
 * "License"); you may not use this file except in compliance
9
 * with the License.  You may obtain a copy of the License at
10
 * 
11
 *   http://www.apache.org/licenses/LICENSE-2.0
12
 * 
13
 * Unless required by applicable law or agreed to in writing,
14
 * software distributed under the License is distributed on an
15
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
 * KIND, either express or implied.  See the License for the
17
 * specific language governing permissions and limitations
18
 * under the License.
19
 * 
20
 *************************************************************/
21
22
package testcase.gui.sd.table;
23
24
import static testlib.gui.AppUtil.*;
25
import static testlib.gui.UIMap.*;
26
import static org.junit.Assert.*;
27
import static org.openoffice.test.common.Testspace.getPath;
28
import static org.openoffice.test.vcl.Tester.sleep;
29
30
import org.junit.After;
31
import org.junit.Before;
32
import org.junit.Rule;
33
import org.junit.Test;
34
import org.openoffice.test.common.FileUtil;
35
import org.openoffice.test.common.SystemUtil;
36
import org.openoffice.test.vcl.widgets.VclDialog;
37
38
import testlib.gui.Log;
39
40
public class ChangeTableBackgroundProperty {
41
	@Rule
42
	public Log LOG = new Log();
43
44
	@Before
45
	public void setUp() throws Exception {
46
		app.start();
47
	}
48
49
	@After
50
	public void tearDown() throws Exception {
51
		app.close();
52
	}
53
54
	/**
55
	 * Open the Table Background property dialog in Presentation
56
	 * 
57
	 * @throws Exception
58
	 */
59
60
	@Test
61
	public void OpenTableBackgroundPropertyDialog() throws Exception {
62
63
		// Create a new presentation document
64
		app.dispatch("private:factory/simpress?slot=6686");
65
		PresentationWizard.ok();
66
67
		// Insert a table
68
		app.dispatch(".uno:InsertTable", 3);
69
		InsertTable.ok();
70
71
		// Verify if the table toolbar is active
72
		assertTrue(Table_Toolbar.exists(3));
73
74
		// open Table Properties Dialog
75
		app.dispatch(".uno:TableDialog", 3);		
76
		Area_Area_page.select();
77
		// select Color
78
		Area_Fill_Type.select(1);
79
		assertEquals("actual should be same with expected",Area_Fill_Type.getSelText(), Area_Fill_Type.getItemText(1));
80
		Area_Fill_Color.select(2);
81
		//Area_Fill_Color.getItemCount();
82
		assertEquals("actual should be same with expected",Area_Fill_Color.getSelText(), Area_Fill_Color.getItemText(2));
83
		Area_Area_page.ok();
84
85
		// open Table Properties Dialog
86
		app.dispatch(".uno:TableDialog", 3);
87
		Area_Area_page.select();
88
		// select Gradient
89
		Area_Fill_Type.select(2);
90
		assertEquals("actual should be same with expected",Area_Fill_Type.getSelText(), Area_Fill_Type.getItemText(2));
91
		Area_Fill_Gradient.select(2);
92
		assertEquals("actual should be same with expected",Area_Fill_Gradient.getSelText(), Area_Fill_Gradient.getItemText(2));
93
		Area_Area_page.ok();
94
		
95
96
		// open Table Properties Dialog
97
		app.dispatch(".uno:TableDialog", 3);
98
		Area_Area_page.select();
99
		// select Hatching
100
		Area_Fill_Type.select(3);
101
		assertEquals("actual should be same with expected",Area_Fill_Type.getSelText(), Area_Fill_Type.getItemText(3));
102
		Area_Fill_Hatching.select(2);
103
		assertEquals("actual should be same with expected",Area_Fill_Hatching.getSelText(), Area_Fill_Hatching.getItemText(2));
104
		Area_Area_page.ok();
105
	
106
		// open Table Properties Dialog
107
		app.dispatch(".uno:TableDialog", 3);
108
		Area_Area_page.select();
109
		// select Bitmap
110
		Area_Fill_Type.select(4);
111
		assertEquals("actual should be same with expected",Area_Fill_Type.getSelText(), Area_Fill_Type.getItemText(4));
112
		Area_Fill_Bitmap.select(2);
113
		assertEquals("actual should be same with expected",Area_Fill_Bitmap.getSelText(), Area_Fill_Bitmap.getItemText(2));
114
		Area_Area_page.ok();
115
116
	}
117
118
}

Return to issue 120467