BasicFunctionTest.java (a622bb93) BasicFunctionTest.java (495a0bca)
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

--- 161 unchanged lines hidden (view full) ---

170 open(prepareData("bvt/macro.ods"));
171 calc.waitForExistence(10, 2);
172 app.dispatch(".uno:RunMacro");
173 runMacroDlgCategories.expand("macro.ods");
174 runMacroDlgCategories.expand("Standard");
175 runMacroDlgCategories.select("Module1");
176 runMacroDlgCommands.select(0);
177 runMacroDlg.ok();
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

--- 161 unchanged lines hidden (view full) ---

170 open(prepareData("bvt/macro.ods"));
171 calc.waitForExistence(10, 2);
172 app.dispatch(".uno:RunMacro");
173 runMacroDlgCategories.expand("macro.ods");
174 runMacroDlgCategories.expand("Standard");
175 runMacroDlgCategories.select("Module1");
176 runMacroDlgCommands.select(0);
177 runMacroDlg.ok();
178 sleep(1);
178 assertEquals("A3 should be =1+3", "4", SCTool.getCellText("A3"));
179 discard();
180 }
181
182 /**
183 * Test the About Dialog show
184 *
185 */

--- 488 unchanged lines hidden (view full) ---

674 String expectedResult = "1";
675 SCTool.selectRange("A1");
676 typeKeys(sourceData);
677
678 // Insert a function via inputbar: COS
679 SCTool.selectRange("D1");
680 scInputBarInput.inputKeys("=COS(A1)");
681 typeKeys("<enter>");
179 assertEquals("A3 should be =1+3", "4", SCTool.getCellText("A3"));
180 discard();
181 }
182
183 /**
184 * Test the About Dialog show
185 *
186 */

--- 488 unchanged lines hidden (view full) ---

675 String expectedResult = "1";
676 SCTool.selectRange("A1");
677 typeKeys(sourceData);
678
679 // Insert a function via inputbar: COS
680 SCTool.selectRange("D1");
681 scInputBarInput.inputKeys("=COS(A1)");
682 typeKeys("<enter>");
682
683 sleep(1);
683 // Verify if the calculated result is equal to the expected result
684 // Verify if the calculated result is equal to the expected result
684 assertEquals("The calculated result", expectedResult, SCTool.getCellText("D1"));
685 String result = SCTool.getCellText("D1");
686 sleep(1);
687 assertEquals("The calculated result", expectedResult, result);
685 discard();
686 }
687
688 /**
689 * Test insert a function in a spreadsheet document via Function Wizard
690 * Dialog 1. New a spreadsheet document 2. Insert a function via Function
691 * Wizard Dialog: ABS 3. Check if the result is correct
692 *

--- 11 unchanged lines hidden (view full) ---

704 typeKeys("<enter>");
705 // Insert a function via Function Wizard Dialog: ABS
706 SCTool.selectRange("B1");
707 app.dispatch(".uno:FunctionDialog");
708 // SC_FunctionWizardDlg_FunctionList.doubleClick(5, 5);
709 scFunctionWizardDlgFunctionList.select("ABS");
710 scFunctionWizardDlgNext.click(); // Use "Next" button
711 scFunctionWizardDlgEdit1.typeKeys("A1");
688 discard();
689 }
690
691 /**
692 * Test insert a function in a spreadsheet document via Function Wizard
693 * Dialog 1. New a spreadsheet document 2. Insert a function via Function
694 * Wizard Dialog: ABS 3. Check if the result is correct
695 *

--- 11 unchanged lines hidden (view full) ---

707 typeKeys("<enter>");
708 // Insert a function via Function Wizard Dialog: ABS
709 SCTool.selectRange("B1");
710 app.dispatch(".uno:FunctionDialog");
711 // SC_FunctionWizardDlg_FunctionList.doubleClick(5, 5);
712 scFunctionWizardDlgFunctionList.select("ABS");
713 scFunctionWizardDlgNext.click(); // Use "Next" button
714 scFunctionWizardDlgEdit1.typeKeys("A1");
715 sleep(1);
712 scFunctionWizardDlg.ok();
716 scFunctionWizardDlg.ok();
717 sleep(1);
713 // Verify if the calculated result is equal to the expected result
718 // Verify if the calculated result is equal to the expected result
714 assertEquals("The calculated result", expectedResult, SCTool.getCellText("B1"));
719 String result = SCTool.getCellText("B1");
720 sleep(1);
721 assertEquals("The calculated result", expectedResult, result);
715 discard();
716 }
717}
722 discard();
723 }
724}