Author: mareshkau
Date: 2010-04-14 10:08:07 -0400 (Wed, 14 Apr 2010)
New Revision: 21469
Added:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/wizard/NewXHTMLPageWizardTest.java
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/wizard/newfile/NewXHTMLWizard.java
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-5946
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/wizard/newfile/NewXHTMLWizard.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/wizard/newfile/NewXHTMLWizard.java 2010-04-14
12:58:06 UTC (rev 21468)
+++
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/wizard/newfile/NewXHTMLWizard.java 2010-04-14
14:08:07 UTC (rev 21469)
@@ -82,7 +82,7 @@
// no file extension specified so add default extension
String fileName = fNewFilePage.getFileName();
if (fileName.lastIndexOf('.') == -1) {
- String newFileName = fileName+".xthml"; //$NON-NLS-1$
+ String newFileName = fileName+".xhtml"; //$NON-NLS-1$
fNewFilePage.setFileName(newFileName);
}
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-04-14
12:58:06 UTC (rev 21468)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java 2010-04-14
14:08:07 UTC (rev 21469)
@@ -24,6 +24,7 @@
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;
+import org.jboss.tools.vpe.ui.bot.test.wizard.NewXHTMLPageWizardTest;
public class VPEAllBotTests extends SWTBotTestCase{
public static Test suite(){
@@ -49,7 +50,7 @@
suite.addTestSuite(RenameJSPFileTest.class);
suite.addTestSuite(RenameXHTMLFileTest.class);
suite.addTestSuite(ImportUnknownTagsWizardTest.class);
-
+ suite.addTestSuite(NewXHTMLPageWizardTest.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/NewXHTMLPageWizardTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/wizard/NewXHTMLPageWizardTest.java
(rev 0)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/wizard/NewXHTMLPageWizardTest.java 2010-04-14
14:08:07 UTC (rev 21469)
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * 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.widgets.SWTBotTree;
+import org.jboss.tools.ui.bot.test.WidgetVariables;
+import org.jboss.tools.vpe.ui.bot.test.VPEAutoTestCase;
+
+/**
+ * @author mareshkau
+ *
+ */
+public class NewXHTMLPageWizardTest extends VPEAutoTestCase{
+
+ @Override
+ protected void closeUnuseDialogs() {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ protected boolean isUnuseDialogOpened() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public void testNewXHTMLPageWizard() {
+ /*
+ * Open wizard page
+ */
+ this.bot.menu("File").menu("New").menu("Other...").click();
//$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
+ this.bot.shell("New").activate(); //$NON-NLS-1$
+ SWTBotTree importTree = this.bot.tree();
+ importTree.expandNode("JBoss Tools Web").select("XHTML Page");
//$NON-NLS-1$//$NON-NLS-2$
+ this.bot.button(WidgetVariables.NEXT_BUTTON).click();
+ this.bot.shell("New XHTML Page"); //$NON-NLS-1$
+// this.bot.textWithMessage("File name:").setText("test.xhtml");
//$NON-NLS-1$
+ this.bot.textWithLabel("File name:").setText("test"); //$NON-NLS-1$
//$NON-NLS-2$
+ this.bot.button(WidgetVariables.NEXT_BUTTON).click();
+ this.bot.checkBox("Use XHTML Template").click(); //$NON-NLS-1$
+ this.bot.button(WidgetVariables.FINISH_BUTTON).click();
+ assertEquals("Active Editor Title should be" ,"test.xhtml",
this.bot.activeEditor().getTitle()); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+}