Author: mareshkau
Date: 2010-05-06 10:08:46 -0400 (Thu, 06 May 2010)
New Revision: 21935
Added:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/wizard/VPESourceCodeTemplatesPreferencePageTest.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-6131, simple test case in which pref page are
opened has been added
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-05-06
13:27:44 UTC (rev 21934)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java 2010-05-06
14:08:46 UTC (rev 21935)
@@ -25,6 +25,7 @@
import org.jboss.tools.vpe.ui.bot.test.smoke.XHTMLPageCreationTest;
import org.jboss.tools.vpe.ui.bot.test.wizard.ImportUnknownTagsWizardTest;
import org.jboss.tools.vpe.ui.bot.test.wizard.NewXHTMLPageWizardTest;
+import org.jboss.tools.vpe.ui.bot.test.wizard.VPESourceCodeTemplatesPreferencePageTest;
public class VPEAllBotTests extends SWTBotTestCase{
public static Test suite(){
@@ -51,6 +52,7 @@
suite.addTestSuite(RenameXHTMLFileTest.class);
suite.addTestSuite(ImportUnknownTagsWizardTest.class);
suite.addTestSuite(NewXHTMLPageWizardTest.class);
+ suite.addTestSuite(VPESourceCodeTemplatesPreferencePageTest.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/VPESourceCodeTemplatesPreferencePageTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/wizard/VPESourceCodeTemplatesPreferencePageTest.java
(rev 0)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/wizard/VPESourceCodeTemplatesPreferencePageTest.java 2010-05-06
14:08:46 UTC (rev 21935)
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.ui.bot.test.wizard;
+
+import org.eclipse.swtbot.swt.finder.SWTBotTestCase;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+
+/**
+ * This test class open vpe preference page
+ * Window->Preferences->JBoss Tools->Web->Editors->Visual Page
Editor->Templates
+ *
+ * @author mareshkau
+ *
+ */
+public class VPESourceCodeTemplatesPreferencePageTest extends SWTBotTestCase{
+
+ //just open a VPE Source Code templates preference test page
+ public void testSourceCodeTemplatesPreferencePage() {
+ this.bot.menu("Window").menu("Preferences").click(); //$NON-NLS-1$
//$NON-NLS-2$
+ SWTBotTree preferenceTree = this.bot.tree();
+ preferenceTree
+ .expandNode("JBoss Tools") //$NON-NLS-1$
+ .expandNode("Web") //$NON-NLS-1$
+ .expandNode("Editors") //$NON-NLS-1$
+ .expandNode("Visual Page Editor") //$NON-NLS-1$
+ .select("Templates").click(); //$NON-NLS-1$
+ this.bot.button("New...").click(); //$NON-NLS-1$
+ this.bot.button("Cancel").click(); //$NON-NLS-1$
+ System.out.println(this.bot.activeShell().getText());
+ }
+}