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 36424494b0SLi Feng Wang import testlib.gui.AppTool; 37424494b0SLi Feng Wang 3880a6f5c5SLiu Zhe /** 3980a6f5c5SLiu Zhe * Test the setting about chart dialog in spreadsheet 4080a6f5c5SLiu Zhe */ 4180a6f5c5SLiu Zhe public class ChartDialogSetting { 42*fd348426SLi Feng Wang @Rule 43*fd348426SLi Feng Wang public Logger log = Logger.getLogger(this); 4480a6f5c5SLiu Zhe 4580a6f5c5SLiu Zhe @Before setUp()4680a6f5c5SLiu Zhe public void setUp() throws Exception { 4780a6f5c5SLiu Zhe app.start(true); 48424494b0SLi Feng Wang AppTool.newSpreadsheet(); 4980a6f5c5SLiu Zhe app.dispatch(".uno:InsertObjectChart"); 5080a6f5c5SLiu Zhe } 5180a6f5c5SLiu Zhe 5280a6f5c5SLiu Zhe @After tearDown()5380a6f5c5SLiu Zhe public void tearDown() throws Exception { 54424494b0SLi Feng Wang app.stop(); 5580a6f5c5SLiu Zhe 5680a6f5c5SLiu Zhe } 5780a6f5c5SLiu Zhe 5880a6f5c5SLiu Zhe /** 5980a6f5c5SLiu Zhe * Test cancel and back button in chart wizard dialog 6080a6f5c5SLiu Zhe * 6180a6f5c5SLiu Zhe * @throws java.lang.Exception 6280a6f5c5SLiu Zhe */ 6380a6f5c5SLiu Zhe @Test testChartDialogCancelBack()6480a6f5c5SLiu Zhe public void testChartDialogCancelBack() { 6580a6f5c5SLiu Zhe wizardNextButton.click(); 66424494b0SLi Feng Wang assertTrue("Range Choose Tab is disable",chartRangeChooseTabPage.isEnabled()); 6780a6f5c5SLiu Zhe wizardBackButton.click(); 68424494b0SLi Feng Wang assertTrue("Type Choose Tab is disable",chartTypeChooseTabPage.isEnabled()); 6980a6f5c5SLiu Zhe chartWizard.cancel(); 70424494b0SLi Feng Wang assertFalse("Chart wizard not exist", chartWizard.exists()); 7180a6f5c5SLiu Zhe } 7280a6f5c5SLiu Zhe } 73