incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From liu...@apache.org
Subject svn commit: r1374152 - /incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sd/table/ChangeTableBorderProperty.java
Date Fri, 17 Aug 2012 06:17:38 GMT
Author: liuzhe
Date: Fri Aug 17 06:17:38 2012
New Revision: 1374152

URL: http://svn.apache.org/viewvc?rev=1374152&view=rev
Log:
#120579# - tesgui: testscripts for TableBorderProperty Function in presentation
Patch by: Tan Liu Ping <doneyourself@gmail.com>
Review by: Liu Zhe <aliuzhe@gmail.com>

Added:
    incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sd/table/ChangeTableBorderProperty.java

Added: incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sd/table/ChangeTableBorderProperty.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sd/table/ChangeTableBorderProperty.java?rev=1374152&view=auto
==============================================================================
--- incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sd/table/ChangeTableBorderProperty.java
(added)
+++ incubator/ooo/trunk/main/test/testgui/source/testcase/gui/sd/table/ChangeTableBorderProperty.java
Fri Aug 17 06:17:38 2012
@@ -0,0 +1,104 @@
+/**************************************************************
+ * 
+ * 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 org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.openoffice.test.vcl.Tester.sleep;
+import static testlib.gui.UIMap.*;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import testlib.gui.Log;
+
+public class ChangeTableBorderProperty {
+	@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 border property in Presentation
+	 * 
+	 * @throws Exception
+	 */
+
+	@Test
+	public void OpenTableBorderPropertyDialog() 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_Border_page.select();		
+		
+		Area_Border_Presets.click(0.01, 0.01);
+		
+		// select Line
+		Area_Border_LineStyle.select(1);
+		assertEquals("Area_Border_LineStyle is first item",Area_Border_LineStyle.getSelText(),
Area_Border_LineStyle.getItemText(1));
+		
+		Area_Border_LineColor.select(1);
+		assertEquals("Area_Border_LineColor is first item",Area_Border_LineColor.getSelText(),
Area_Border_LineColor.getItemText(1));
+		
+		// select Spacing to Contents
+		Area_Border_Sync.check();
+		assertTrue("Area_Border_Sync is checked",Area_Border_Sync.isChecked());
+		
+		Area_Border_Mf_Left.setText("0.5");
+		assertTrue("Area_Border_Mf_Left is 0.5",Area_Border_Mf_Left.getText().startsWith("0.5"));
+		
+		Area_Border_Mf_Right.setText("0.5");
+		assertTrue("Area_Border_Mf_Right is 0.5",Area_Border_Mf_Right.getText().startsWith("0.5"));
+		
+		Area_Border_Mf_Top.setText("0.5");
+		assertTrue("Area_Border_Mf_Top is 0.5",Area_Border_Mf_Top.getText().startsWith("0.5"));
+		
+		Area_Border_Mf_Bottom.setText("0.5");
+		assertTrue("Area_Border_Mf_Bottom is 0.5",Area_Border_Mf_Bottom.getText().startsWith("0.5"));
+	
+		Area_Border_page.ok();
+			
+	}
+}



Mime
View raw message