Author: dgolovin
Date: 2009-10-06 06:28:24 -0400 (Tue, 06 Oct 2009)
New Revision: 17913
Added:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/.classpath
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/.project
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/.settings/
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/.settings/org.eclipse.jdt.core.prefs
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/META-INF/
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/META-INF/MANIFEST.MF
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/build.properties
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/resources/
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/resources/test.xml
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/log4j.xml
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/Activator.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/JSFAllTests.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/JSFAutoTestCase.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3148and4441Test.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3577Test.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3579Test.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3920Test.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE4391Test.java
Log:
share jsf tests with fixes to be runnable from tests builder
Added: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/.classpath
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/.classpath
(rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/.classpath 2009-10-06 10:28:24 UTC
(rev 17913)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con"
path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="resources"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/.classpath
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/.project
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/.project (rev
0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/.project 2009-10-06 10:28:24 UTC (rev
17913)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.jsf.ui.bot.test</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/.project
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/.settings/org.eclipse.jdt.core.prefs
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/.settings/org.eclipse.jdt.core.prefs 2009-10-06
10:28:24 UTC (rev 17913)
@@ -0,0 +1,8 @@
+#Tue Jun 23 15:36:31 EEST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/.settings/org.eclipse.jdt.core.prefs
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/META-INF/MANIFEST.MF
(rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/META-INF/MANIFEST.MF 2009-10-06
10:28:24 UTC (rev 17913)
@@ -0,0 +1,20 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Auto
+Bundle-SymbolicName: org.jboss.tools.jsf.ui.bot.test
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.jboss.tools.jsf.ui.bot.test.Activator
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.swtbot.eclipse.core;bundle-version="2.0.0",
+ org.eclipse.swtbot.eclipse.finder;bundle-version="2.0.0",
+ org.eclipse.swtbot.eclipse.spy;bundle-version="2.0.0",
+ org.eclipse.swtbot.eclipse.ui;bundle-version="2.0.0",
+ org.eclipse.swtbot.swt.finder;bundle-version="2.0.0",
+ org.apache.log4j;bundle-version="1.2.13",
+ org.junit;bundle-version="3.8.2"
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Import-Package: org.jboss.tools.ui.bot.test,
+ org.jboss.tools.vpe.ui.bot.test
+Export-Package: org.jboss.tools.jsf.ui.bot.test
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/META-INF/MANIFEST.MF
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/build.properties
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/build.properties
(rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/build.properties 2009-10-06 10:28:24
UTC (rev 17913)
@@ -0,0 +1,4 @@
+source.. = src/,resources/
+output.. = bin/
+bin.includes = META-INF/,\
+ .
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/build.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/resources/test.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/resources/test.xml
(rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/resources/test.xml 2009-10-06 10:28:24
UTC (rev 17913)
@@ -0,0 +1,28 @@
+<tests>
+ <test id="bodyId">
+ <DIV ID="bodyId">
+<TABLE STYLE="border: 1px dotted rgb(255, 102, 0); padding: 5px; width:
100%;">
+<TR>
+<TD>
+<DIV>
+<H3 STYLE="-moz-user-modify: read-write;">
+<SPAN CLASS="vpe-text">
+Hello
+</SPAN>
+<SPAN CLASS="vpe-text">
+,
+</SPAN>
+<SPAN CLASS="vpe-text">
+#{user.name}
+</SPAN>
+<SPAN CLASS="vpe-text">
+!
+</SPAN>
+</H3>
+</DIV>
+</TD>
+</TR>
+</TABLE>
+</DIV>
+ </test>
+</tests>
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/resources/test.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/log4j.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/log4j.xml
(rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/log4j.xml 2009-10-06 10:28:24 UTC
(rev 17913)
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+<log4j:configuration
xmlns:log4j="http://jakarta.apache.org/log4j/"
+ debug="false">
+
+ <appender name="consoleAppender"
class="org.apache.log4j.ConsoleAppender">
+ <param name="Target" value="System.out" />
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern"
+ value="%d{dd MMM yyyy HH:mm:ss.SSS} - %25t - %-5p - %30c{1} - (%C{1}.java:%L) -
%m%n" />
+ </layout>
+ </appender>
+
+ <appender name="fileAppender"
class="org.apache.log4j.FileAppender">
+ <param name="File" value="/tmp/debug.log" />
+ <param name="Append" value="false" />
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern"
+ value="%d{dd MMM yyyy HH:mm:ss.SSS} - %25t - %-5p - %30c{1} - (%C{1}.java:%L) -
%m%n" />
+ </layout>
+ </appender>
+
+ <appender name="asyncAppender"
class="org.apache.log4j.AsyncAppender">
+ <!-- appender-ref ref="consoleAppender" / -->
+ <appender-ref ref="fileAppender" />
+ </appender>
+
+ <!-- don't log matchers, this is very high amount of chatter -->
+ <category name="org.eclipse.swtbot.swt.finder.matchers">
+ <priority value="OFF" />
+ </category>
+
+ <!--
+ don't log widget notification events, this is moderately high chatter
+ -->
+ <category name="org.eclipse.swtbot.swt.finder.widgets">
+ <priority value="OFF" />
+ </category>
+
+ <!-- don't log finders, this is moderate chatter -->
+ <category name="org.eclipse.swtbot.swt.finder.finders">
+ <priority value="DEBUG" />
+ </category>
+
+ <category name="org.eclipse.swtbot.swt.finder.keyboard">
+ <!-- set to a value higher than debug to turn on. -->
+ <priority value="DEBUG" />
+ </category>
+
+ <category name="org.eclipse.swtbot">
+ <priority value="ALL" />
+ </category>
+
+ <root>
+ <priority value="INFO" />
+ <appender-ref ref="consoleAppender" />
+ <appender-ref ref="fileAppender" />
+ </root>
+
+</log4j:configuration>
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/log4j.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/Activator.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/Activator.java
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/Activator.java 2009-10-06
10:28:24 UTC (rev 17913)
@@ -0,0 +1,50 @@
+package org.jboss.tools.jsf.ui.bot.test;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.jboss.tools.jsf.ui.bot.test";
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/Activator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/JSFAllTests.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/JSFAllTests.java
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/JSFAllTests.java 2009-10-06
10:28:24 UTC (rev 17913)
@@ -0,0 +1,30 @@
+package org.jboss.tools.jsf.ui.bot.test;
+
+import org.eclipse.swtbot.swt.finder.SWTBotTestCase;
+import org.jboss.tools.jsf.ui.bot.test.cssdialog.jbide.JBIDE3148and4441Test;
+import org.jboss.tools.jsf.ui.bot.test.cssdialog.jbide.JBIDE3577Test;
+import org.jboss.tools.jsf.ui.bot.test.cssdialog.jbide.JBIDE3579Test;
+import org.jboss.tools.jsf.ui.bot.test.cssdialog.jbide.JBIDE3920Test;
+import org.jboss.tools.jsf.ui.bot.test.cssdialog.jbide.JBIDE4391Test;
+import junit.extensions.TestSetup;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+
+
+/**
+ *
+ * This is a sample swtbot testcase for an eclipse application.
+ *
+ */
+public class JSFAllTests extends SWTBotTestCase{
+ public static Test suite(){
+ TestSuite suite = new TestSuite("CSS dialog JBIDE tests");
+ suite.addTestSuite(JBIDE3148and4441Test.class);
+ suite.addTestSuite(JBIDE4391Test.class);
+ suite.addTestSuite(JBIDE3577Test.class);
+ suite.addTestSuite(JBIDE3579Test.class);
+ suite.addTestSuite(JBIDE3920Test.class);
+ return new TestSetup(suite);
+ }
+}
\ No newline at end of file
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/JSFAllTests.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/JSFAutoTestCase.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/JSFAutoTestCase.java
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/JSFAutoTestCase.java 2009-10-06
10:28:24 UTC (rev 17913)
@@ -0,0 +1,19 @@
+package org.jboss.tools.jsf.ui.bot.test;
+
+import java.io.IOException;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Platform;
+import org.jboss.tools.vpe.ui.bot.test.VPEAutoTestCase;
+
+public abstract class JSFAutoTestCase extends VPEAutoTestCase{
+
+ @Override
+ protected String getPathToResources(String testPage) throws IOException{
+ return
FileLocator.toFileURL(Platform.getBundle(Activator.PLUGIN_ID).getEntry("/")).getFile()+"resources/"+testPage
;
+ }
+
+ protected abstract void closeUnuseDialogs();
+
+ protected abstract boolean isUnuseDialogOpened();
+
+}
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/JSFAutoTestCase.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3148and4441Test.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3148and4441Test.java
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3148and4441Test.java 2009-10-06
10:28:24 UTC (rev 17913)
@@ -0,0 +1,91 @@
+package org.jboss.tools.jsf.ui.bot.test.cssdialog.jbide;
+
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEclipseEditor;
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.jboss.tools.jsf.ui.bot.test.JSFAutoTestCase;
+import org.jboss.tools.ui.bot.test.WidgetVariables;
+
+public class JBIDE3148and4441Test extends JSFAutoTestCase{
+
+ private static String CSS_FILE_NAME = "JBIDE3148";
+ private static String CSS_CLASS_NAME = "cssclass";
+
+ public void testJBIDE3148and4441() {
+
+ //Test create new CSS file
+
+ SWTBot innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER).bot();
+ SWTBotTree tree = innerBot.tree();
+ try {
+ tree.expandNode(projectProperties.getProperty("JSFProjectName")).
+ getNode(CSS_FILE_NAME+".css").doubleClick();
+ bot.editorByTitle(CSS_FILE_NAME+".css").setFocus();
+ bot.menu("Edit").menu("Select All").click();
+ bot.menu("Edit").menu("Delete").click();
+ } catch (WidgetNotFoundException e) {
+ tree.getTreeItem(projectProperties.getProperty("JSFProjectName")).select();
+ bot.menu("File").menu("New").menu("CSS File").click();
+ bot.shell("New CSS File").activate();
+ bot.textWithLabel("Name*").setText(CSS_FILE_NAME);
+ bot.button("Finish").click();
+ }
+ SWTBotEclipseEditor eclipseEditor
= bot.editorByTitle(CSS_FILE_NAME+".css").toTextEditor();
+ eclipseEditor.setFocus();
+ eclipseEditor.insertText("\rcssclass{\r\tcolor:green;\r\t" +
+ "background-color:red;\r}");
+ eclipseEditor.insertText("cssclass{\r\tcolor:red;\r\t" +
+ "background-color:green;\r}");
+ eclipseEditor.save();
+ eclipseEditor.contextMenu("Open CSS Dialog").click();
+
+ //Test edit attrs of the first Class
+
+ bot.shell("CSS Class").activate();
+ bot.comboBoxWithLabel("Style class:").setSelection(CSS_CLASS_NAME);
+ bot.tabItem("Text/Font").activate();
+ bot.comboBoxWithLabel("Text
Decoration:").setSelection("underline");
+ bot.comboBoxWithLabel("Font Weight:").setSelection("bold");
+
+ //Test edit attrs of the second class
+
+ bot.shell("CSS Class").activate();
+ bot.comboBoxWithLabel("Style
class:").setSelection(CSS_CLASS_NAME+"(2)");
+ bot.tabItem("Text/Font").activate();
+ bot.comboBoxWithLabel("Text
Decoration:").setSelection("overline");
+ bot.comboBoxWithLabel("Font Weight:").setSelection("lighter");
+ bot.button("Apply").click();
+ bot.button("OK").click();
+
+ //Test check css file content
+
+ String fileContainer =
bot.editorByTitle(CSS_FILE_NAME+".css").toTextEditor().getText();
+ assertEquals("cssclass{\r\tcolor: red;\r\tbackground-color: green;\r" +
+ "\tfont-weight: bold;\r\ttext-decoration: underline\r}\rcssclass" +
+ "{\r\tcolor: green;\r\tbackground-color: red;\r" +
+ "\tfont-weight: lighter;\r\ttext-decoration: overline\r}", fileContainer);
+ bot.editorByTitle(CSS_FILE_NAME+".css").close();
+
+ }
+
+ @Override
+ protected void closeUnuseDialogs() {
+ try {
+ bot.shell("CSS Class").close();
+ } catch (WidgetNotFoundException e) {
+ }
+ }
+
+ @Override
+ protected boolean isUnuseDialogOpened() {
+ boolean isOpened = false;
+ try {
+ bot.shell("CSS Class").activate();
+ isOpened = true;
+ } catch (WidgetNotFoundException e) {
+ }
+ return isOpened;
+ }
+
+}
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3148and4441Test.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3577Test.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3577Test.java
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3577Test.java 2009-10-06
10:28:24 UTC (rev 17913)
@@ -0,0 +1,73 @@
+package org.jboss.tools.jsf.ui.bot.test.cssdialog.jbide;
+
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEclipseEditor;
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.jboss.tools.jsf.ui.bot.test.JSFAutoTestCase;
+import org.jboss.tools.ui.bot.test.WidgetVariables;
+
+public class JBIDE3577Test extends JSFAutoTestCase{
+
+ private static String CSS_FILE_NAME = "JBIDE3577";
+ private static String CSS_CLASS_NAME = "cssclass";
+
+ public void testJBIDE3577(){
+
+ //Test create new CSS file
+
+ SWTBot innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER).bot();
+ SWTBotTree tree = innerBot.tree();
+ try {
+ tree.expandNode(projectProperties.getProperty("JSFProjectName")).
+ getNode(CSS_FILE_NAME+".css").doubleClick();
+ bot.editorByTitle(CSS_FILE_NAME+".css").setFocus();
+ bot.menu("Edit").menu("Select All").click();
+ bot.menu("Edit").menu("Delete").click();
+ } catch (WidgetNotFoundException e) {
+ tree.getTreeItem(projectProperties.getProperty("JSFProjectName")).select();
+ bot.menu("File").menu("New").menu("CSS File").click();
+ bot.shell("New CSS File").activate();
+ bot.textWithLabel("Name*").setText(CSS_FILE_NAME);
+ bot.button("Finish").click();
+ }
+ SWTBotEclipseEditor eclipseEditor
= bot.editorByTitle(CSS_FILE_NAME+".css").toTextEditor();
+ eclipseEditor.setFocus();
+ eclipseEditor.insertText("cssclass{\r\tcolor:red;\r\t" +
+ "background-color:green;\r}");
+ eclipseEditor.save();
+ eclipseEditor.contextMenu("Open CSS Dialog").click();
+
+ //Test Clear all attributes
+
+ bot.shell("CSS Class").activate();
+ bot.comboBoxWithLabel("Style class:").setSelection(CSS_CLASS_NAME);
+ bot.tabItem("Preview").activate();
+ bot.button("Clear").click();
+ bot.button("Apply").click();
+ bot.button("OK").click();
+ assertEquals("cssclass{\r\t\r}",
bot.editorByTitle(CSS_FILE_NAME+".css").toTextEditor().getText());
+ bot.editorByTitle(CSS_FILE_NAME+".css").close();
+
+ }
+
+ @Override
+ protected void closeUnuseDialogs() {
+ try {
+ bot.shell("CSS Class").close();
+ } catch (WidgetNotFoundException e) {
+ }
+ }
+
+ @Override
+ protected boolean isUnuseDialogOpened() {
+ boolean isOpened = false;
+ try {
+ bot.shell("CSS Class").activate();
+ isOpened = true;
+ } catch (WidgetNotFoundException e) {
+ }
+ return isOpened;
+ }
+
+}
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3577Test.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3579Test.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3579Test.java
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3579Test.java 2009-10-06
10:28:24 UTC (rev 17913)
@@ -0,0 +1,73 @@
+package org.jboss.tools.jsf.ui.bot.test.cssdialog.jbide;
+
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEclipseEditor;
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.jboss.tools.jsf.ui.bot.test.JSFAutoTestCase;
+import org.jboss.tools.ui.bot.test.WidgetVariables;
+
+public class JBIDE3579Test extends JSFAutoTestCase{
+
+ private static String CSS_FILE_NAME = "JBIDE3579";
+ private static String CSS_CLASS_NAME = "newCSSclass";
+
+ public void testJBIDE3579(){
+
+ //Test Create new CSS file
+
+ SWTBot innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER).bot();
+ SWTBotTree tree = innerBot.tree();
+ try {
+ tree.expandNode(projectProperties.getProperty("JSFProjectName")).
+ getNode(CSS_FILE_NAME+".css").doubleClick();
+ bot.editorByTitle(CSS_FILE_NAME+".css").setFocus();
+ bot.menu("Edit").menu("Select All").click();
+ bot.menu("Edit").menu("Delete").click();
+ } catch (WidgetNotFoundException e) {
+ tree.getTreeItem(projectProperties.getProperty("JSFProjectName")).select();
+ bot.menu("File").menu("New").menu("CSS File").click();
+ bot.shell("New CSS File").activate();
+ bot.textWithLabel("Name*").setText(CSS_FILE_NAME);
+ bot.button("Finish").click();
+ }
+ SWTBotEclipseEditor eclipseEditor
= bot.editorByTitle(CSS_FILE_NAME+".css").toTextEditor();
+ eclipseEditor.setFocus();
+ eclipseEditor.insertText("cssclass{\r\tcolor:red;\r\t" +
+ "background-color:green;\r}");
+ eclipseEditor.save();
+ eclipseEditor.contextMenu("Open CSS Dialog").click();
+
+ //Test Create new CSS class
+
+ bot.shell("CSS Class").activate();
+ bot.button("Add CSS Class").click();
+ bot.shell("Enter New CSS Class Name").activate();
+ bot.textWithLabel("Enter New CSS Class Name").setText(CSS_CLASS_NAME);
+ bot.button("OK").click();
+ bot.button("Apply").click();
+ bot.button("OK").click();
+ bot.editorByTitle(CSS_FILE_NAME+".css").close();
+
+ }
+
+ @Override
+ protected void closeUnuseDialogs() {
+ try {
+ bot.shell("CSS Class").close();
+ } catch (WidgetNotFoundException e) {
+ }
+ }
+
+ @Override
+ protected boolean isUnuseDialogOpened() {
+ boolean isOpened = false;
+ try {
+ bot.shell("CSS Class").activate();
+ isOpened = true;
+ } catch (WidgetNotFoundException e) {
+ }
+ return isOpened;
+ }
+
+}
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3579Test.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3920Test.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3920Test.java
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3920Test.java 2009-10-06
10:28:24 UTC (rev 17913)
@@ -0,0 +1,63 @@
+package org.jboss.tools.jsf.ui.bot.test.cssdialog.jbide;
+
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEclipseEditor;
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.jboss.tools.jsf.ui.bot.test.JSFAutoTestCase;
+import org.jboss.tools.ui.bot.test.WidgetVariables;
+
+public class JBIDE3920Test extends JSFAutoTestCase{
+
+ private static String CSS_FILE_NAME = "JBIDE3920";
+ private static String CSS_CLASS_NAME = "cssclass";
+
+ public void testJBIDE3920(){
+ SWTBot innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER).bot();
+ SWTBotTree tree = innerBot.tree();
+ try {
+ tree.expandNode(projectProperties.getProperty("JSFProjectName")).
+ getNode(CSS_FILE_NAME+".css").doubleClick();
+ bot.editorByTitle(CSS_FILE_NAME+".css").setFocus();
+ bot.menu("Edit").menu("Select All").click();
+ bot.menu("Edit").menu("Delete").click();
+ } catch (WidgetNotFoundException e) {
+ tree.getTreeItem(projectProperties.getProperty("JSFProjectName")).select();
+ bot.menu("File").menu("New").menu("CSS File").click();
+ bot.shell("New CSS File").activate();
+ bot.textWithLabel("Name*").setText(CSS_FILE_NAME);
+ bot.button("Finish").click();
+ }
+ SWTBotEclipseEditor eclipseEditor
= bot.editorByTitle(CSS_FILE_NAME+".css").toTextEditor();
+ eclipseEditor.setFocus();
+ eclipseEditor.insertText(CSS_CLASS_NAME+"{");
+ eclipseEditor.save();
+ eclipseEditor.contextMenu("Open CSS Dialog").click();
+ bot.shell("CSS Class").activate();
+ bot.tabItem("Text/Font").activate();
+ bot.comboBoxWithLabel("Font Style:").setSelection("italic");
+ bot.comboBoxWithLabel("Text
Decoration:").setSelection("underline");
+ bot.button("OK").click();
+ bot.editorByTitle(CSS_FILE_NAME+".css").toTextEditor().close();
+ }
+
+ @Override
+ protected void closeUnuseDialogs() {
+ try {
+ bot.shell("CSS Class").close();
+ } catch (WidgetNotFoundException e) {
+ }
+ }
+
+ @Override
+ protected boolean isUnuseDialogOpened() {
+ boolean isOpened = false;
+ try {
+ bot.shell("CSS Class").activate();
+ isOpened = true;
+ } catch (WidgetNotFoundException e) {
+ }
+ return isOpened;
+ }
+
+}
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3920Test.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE4391Test.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE4391Test.java
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE4391Test.java 2009-10-06
10:28:24 UTC (rev 17913)
@@ -0,0 +1,74 @@
+package org.jboss.tools.jsf.ui.bot.test.cssdialog.jbide;
+
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEclipseEditor;
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.jboss.tools.jsf.ui.bot.test.JSFAutoTestCase;
+import org.jboss.tools.ui.bot.test.WidgetVariables;
+
+public class JBIDE4391Test extends JSFAutoTestCase{
+
+ private static String CSS_FILE_NAME = "JBIDE4391";
+ private static String CSS_CLASS_NAME = "cssclass";
+
+ public void testJBIDE4391(){
+
+ //Test Create new CSS file
+
+ SWTBot innerBot= bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER).bot();
+ SWTBotTree tree = innerBot.tree();
+ try {
+ tree.expandNode(projectProperties.getProperty("JSFProjectName")).
+ getNode(CSS_FILE_NAME+".css").doubleClick();
+ bot.editorByTitle(CSS_FILE_NAME+".css").setFocus();
+ bot.menu("Edit").menu("Select All").click();
+ bot.menu("Edit").menu("Delete").click();
+ } catch (WidgetNotFoundException e) {
+ tree.getTreeItem(projectProperties.getProperty("JSFProjectName")).select();
+ bot.menu("File").menu("New").menu("CSS File").click();
+ bot.shell("New CSS File").activate();
+ bot.textWithLabel("Name*").setText(CSS_FILE_NAME);
+ bot.button("Finish").click();
+ }
+ SWTBotEclipseEditor eclipseEditor
= bot.editorByTitle(CSS_FILE_NAME+".css").toTextEditor();
+ eclipseEditor.setFocus();
+ eclipseEditor.insertText("cssclass{\r\tcolor:red;\r\t" +
+ "background-color:green;\r}");
+ eclipseEditor.save();
+ eclipseEditor.contextMenu("Open CSS Dialog").click();
+
+ //Test incorrect attribute
+
+ bot.shell("CSS Class").activate();
+ bot.comboBoxWithLabel("Style class:").setSelection(CSS_CLASS_NAME);
+ bot.tabItem("Text/Font").activate();
+ bot.comboBoxWithLabel("Text Decoration:").setText(";;;;");
+ bot.comboBoxWithLabel("Font Weight:").setSelection("bold");
+ bot.button("Cancel").click();
+ assertEquals("cssclass{\r\tcolor:red;\r\t" +
+ "background-color:green;\r}",
bot.editorByTitle(CSS_FILE_NAME+".css").toTextEditor().getText());
+ bot.editorByTitle(CSS_FILE_NAME+".css").close();
+
+ }
+
+ @Override
+ protected void closeUnuseDialogs() {
+ try {
+ bot.shell("CSS Class").close();
+ } catch (WidgetNotFoundException e) {
+ }
+ }
+
+ @Override
+ protected boolean isUnuseDialogOpened() {
+ boolean isOpened = false;
+ try {
+ bot.shell("CSS Class").activate();
+ isOpened = true;
+ } catch (WidgetNotFoundException e) {
+ }
+ return isOpened;
+ }
+
+}
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE4391Test.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain