BasicFunctionTest.java (44cf0280) | BasicFunctionTest.java (7d082fd9) |
---|---|
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 --- 667 unchanged lines hidden (view full) --- 676 scFunctionWizardDlgFunctionList.select("ABS"); 677 scFunctionWizardDlgNext.click(); // Use "Next" button 678 scFunctionWizardDlgEdit1.typeKeys("A1"); 679 scFunctionWizardDlg.ok(); 680 // Verify if the calculated result is equal to the expected result 681 assertEquals("The calculated result", expectedResult, SCTool.getCellText("B1")); 682 discard(); 683 } | 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 --- 667 unchanged lines hidden (view full) --- 676 scFunctionWizardDlgFunctionList.select("ABS"); 677 scFunctionWizardDlgNext.click(); // Use "Next" button 678 scFunctionWizardDlgEdit1.typeKeys("A1"); 679 scFunctionWizardDlg.ok(); 680 // Verify if the calculated result is equal to the expected result 681 assertEquals("The calculated result", expectedResult, SCTool.getCellText("B1")); 682 discard(); 683 } |
684 685 /** 686 * Test open a non-http(s) type hyperlink (with host only) in a text document. 687 * (coverage included in fvt.gui.sw.hyperlink.WarningDialog 688 * testHyperlinkDisplaysWarning() and included here for build verification) 689 * 1. New a text document 690 * 2. Insert a dav type hyperlink 691 * 3. Open hyperlink 692 * 4. Verify security warning dialog is displayed 693 * 694 * @throws Exception 695 */ 696 @Test 697 public void testNonHttpHyperlinkWithHostOnly() throws Exception { 698 // Create a new text document 699 newTextDocument(); 700 writer.waitForExistence(10, 2); 701 // open the hyperlink dialog 702 writer.typeKeys("<alt i>"); // insert menu 703 writer.typeKeys("h"); // hyperlink 704 hyperlinkInetPathComboBox.setText("dav://nonexistant.url.com"); //target 705 hyperlinkInetText.setText("dav://nonexistant.url.com"); // displayed text 706 hyperlinkDialogOkBtn.click(); // apply 707 hyperlinkDialogCancelBtn.click(); // close 708 sleep(1); // give the dialog time to close 709 typeKeys("<shift F10>"); // context menu 710 typeKeys("o"); // open hyperlink 711 // we can't be sure of the language so just check for the dialog 712 boolean msgExists = activeMsgBox.exists(1); // wait 1 second for the dialog 713 if (msgExists) { 714 activeMsgBox.no(); // close dialog 715 } 716 assertTrue("security warning not displayed", msgExists); 717 discard(); 718 } 719 |
|
684} | 720} |