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

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

716 scFunctionWizardDlg.ok();
717 sleep(1);
718 // Verify if the calculated result is equal to the expected result
719 String result = SCTool.getCellText("B1");
720 sleep(1);
721 assertEquals("The calculated result", expectedResult, result);
722 discard();
723 }
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

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

716 scFunctionWizardDlg.ok();
717 sleep(1);
718 // Verify if the calculated result is equal to the expected result
719 String result = SCTool.getCellText("B1");
720 sleep(1);
721 assertEquals("The calculated result", expectedResult, result);
722 discard();
723 }
724
725 /**
726 * Test open a non-http(s) type hyperlink (with host only) in a text document.
727 * (coverage included in fvt.gui.sw.hyperlink.WarningDialog
728 * testHyperlinkDisplaysWarning() and included here for build verification)
729 * 1. New a text document
730 * 2. Insert a dav type hyperlink
731 * 3. Open hyperlink
732 * 4. Verify security warning dialog is displayed
733 *
734 * @throws Exception
735 */
736 @Test
737 public void testNonHttpHyperlinkWithHostOnly() throws Exception {
738 // Create a new text document
739 newTextDocument();
740 writer.waitForExistence(10, 2);
741 // open the hyperlink dialog
742 writer.typeKeys("<alt i>"); // insert menu
743 writer.typeKeys("h"); // hyperlink
744 hyperlinkInetPathComboBox.setText("dav://nonexistant.url.com"); //target
745 hyperlinkInetText.setText("dav://nonexistant.url.com"); // displayed text
746 hyperlinkDialogOkBtn.click(); // apply
747 hyperlinkDialogCancelBtn.click(); // close
748 sleep(1); // give the dialog time to close
749 typeKeys("<shift F10>"); // context menu
750 typeKeys("o"); // open hyperlink
751 // we can't be sure of the language so just check for the dialog
752 boolean msgExists = activeMsgBox.exists(1); // wait 1 second for the dialog
753 if (msgExists) {
754 activeMsgBox.no(); // close dialog
755 }
756 assertTrue("security warning not displayed", msgExists);
757 discard();
758 }
759
724}
760}