1*80a6f5c5SLiu Zhe /************************************************************** 2*80a6f5c5SLiu Zhe * 3*80a6f5c5SLiu Zhe * Licensed to the Apache Software Foundation (ASF) under one 4*80a6f5c5SLiu Zhe * or more contributor license agreements. See the NOTICE file 5*80a6f5c5SLiu Zhe * distributed with this work for additional information 6*80a6f5c5SLiu Zhe * regarding copyright ownership. The ASF licenses this file 7*80a6f5c5SLiu Zhe * to you under the Apache License, Version 2.0 (the 8*80a6f5c5SLiu Zhe * "License"); you may not use this file except in compliance 9*80a6f5c5SLiu Zhe * with the License. You may obtain a copy of the License at 10*80a6f5c5SLiu Zhe * 11*80a6f5c5SLiu Zhe * http://www.apache.org/licenses/LICENSE-2.0 12*80a6f5c5SLiu Zhe * 13*80a6f5c5SLiu Zhe * Unless required by applicable law or agreed to in writing, 14*80a6f5c5SLiu Zhe * software distributed under the License is distributed on an 15*80a6f5c5SLiu Zhe * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*80a6f5c5SLiu Zhe * KIND, either express or implied. See the License for the 17*80a6f5c5SLiu Zhe * specific language governing permissions and limitations 18*80a6f5c5SLiu Zhe * under the License. 19*80a6f5c5SLiu Zhe * 20*80a6f5c5SLiu Zhe *************************************************************/ 21*80a6f5c5SLiu Zhe 22*80a6f5c5SLiu Zhe /** 23*80a6f5c5SLiu Zhe * 24*80a6f5c5SLiu Zhe */ 25*80a6f5c5SLiu Zhe package fvt.gui.sc.chart; 26*80a6f5c5SLiu Zhe 27*80a6f5c5SLiu Zhe import static org.junit.Assert.*; 28*80a6f5c5SLiu Zhe import static testlib.gui.UIMap.*; 29*80a6f5c5SLiu Zhe 30*80a6f5c5SLiu Zhe import org.junit.After; 31*80a6f5c5SLiu Zhe import org.junit.Before; 32*80a6f5c5SLiu Zhe import org.junit.Rule; 33*80a6f5c5SLiu Zhe import org.junit.Test; 34*80a6f5c5SLiu Zhe import org.openoffice.test.common.Logger; 35*80a6f5c5SLiu Zhe 36*80a6f5c5SLiu Zhe /** 37*80a6f5c5SLiu Zhe * Test the setting about chart dialog in spreadsheet 38*80a6f5c5SLiu Zhe */ 39*80a6f5c5SLiu Zhe public class ChartDialogSetting { 40*80a6f5c5SLiu Zhe 41*80a6f5c5SLiu Zhe @Rule 42*80a6f5c5SLiu Zhe public Logger log = Logger.getLogger(this); 43*80a6f5c5SLiu Zhe 44*80a6f5c5SLiu Zhe @Before 45*80a6f5c5SLiu Zhe public void setUp() throws Exception { 46*80a6f5c5SLiu Zhe app.start(true); 47*80a6f5c5SLiu Zhe 48*80a6f5c5SLiu Zhe // Create a new spreadsheet document 49*80a6f5c5SLiu Zhe app.dispatch("private:factory/scalc"); 50*80a6f5c5SLiu Zhe calc.waitForExistence(10, 2); 51*80a6f5c5SLiu Zhe app.dispatch(".uno:InsertObjectChart"); 52*80a6f5c5SLiu Zhe } 53*80a6f5c5SLiu Zhe 54*80a6f5c5SLiu Zhe @After 55*80a6f5c5SLiu Zhe public void tearDown() throws Exception { 56*80a6f5c5SLiu Zhe 57*80a6f5c5SLiu Zhe } 58*80a6f5c5SLiu Zhe 59*80a6f5c5SLiu Zhe /** 60*80a6f5c5SLiu Zhe * Test cancel and back button in chart wizard dialog 61*80a6f5c5SLiu Zhe * 62*80a6f5c5SLiu Zhe * @throws java.lang.Exception 63*80a6f5c5SLiu Zhe */ 64*80a6f5c5SLiu Zhe @Test 65*80a6f5c5SLiu Zhe public void testChartDialogCancelBack() { 66*80a6f5c5SLiu Zhe wizardNextButton.click(); 67*80a6f5c5SLiu Zhe assertTrue(chartRangeChooseTabPage.isEnabled()); 68*80a6f5c5SLiu Zhe wizardBackButton.click(); 69*80a6f5c5SLiu Zhe assertTrue(chartTypeChooseTabPage.isEnabled()); 70*80a6f5c5SLiu Zhe chartWizard.cancel(); 71*80a6f5c5SLiu Zhe assertFalse(chartWizard.exists()); 72*80a6f5c5SLiu Zhe } 73*80a6f5c5SLiu Zhe } 74