xref: /AOO41X/test/testgui/source/fvt/gui/sc/chart/ChartDialogSetting.java (revision 424494b095bc90dc2fe31bd4233af124f1760355)
180a6f5c5SLiu Zhe /**************************************************************
280a6f5c5SLiu Zhe  *
380a6f5c5SLiu Zhe  * Licensed to the Apache Software Foundation (ASF) under one
480a6f5c5SLiu Zhe  * or more contributor license agreements.  See the NOTICE file
580a6f5c5SLiu Zhe  * distributed with this work for additional information
680a6f5c5SLiu Zhe  * regarding copyright ownership.  The ASF licenses this file
780a6f5c5SLiu Zhe  * to you under the Apache License, Version 2.0 (the
880a6f5c5SLiu Zhe  * "License"); you may not use this file except in compliance
980a6f5c5SLiu Zhe  * with the License.  You may obtain a copy of the License at
1080a6f5c5SLiu Zhe  *
1180a6f5c5SLiu Zhe  *   http://www.apache.org/licenses/LICENSE-2.0
1280a6f5c5SLiu Zhe  *
1380a6f5c5SLiu Zhe  * Unless required by applicable law or agreed to in writing,
1480a6f5c5SLiu Zhe  * software distributed under the License is distributed on an
1580a6f5c5SLiu Zhe  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
1680a6f5c5SLiu Zhe  * KIND, either express or implied.  See the License for the
1780a6f5c5SLiu Zhe  * specific language governing permissions and limitations
1880a6f5c5SLiu Zhe  * under the License.
1980a6f5c5SLiu Zhe  *
2080a6f5c5SLiu Zhe  *************************************************************/
2180a6f5c5SLiu Zhe 
2280a6f5c5SLiu Zhe /**
2380a6f5c5SLiu Zhe  *
2480a6f5c5SLiu Zhe  */
2580a6f5c5SLiu Zhe package fvt.gui.sc.chart;
2680a6f5c5SLiu Zhe 
2780a6f5c5SLiu Zhe import static org.junit.Assert.*;
2880a6f5c5SLiu Zhe import static testlib.gui.UIMap.*;
2980a6f5c5SLiu Zhe 
3080a6f5c5SLiu Zhe import org.junit.After;
3180a6f5c5SLiu Zhe import org.junit.Before;
3280a6f5c5SLiu Zhe import org.junit.Rule;
3380a6f5c5SLiu Zhe import org.junit.Test;
3480a6f5c5SLiu Zhe import org.openoffice.test.common.Logger;
3580a6f5c5SLiu Zhe 
36*424494b0SLi Feng Wang import testlib.gui.AppTool;
37*424494b0SLi Feng Wang 
3880a6f5c5SLiu Zhe /**
3980a6f5c5SLiu Zhe  * Test the setting about chart dialog in spreadsheet
4080a6f5c5SLiu Zhe  */
4180a6f5c5SLiu Zhe public class ChartDialogSetting {
4280a6f5c5SLiu Zhe 
4380a6f5c5SLiu Zhe 	@Before
4480a6f5c5SLiu Zhe 	public void setUp() throws Exception {
4580a6f5c5SLiu Zhe 		app.start(true);
46*424494b0SLi Feng Wang 		AppTool.newSpreadsheet();
4780a6f5c5SLiu Zhe 		app.dispatch(".uno:InsertObjectChart");
4880a6f5c5SLiu Zhe 	}
4980a6f5c5SLiu Zhe 
5080a6f5c5SLiu Zhe 	@After
5180a6f5c5SLiu Zhe 	public void tearDown() throws Exception {
52*424494b0SLi Feng Wang 		app.stop();
5380a6f5c5SLiu Zhe 
5480a6f5c5SLiu Zhe 	}
5580a6f5c5SLiu Zhe 
5680a6f5c5SLiu Zhe 	/**
5780a6f5c5SLiu Zhe 	 * Test cancel and back button in chart wizard dialog
5880a6f5c5SLiu Zhe 	 *
5980a6f5c5SLiu Zhe 	 * @throws java.lang.Exception
6080a6f5c5SLiu Zhe 	 */
6180a6f5c5SLiu Zhe 	@Test
6280a6f5c5SLiu Zhe 	public void testChartDialogCancelBack() {
6380a6f5c5SLiu Zhe 		wizardNextButton.click();
64*424494b0SLi Feng Wang 		assertTrue("Range Choose Tab is disable",chartRangeChooseTabPage.isEnabled());
6580a6f5c5SLiu Zhe 		wizardBackButton.click();
66*424494b0SLi Feng Wang 		assertTrue("Type Choose Tab is disable",chartTypeChooseTabPage.isEnabled());
6780a6f5c5SLiu Zhe 		chartWizard.cancel();
68*424494b0SLi Feng Wang 		assertFalse("Chart wizard not exist", chartWizard.exists());
6980a6f5c5SLiu Zhe 	}
7080a6f5c5SLiu Zhe }
71