Author: dmaliarevich
Date: 2010-02-10 03:49:50 -0500 (Wed, 10 Feb 2010)
New Revision: 20213
Added:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/wizard/
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/wizard/ImportUnknownTagsWizardTest.java
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2795, adding SWTBot Test.
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java 2010-02-10
04:48:29 UTC (rev 20212)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java 2010-02-10
08:49:50 UTC (rev 20213)
@@ -23,6 +23,7 @@
import org.jboss.tools.vpe.ui.bot.test.smoke.RenameJSPFileTest;
import org.jboss.tools.vpe.ui.bot.test.smoke.RenameXHTMLFileTest;
import org.jboss.tools.vpe.ui.bot.test.smoke.XHTMLPageCreationTest;
+import org.jboss.tools.vpe.ui.bot.test.wizard.ImportUnknownTagsWizardTest;
public class VPEAllBotTests extends SWTBotTestCase{
public static Test suite(){
@@ -47,6 +48,8 @@
suite.addTestSuite(RenameFacesConfigFileTest.class);
suite.addTestSuite(RenameJSPFileTest.class);
suite.addTestSuite(RenameXHTMLFileTest.class);
+ suite.addTestSuite(ImportUnknownTagsWizardTest.class);
+
return new TestSetup(suite);
}
}
Added:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/wizard/ImportUnknownTagsWizardTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/wizard/ImportUnknownTagsWizardTest.java
(rev 0)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/wizard/ImportUnknownTagsWizardTest.java 2010-02-10
08:49:50 UTC (rev 20213)
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2010 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.ui.bot.test.wizard;
+
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.jboss.tools.ui.bot.test.WidgetVariables;
+import org.jboss.tools.vpe.ui.bot.test.VPEAutoTestCase;
+
+public class ImportUnknownTagsWizardTest extends VPEAutoTestCase {
+
+ private final String STORED_TAGS_PATH = "storedTags.xml"; //$NON-NLS-1$
+
+ public ImportUnknownTagsWizardTest() {
+ }
+
+ @Override
+ protected void closeUnuseDialogs() {
+
+ }
+
+ @Override
+ protected boolean isUnuseDialogOpened() {
+ return false;
+ }
+
+ public void _testImportWizard() throws Throwable {
+ bot.menu("File").menu("Import...").click(); //$NON-NLS-1$
//$NON-NLS-2$
+ bot.shell("Import").activate(); //$NON-NLS-1$
+ SWTBotTree importTree = bot.tree();
+ importTree.expandNode("Other").select("Unknown tags templates");
//$NON-NLS-1$ //$NON-NLS-2$
+ bot.button(WidgetVariables.NEXT_BUTTON).click();
+ bot.text().setText(STORED_TAGS_PATH);
+ }
+
+ protected void openPage() {
+ SWTBot innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER).bot();
+ SWTBotTree tree = innerBot.tree();
+ tree.expandNode(JBT_TEST_PROJECT_NAME)
+ .expandNode("WebContent").expandNode("pages").getNode(TEST_PAGE).doubleClick();
//$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+}