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

(-)source/testlib/gui/UIMap.java (-2 / +42 lines)
Lines 20-26 Link Here
20
 *************************************************************/
20
 *************************************************************/
21
21
22
22
23
24
package testlib.gui;
23
package testlib.gui;
25
import java.io.File;
24
import java.io.File;
26
25
Lines 357-361 Link Here
357
	public static final VclTreeListBox OptionsDlg_PathTabTree = tree("CUI_HID_OPTPATH_CTL_PATH");
356
	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");
357
	public static final VclTreeListBox OptionsDlg_MicorOfficeTree = tree("CUI_HID_OFAPAGE_MSFLTR2_CLB");
359
	
358
	
360
	
359
	// Presentation:"Table Property" dialog
360
	public static final VclButton impress_WizardDlg_Next = button("sd:PushButton:DLG_ASS:BUT_NEXT");
361
	public static final VclListBox Area_Fill_Color = listbox("cui:ListBox:RID_SVXPAGE_AREA:LB_COLOR");
362
	public static final VclTabPage Area_Area_page = tabpage("CUI_HID_AREA_AREA");
363
	public static final VclListBox Area_Fill_Type = listbox("cui:ListBox:RID_SVXPAGE_AREA:LB_AREA_TYPE");
364
	public static final VclListBox Area_Fill_Gradient = listbox("cui:ListBox:RID_SVXPAGE_AREA:LB_GRADIENT");
365
	public static final VclListBox Area_Fill_Hatching = listbox("cui:ListBox:RID_SVXPAGE_AREA:LB_HATCHING");
366
	public static final VclListBox Area_Fill_Bitmap = listbox("cui:ListBox:RID_SVXPAGE_AREA:LB_BITMAP");
367
	public static final VclTabPage Area_Border_page = tabpage("CUI_HID_BORDER");
368
	public static final VclTabPage Area_Font_page = tabpage("CUI_HID_SVXPAGE_CHAR_NAME");
369
	public static final VclComboBox Area_Font_Western_Font_Name = combobox("cui:ComboBox:RID_SVXPAGE_CHAR_NAME:LB_WEST_NAME");
370
	public static final VclComboBox Area_Font_Western_Style = combobox("cui:ComboBox:RID_SVXPAGE_CHAR_NAME:LB_WEST_STYLE");
371
	public static final VclListBox Area_Font_Western_Size = listbox("cui:MetricBox:RID_SVXPAGE_CHAR_NAME:LB_WEST_SIZE");
372
	public static final VclListBox Area_Font_Western_Lang = listbox("cui:ListBox:RID_SVXPAGE_CHAR_NAME:LB_WEST_LANG");
373
	public static final VclComboBox Area_Font_Eastern_Font_Name = combobox("cui:ComboBox:RID_SVXPAGE_CHAR_NAME:LB_EAST_NAME");
374
	public static final VclComboBox Area_Font_Eastern_Style = combobox("cui:ComboBox:RID_SVXPAGE_CHAR_NAME:LB_EAST_STYLE");
375
	public static final VclListBox Area_Font_Eastern_Size = listbox("cui:MetricBox:RID_SVXPAGE_CHAR_NAME:LB_EAST_SIZE");
376
	public static final VclListBox Area_Font_Eastern_Lang = listbox("cui:ListBox:RID_SVXPAGE_CHAR_NAME:LB_EAST_LANG");
377
	public static final VclListBox EffectsPage_Relief = listbox("cui:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_RELIEF");
378
	public static final VclButton EffectsPage_Outline = button("cui:TriStateBox:RID_SVXPAGE_CHAR_EFFECTS:CB_OUTLINE");
379
	public static final VclButton EffectsPage_Shadow = button("cui:TriStateBox:RID_SVXPAGE_CHAR_EFFECTS:CB_SHADOW");
380
	public static final VclListBox EffectsPage_Overline = listbox("cui:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_OVERLINE");
381
	public static final VclListBox EffectsPage_Overline_Color = listbox("cui:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_OVERLINE_COLOR");
382
	public static final VclListBox EffectsPage_Strikeout = listbox("cui:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_STRIKEOUT");
383
	public static final VclListBox EffectsPage_Underline = listbox("cui:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_UNDERLINE");
384
	public static final VclListBox EffectsPage_Underline_Color = listbox("cui:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_UNDERLINE_COLOR");
385
	public static final VclButton EffectsPage_InvidiualWords = button("cui:CheckBox:RID_SVXPAGE_CHAR_EFFECTS:CB_INDIVIDUALWORDS");
386
	public static final VclListBox EffectsPage_Emphasis = listbox("cui:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_EMPHASIS");
387
	public static final VclListBox EffectsPage_Position = listbox("cui:ListBox:RID_SVXPAGE_CHAR_EFFECTS:LB_POSITION");
388
	public static final VclControl Area_Border_Presets = control("CUI_HID_BORDER_CTL_PRESETS");
389
	public static final VclListBox Area_Border_LineStyle = listbox("cui:ListBox:RID_SVXPAGE_BORDER:LB_LINESTYLE");
