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 |
} |