Permalink
Browse files

added tests - tweaks to naming and html output

  • Loading branch information...
1 parent 2cdf3c3 commit e640b5dc3180a6b292b4350c49d43e1df4dae9f8 @swestfall committed Sep 4, 2011
Showing with 545 additions and 226 deletions.
  1. +0 −155 jqueryui-widget-testApp/.idea/misc.xml
  2. +1 −0 jqueryui-widget-testApp/.idea/modules.xml
  3. +1 −1 jqueryui-widget-testApp/application.properties
  4. +4 −13 jqueryui-widget-testApp/grails-app/views/button/button.gsp
  5. +1 −9 jqueryui-widget-testApp/grails-app/views/button/buttonSet.gsp
  6. +2 −11 jqueryui-widget-testApp/grails-app/views/button/checkbox.gsp
  7. +1 −1 jqueryui-widget-testApp/grails-app/views/progressBar/basic.gsp
  8. +1 −1 jqueryui-widget-testApp/grails-app/views/slider/basic.gsp
  9. +1 −10 jqueryui-widget-testApp/grails-app/views/tab/basic.gsp
  10. +1 −1 jqueryui-widget-testApp/jqueryui-widget-testApp-grailsPlugins.iml
  11. +0 −6 jqueryui-widget-testApp/jqueryuiWidget-inplacePlugin.iml
  12. +5 −5 jqueryui-widget/grails-app/conf/ReadMe.txt
  13. +0 −2 jqueryui-widget/grails-app/taglib/grails/jqueryui/widget/AccordionTagLib.groovy
  14. +0 −2 jqueryui-widget/grails-app/taglib/grails/jqueryui/widget/AutoCompleteTagLib.groovy
  15. +2 −2 jqueryui-widget/grails-app/taglib/grails/jqueryui/widget/ButtonTagLib.groovy
  16. +0 −2 jqueryui-widget/grails-app/taglib/grails/jqueryui/widget/DatePickerTagLib.groovy
  17. +0 −2 jqueryui-widget/grails-app/taglib/grails/jqueryui/widget/DialogTagLib.groovy
  18. +1 −1 jqueryui-widget/grails-app/taglib/grails/jqueryui/widget/ProgressBarTagLib.groovy
  19. +1 −1 jqueryui-widget/grails-app/taglib/grails/jqueryui/widget/SliderTagLib.groovy
  20. +1 −1 jqueryui-widget/grails-app/taglib/grails/jqueryui/widget/TabTagLib.groovy
  21. +14 −0 jqueryui-widget/grails-app/taglib/grails/jqueryui/widget/UtilTagLib.groovy
  22. +10 −0 jqueryui-widget/src/groovy/grails/jqueryui/widget/GrailsJQueryUIWidgetUtil.groovy
  23. +55 −0 jqueryui-widget/test/unit/grails/jqueryui/widget/AccordionTagLibTests.groovy
  24. +70 −0 jqueryui-widget/test/unit/grails/jqueryui/widget/AutoCompleteTagLibTests.groovy
  25. +71 −0 jqueryui-widget/test/unit/grails/jqueryui/widget/ButtonTagLibTests.groovy
  26. +73 −0 jqueryui-widget/test/unit/grails/jqueryui/widget/DatePickerTagLibTests.groovy
  27. +56 −0 jqueryui-widget/test/unit/grails/jqueryui/widget/DialogTagLibTests.groovy
  28. +56 −0 jqueryui-widget/test/unit/grails/jqueryui/widget/ProgressBarTagLibTests.groovy
  29. +56 −0 jqueryui-widget/test/unit/grails/jqueryui/widget/SliderTagLibTests.groovy
  30. +56 −0 jqueryui-widget/test/unit/grails/jqueryui/widget/TabTagLibTests.groovy
  31. +5 −0 jqueryui-widget/web-app/js/pluginResources.js