390
	public static final VclListBox Area_Border_LineColor = listbox("cui:ListBox:RID_SVXPAGE_BORDER:LB_LINECOLOR");
391
	public static final VclField Area_Border_Mf_Left = field("cui:MetricField:RID_SVXPAGE_BORDER:MF_LEFT");
392
	public static final VclField Area_Border_Mf_Right = field("cui:MetricField:RID_SVXPAGE_BORDER:MF_RIGHT");
393
	public static final VclField Area_Border_Mf_Top = field("cui:MetricField:RID_SVXPAGE_BORDER:MF_TOP");
394
	public static final VclField Area_Border_Mf_Bottom = field("cui:MetricField:RID_SVXPAGE_BORDER:MF_BOTTOM");
395
	public static final VclButton Area_Border_Sync = button("cui:CheckBox:RID_SVXPAGE_BORDER:CB_SYNC");
396
	// Presentation:"Textbox Property" dialog
397
	public static final VclToolBox Textbox_Toolbar = toolbox(".HelpId:textbar");
398
	public static final VclButton SD_InsertTextboxButtonOnToolbar = button(".uno:Text");
399
	public static final VclButton SD_FormatArea = button(".uno:FormatArea");
400
361
}
401
}
(-)source/testcase/gui/sd/table/ChangeTableFontEffectsProperty.java (+112 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 org.junit.Assert.assertEquals;
25
import static org.junit.Assert.assertTrue;
26
import static testlib.gui.UIMap.*;
27
28
import org.junit.After;
29
import org.junit.Before;
30
import org.junit.Rule;
31
import org.junit.Test;
32
33
import testlib.gui.Log;
34
35
public class ChangeTableFontEffectsProperty {
36
	@Rule
37
	public Log LOG = new Log();
38
39
	@Before
40
	public void setUp() throws Exception {
41
		app.start();
42
	}
43
44
	@After
45
	public void tearDown() throws Exception {
46
		app.close();
47
	}
48
49
	/**
50
	 * Open the Font Effect property dialog in Presentation
51
	 * 
52
	 * @throws Exception
53
	 */
54
55
	@Test
56
	public void OpenTableFontEffectPropertyDialog() throws Exception {
57
58
		// Create a new presentation document
59
		app.dispatch("private:factory/simpress?slot=6686");
60
		PresentationWizard.ok();
61
62
		// Insert a table
63
		app.dispatch(".uno:InsertTable", 3);
64
		InsertTable.ok();
65
66
		// Verify if the table toolbar is active
67
		assertTrue("Table Toolbar exist",Table_Toolbar.exists(3));
68
69
		// open Table Properties Dialog
70
		app.dispatch(".uno:TableDialog", 3);
71
		EffectsPage.select();		
72
		// select Font color
73
		EffectsPage_Color.select(1);
74
		assertEquals("EffectsPage_Color is black",EffectsPage_Color.getSelText(), "Black");
75
		
76
		// select Relief
77
		EffectsPage_Relief.select(0);
78
		assertEquals("EffectsPage_Relief is no",EffectsPage_Relief.getSelText(), "(Without)");
79
		EffectsPage_Outline.check();
80
		assertTrue("EffectsPage_Outline is checked",EffectsPage_Outline.isChecked());
81
		EffectsPage_Shadow.check();
82
		assertTrue("EffectsPage_Shadow is checked",EffectsPage_Shadow.isChecked());
83
		
84
		// select Overlining
85
		EffectsPage_Overline.select(1);
86
		assertEquals("EffectsPage_Overline is first item",EffectsPage_Overline.getSelText(), EffectsPage_Overline.getItemText(1));
87
		EffectsPage_Overline_Color.select(1);
88
		assertEquals("EffectsPage_Overline_Color is first item",EffectsPage_Overline_Color.getSelText(), EffectsPage_Overline_Color.getItemText(1));
89
		
90
		// select Strikethrough
91
		EffectsPage_Strikeout.select(1);
92
		assertEquals("EffectsPage_Strikeout is first item",EffectsPage_Strikeout.getSelText(), EffectsPage_Strikeout.getItemText(1));
93
		
94
		// select Underlining
95
		EffectsPage_Underline.select(1);
96
		assertEquals("EffectsPage_Underline is first item",EffectsPage_Underline.getSelText(), EffectsPage_Underline.getItemText(1));
97
		EffectsPage_Underline_Color.select(1);
98
		assertEquals("EffectsPage_Underline_Color is first item",EffectsPage_Underline_Color.getSelText(), EffectsPage_Underline_Color.getItemText(1));
99
		
100
		// select individual workds
101
		EffectsPage_InvidiualWords.check();
102
		assertTrue("EffectsPage_InvidiualWords is checked",EffectsPage_InvidiualWords.isChecked());
103
		
104
		// select Emphasis Mark
105
		//EffectsPage_Emphasis.select(1);
106
		//assertEquals(EffectsPage_Emphasis.getSelText(), "Dot");
107
		//EffectsPage_Position.select(1);
108
		//assertEquals(EffectsPage_Position.getSelText(), "Below text");	
109
		EffectsPage.ok();
110
	
111
	}
112
}

Return to issue 120601