@@ -1,44 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
- <component name="DaemonCodeAnalyzer">
- <disable_hints />
- </component>
- <component name="DebuggerManager">
- <breakpoint_any>
- <breakpoint>
- <option name="NOTIFY_CAUGHT" value="true" />
- <option name="NOTIFY_UNCAUGHT" value="true" />
- <option name="ENABLED" value="false" />
- <option name="LOG_ENABLED" value="false" />
- <option name="LOG_EXPRESSION_ENABLED" value="false" />
- <option name="SUSPEND_POLICY" value="SuspendAll" />
- <option name="COUNT_FILTER_ENABLED" value="false" />
- <option name="COUNT_FILTER" value="0" />
- <option name="CONDITION_ENABLED" value="false" />
- <option name="CLASS_FILTERS_ENABLED" value="false" />
- <option name="INSTANCE_FILTERS_ENABLED" value="false" />
- <option name="CONDITION" value="" />
- <option name="LOG_MESSAGE" value="" />
- </breakpoint>
- <breakpoint>
- <option name="NOTIFY_CAUGHT" value="true" />
- <option name="NOTIFY_UNCAUGHT" value="true" />
- <option name="ENABLED" value="false" />
- <option name="LOG_ENABLED" value="false" />
- <option name="LOG_EXPRESSION_ENABLED" value="false" />
- <option name="SUSPEND_POLICY" value="SuspendAll" />
- <option name="COUNT_FILTER_ENABLED" value="false" />
- <option name="COUNT_FILTER" value="0" />
- <option name="CONDITION_ENABLED" value="false" />
- <option name="CLASS_FILTERS_ENABLED" value="false" />
- <option name="INSTANCE_FILTERS_ENABLED" value="false" />
- <option name="CONDITION" value="" />
- <option name="LOG_MESSAGE" value="" />
- </breakpoint>
- </breakpoint_any>
- <breakpoint_rules />
- <ui_properties />
- </component>
<component name="DependencyValidationManager">
<option name="SKIP_IMPORT_STATEMENTS" value="false" />
</component>
@@ -60,128 +21,12 @@
<option name="LOCALE" />
<option name="OPEN_IN_BROWSER" value="true" />
</component>
- <component name="ModuleEditorState">
- <option name="LAST_EDITED_MODULE_NAME" />
- <option name="LAST_EDITED_TAB_NAME" />
- </component>
- <component name="ProjectLevelVcsManager">
- <OptionsSetting value="true" id="Add" />
- <OptionsSetting value="true" id="Remove" />
- <OptionsSetting value="true" id="Checkout" />
- <OptionsSetting value="true" id="Update" />
- <OptionsSetting value="true" id="Status" />
- <OptionsSetting value="true" id="Edit" />
- <ConfirmationsSetting value="0" id="Add" />
- <ConfirmationsSetting value="0" id="Remove" />
- </component>
- <component name="ProjectReloadState">
- <option name="STATE" value="0" />
- </component>
<component name="ProjectResources">
<default-html-doctype>http://www.w3.org/1999/xhtml</default-html-doctype>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_5" assert-keyword="true" jdk-15="true" project-jdk-name="1.6" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
- <component name="RunManager">
- <configuration default="true" type="Remote" factoryName="Remote">
- <option name="USE_SOCKET_TRANSPORT" value="true" />
- <option name="SERVER_MODE" value="false" />
- <option name="SHMEM_ADDRESS" value="javadebug" />
- <option name="HOST" value="localhost" />
- <option name="PORT" value="5005" />
- <method>
- <option name="AntTarget" enabled="false" />
- <option name="BuildArtifacts" enabled="false" />
- <option name="Maven.BeforeRunTask" enabled="false" />
- </method>
- </configuration>
- <configuration default="true" type="Applet" factoryName="Applet">
- <module name="" />
- <option name="MAIN_CLASS_NAME" />
- <option name="HTML_FILE_NAME" />
- <option name="HTML_USED" value="false" />
- <option name="WIDTH" value="400" />
- <option name="HEIGHT" value="300" />
- <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
- <option name="VM_PARAMETERS" />
- <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
- <option name="ALTERNATIVE_JRE_PATH" />
- <method>
- <option name="AntTarget" enabled="false" />
- <option name="BuildArtifacts" enabled="false" />
- <option name="Make" enabled="true" />
- <option name="Maven.BeforeRunTask" enabled="false" />
- </method>
- </configuration>
- <configuration default="true" type="Application" factoryName="Application">
- <extension name="coverage" enabled="false" merge="false" />
- <option name="MAIN_CLASS_NAME" />
- <option name="VM_PARAMETERS" />
- <option name="PROGRAM_PARAMETERS" />
- <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
- <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
- <option name="ALTERNATIVE_JRE_PATH" />
- <option name="ENABLE_SWING_INSPECTOR" value="false" />
- <option name="ENV_VARIABLES" />
- <option name="PASS_PARENT_ENVS" value="true" />
- <module name="" />
- <envs />
- <method>
- <option name="AntTarget" enabled="false" />
- <option name="BuildArtifacts" enabled="false" />
- <option name="Make" enabled="true" />
- <option name="Maven.BeforeRunTask" enabled="false" />
- </method>
- </configuration>
- <configuration default="true" type="JUnit" factoryName="JUnit">
- <extension name="coverage" enabled="false" merge="false" />
- <module name="" />
- <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
- <option name="ALTERNATIVE_JRE_PATH" />
- <option name="PACKAGE_NAME" />
- <option name="MAIN_CLASS_NAME" />
- <option name="METHOD_NAME" />
- <option name="TEST_OBJECT" value="class" />
- <option name="VM_PARAMETERS" />
- <option name="PARAMETERS" />
- <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
- <option name="ENV_VARIABLES" />
- <option name="PASS_PARENT_ENVS" value="true" />
- <option name="TEST_SEARCH_SCOPE">
- <value defaultName="moduleWithDependencies" />
- </option>
- <envs />
- <patterns />
- <method>
- <option name="AntTarget" enabled="false" />
- <option name="BuildArtifacts" enabled="false" />
- <option name="Make" enabled="true" />
- <option name="Maven.BeforeRunTask" enabled="false" />
- </method>
- </configuration>
- <list size="0" />
- <configuration name="&lt;template&gt;" type="WebApp" default="true" selected="false">
- <Host>localhost</Host>
- <Port>5050</Port>
- </configuration>
- </component>
- <component name="ShelveChangesManager" show_recycled="false" />
- <component name="SvnConfiguration" maxAnnotateRevisions="500">
- <option name="USER" value="" />
- <option name="PASSWORD" value="" />
- <option name="LAST_MERGED_REVISION" />
- <option name="UPDATE_RUN_STATUS" value="false" />
- <option name="MERGE_DRY_RUN" value="false" />
- <option name="MERGE_DIFF_USE_ANCESTRY" value="true" />
- <option name="UPDATE_LOCK_ON_DEMAND" value="false" />
- <option name="IGNORE_SPACES_IN_MERGE" value="false" />
- <option name="DETECT_NESTED_COPIES" value="true" />
- <option name="CHECK_NESTED_FOR_QUICK_MERGE" value="false" />
- <option name="IGNORE_SPACES_IN_ANNOTATE" value="true" />
- <option name="SHOW_MERGE_SOURCES_IN_ANNOTATE" value="true" />
- <myIsUseDefaultProxy>false</myIsUseDefaultProxy>
- </component>
<component name="WebServicesPlugin" addRequiredLibraries="true" />
<component name="masterDetails">
<states>
@@ -3,6 +3,7 @@
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/jqueryui-widget-testApp.iml" filepath="$PROJECT_DIR$/jqueryui-widget-testApp.iml" />
+ <module fileurl="file://$PROJECT_DIR$/jqueryui-widget-testApp-grailsPlugins.iml" filepath="$PROJECT_DIR$/jqueryui-widget-testApp-grailsPlugins.iml" />
<module fileurl="file://$PROJECT_DIR$/jqueryuiWidget-inplacePlugin.iml" filepath="$PROJECT_DIR$/jqueryuiWidget-inplacePlugin.iml" />
</modules>
</component>
@@ -5,5 +5,5 @@ app.name=jqueryui-widget-testApp
app.servlet.version=2.4
app.version=0.1
plugins.hibernate=1.3.7
-plugins.jqueryui-widget=0.1.2
+plugins.jqueryui-widget=0.1.3
plugins.tomcat=1.3.7
@@ -26,29 +26,20 @@
<input id="input1" type="submit" value="submit">
<a href="#" id="href1">Anchor</a>
- <jqueryui:button
+ <jqueryui:jquiButton
id="button1"/>
- <jqueryui:button
+ <jqueryui:jquiButton
id="div1"/>
- <jqueryui:button
+ <jqueryui:jquiButton
id="input1"/>
- <jqueryui:button
+ <jqueryui:jquiButton
id="href1"/>
</div>
-
- %{--<div class="exampleContainer">--}%
- %{--<h3>Tag Creates Markup</h3>--}%
- %{--<label for="date2">Date:</label>--}%
- %{--<jqueryui:jquiDatePicker--}%
- %{--id="date2"--}%
- %{--namespace="grails.jqueryui.components"/>--}%
- %{--</div>--}%
-
</div>
</body>
</html>
@@ -26,20 +26,12 @@
<input type="radio" id="radio3" name="radio"/><label for="radio3">Choice 3</label>
</div>
- <jqueryui:buttonSet
+ <jqueryui:jquiButtonSet
id="radio"/>
</div>
- %{--<div class="exampleContainer">--}%
- %{--<h3>Tag Creates Markup</h3>--}%
- %{--<label for="date2">Date:</label>--}%
- %{--<jqueryui:jquiDatePicker--}%
- %{--id="date2"--}%
- %{--namespace="grails.jqueryui.components"/>--}%
- %{--</div>--}%
-
</div>
</body>
</html>
@@ -28,23 +28,14 @@
<input type="checkbox" id="check3"/><label for="check3">U</label>
</div>
- <jqueryui:button
+ <jqueryui:jquiButton
id="check"/>
- <jqueryui:buttonSet
+ <jqueryui:jquiButtonSet
id="format" />
</div>
-
- %{--<div class="exampleContainer">--}%
- %{--<h3>Tag Creates Markup</h3>--}%
- %{--<label for="date2">Date:</label>--}%
- %{--<jqueryui:jquiDatePicker--}%
- %{--id="date2"--}%
- %{--namespace="grails.jqueryui.components"/>--}%
- %{--</div>--}%
-
</div>
</body>
</html>
@@ -22,7 +22,7 @@
<h3>Pre-Existing Markup</h3>
<div id="progressBar"></div>
- <jqueryui:progressBar
+ <jqueryui:jquiProgressBar
id="progressBar"
config="${[
value: 37
@@ -22,7 +22,7 @@
<h3>Pre-Existing Markup</h3>
<div id="slider"></div>
- <jqueryui:slider
+ <jqueryui:jquiSlider
id="slider" />
</div>
@@ -39,20 +39,11 @@
</div>
</div>
- <jqueryui:tab
+ <jqueryui:jquiTab
id="tabs"/>
</div>
-
- %{--<div class="exampleContainer">--}%
- %{--<h3>Tag Creates Markup</h3>--}%
- %{--<label for="date2">Date:</label>--}%
- %{--<jqueryui:jquiDatePicker--}%
- %{--id="date2"--}%
- %{--namespace="grails.jqueryui.components"/>--}%
- %{--</div>--}%
-
</div>
</body>
</html>
@@ -4,8 +4,8 @@
<facet type="web" name="GrailsWeb">
<configuration>
<webroots>
- <root url="file://$USER_HOME$/.grails/1.3.7/projects/jqueryui-widget-testApp/plugins/jquery-ui-1.8.11/web-app" relative="/" />
<root url="file://$USER_HOME$/.grails/1.3.7/projects/jqueryui-widget-testApp/plugins/jquery-1.6.1.1/web-app" relative="/" />
+ <root url="file://$USER_HOME$/.grails/1.3.7/projects/jqueryui-widget-testApp/plugins/jquery-ui-1.8.11/web-app" relative="/" />
</webroots>
<sourceRoots />
</configuration>
@@ -21,15 +21,9 @@
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$/../jqueryui-widget">
- <sourceFolder url="file://$MODULE_DIR$/../jqueryui-widget/src/java" isTestSource="false" />
- <sourceFolder url="file://$MODULE_DIR$/../jqueryui-widget/grails-app/utils" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../jqueryui-widget/src/groovy" isTestSource="false" />
- <sourceFolder url="file://$MODULE_DIR$/../jqueryui-widget/grails-app/controllers" isTestSource="false" />
- <sourceFolder url="file://$MODULE_DIR$/../jqueryui-widget/grails-app/domain" isTestSource="false" />
- <sourceFolder url="file://$MODULE_DIR$/../jqueryui-widget/grails-app/services" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../jqueryui-widget/grails-app/taglib" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/../jqueryui-widget/test/unit" isTestSource="true" />
- <sourceFolder url="file://$MODULE_DIR$/../jqueryui-widget/test/integration" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/../jqueryui-widget/target/classes" />
<excludeFolder url="file://$MODULE_DIR$/../jqueryui-widget/target/test-classes" />
<excludeFolder url="file://$MODULE_DIR$/../jqueryui-widget/web-app/plugins" />
@@ -6,21 +6,21 @@ OVERALL TASKS
- decision on rendering html from taglib
4. Implement Slider
- decision on rendering html from taglib
-5. Static Prefixes (Grails & Javascript)
-6. Static Namespace (Grails & Javascript)
7. Document Methods
Version 0.1.4
-- Namespace & Prefixes available in Javascript
+- Namespace & Prefixes available in Javascript (Done)
- Markup Rendering for Button, Slider, ProgressBar
-- Cleanup Javascript
-- Documentation on Grails Plugin Page
+- Documentation on Grails Plugin Page and/or blog post
- Examples of common tags
- Config overrides
- Javascript details
- Override/Customize Example
+ - Prefix & Namespace in Javascript & Config
+ - JSON Config Example
+- Unit Tests (DONE)
Version 0.1.3 - RELEASED
- Fixed bug dealing with renderMarkup attribute
@@ -21,12 +21,10 @@ class AccordionTagLib {
def accordionID = "${jsNameSpace}.${prefix}${id}"
out << """
-
<script type="text/javascript">
\$(function() {
${accordionID} = \$("#${id}").accordion(${util.toJSON(config)});
});
-
</script>
"""
@@ -28,13 +28,11 @@ class AutoCompleteTagLib {
}
out << """
-
${markup}
<script type="text/javascript">
\$(function() {
${autoCompleteID} = \$("#${id}").autocomplete(${util.toJSON(config)});
});
-
</script>
"""
Oops, something went wrong.

0 comments on commit e640b5d

Please sign in to comment.