Skip to content

Commit

Permalink
Testing the replacement action.
Browse files Browse the repository at this point in the history
  • Loading branch information
polx committed Mar 3, 2021
1 parent 6bd2104 commit 1eaaa1e
Show file tree
Hide file tree
Showing 4 changed files with 111 additions and 99 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,9 @@ void transformXML() throws Exception

assertTrue(document.selectSingleNode("/xwikidoc/attachment/content") != null,
"Insertion of attachment did not happen?");

assertTrue(document.selectSingleNode("//insertHereBlogXWikiClass") == null,
"Replacement of insertHereBlogXWikiClass did not happen?");
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@
<action>INSERT_ATTACHMENT_CONTENT</action>
<content>src/main/resources/Blog/BlogBackground.png</content>
</transformation>

<transformation>
<file>Blog/WebHome.xml</file>
<action>REPLACE</action>
<xpath>/xwikidoc/object/insertHereBlogXWikiClass</xpath>
<xml>src/main/resources/Blog/BlogClass.xwikiclass</xml>
</transformation>

</transformations>
</configuration>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
<class>
<name>Blog.BlogClass</name>
<customClass/>
<customMapping/>
<defaultViewSheet/>
<defaultEditSheet/>
<defaultWeb/>
<nameField/>
<validationScript/>
<blogType>
<cache>0</cache>
<customDisplay/>
<disabled>0</disabled>
<displayType>select</displayType>
<multiSelect>0</multiSelect>
<name>blogType</name>
<number>5</number>
<picker>0</picker>
<prettyName>Blog type</prettyName>
<relationalStorage>0</relationalStorage>
<separator> </separator>
<separators> ,|</separators>
<size>1</size>
<sort>none</sort>
<tooltip/>
<unmodifiable>0</unmodifiable>
<validationMessage/>
<validationRegExp/>
<values>local=Space blog (aggregates posts from its space only)|global=Global blog (aggregates posts from the entire wiki)</values>
<classType>com.xpn.xwiki.objects.classes.StaticListClass</classType>
</blogType>
<description>
<contenttype>FullyRenderedText</contenttype>
<customDisplay/>
<disabled>0</disabled>
<editor>---</editor>
<name>description</name>
<number>2</number>
<picker>0</picker>
<prettyName>Description</prettyName>
<rows>5</rows>
<size>60</size>
<tooltip/>
<unmodifiable>0</unmodifiable>
<validationMessage/>
<validationRegExp/>
<classType>com.xpn.xwiki.objects.classes.TextAreaClass</classType>
</description>
<displayType>
<cache>0</cache>
<customDisplay/>
<disabled>0</disabled>
<displayType>select</displayType>
<multiSelect>0</multiSelect>
<name>displayType</name>
<number>3</number>
<picker>0</picker>
<prettyName>Index display</prettyName>
<relationalStorage>0</relationalStorage>
<separator> </separator>
<separators> ,|</separators>
<size>1</size>
<sort>none</sort>
<tooltip/>
<unmodifiable>0</unmodifiable>
<validationMessage/>
<validationRegExp/>
<values>paginated=Paginated|weekly=Group posts weekly|monthly=Group posts monthly|all=Show all posts</values>
<classType>com.xpn.xwiki.objects.classes.StaticListClass</classType>
</displayType>
<itemsPerPage>
<customDisplay/>
<disabled>0</disabled>
<name>itemsPerPage</name>
<number>4</number>
<numberType>integer</numberType>
<prettyName>Items per page (only in the Paginated display mode)</prettyName>
<size>2</size>
<tooltip/>
<unmodifiable>0</unmodifiable>
<validationMessage/>
<validationRegExp/>
<classType>com.xpn.xwiki.objects.classes.NumberClass</classType>
</itemsPerPage>
<title>
<customDisplay/>
<disabled>0</disabled>
<name>title</name>
<number>1</number>
<picker>0</picker>
<prettyName>Blog title</prettyName>
<size>30</size>
<tooltip/>
<unmodifiable>0</unmodifiable>
<validationMessage/>
<validationRegExp/>
<classType>com.xpn.xwiki.objects.classes.StringClass</classType>
</title>
</class>
Original file line number Diff line number Diff line change
Expand Up @@ -32,105 +32,7 @@
<content></content>
</attachment>
<object>
<class>
<name>Blog.BlogClass</name>
<customClass/>
<customMapping/>
<defaultViewSheet/>
<defaultEditSheet/>
<defaultWeb/>
<nameField/>
<validationScript/>
<blogType>
<cache>0</cache>
<customDisplay/>
<disabled>0</disabled>
<displayType>select</displayType>
<multiSelect>0</multiSelect>
<name>blogType</name>
<number>5</number>
<picker>0</picker>
<prettyName>Blog type</prettyName>
<relationalStorage>0</relationalStorage>
<separator> </separator>
<separators> ,|</separators>
<size>1</size>
<sort>none</sort>
<tooltip/>
<unmodifiable>0</unmodifiable>
<validationMessage/>
<validationRegExp/>
<values>local=Space blog (aggregates posts from its space only)|global=Global blog (aggregates posts from the entire wiki)</values>
<classType>com.xpn.xwiki.objects.classes.StaticListClass</classType>
</blogType>
<description>
<contenttype>FullyRenderedText</contenttype>
<customDisplay/>
<disabled>0</disabled>
<editor>---</editor>
<name>description</name>
<number>2</number>
<picker>0</picker>
<prettyName>Description</prettyName>
<rows>5</rows>
<size>60</size>
<tooltip/>
<unmodifiable>0</unmodifiable>
<validationMessage/>
<validationRegExp/>
<classType>com.xpn.xwiki.objects.classes.TextAreaClass</classType>
</description>
<displayType>
<cache>0</cache>
<customDisplay/>
<disabled>0</disabled>
<displayType>select</displayType>
<multiSelect>0</multiSelect>
<name>displayType</name>
<number>3</number>
<picker>0</picker>
<prettyName>Index display</prettyName>
<relationalStorage>0</relationalStorage>
<separator> </separator>
<separators> ,|</separators>
<size>1</size>
<sort>none</sort>
<tooltip/>
<unmodifiable>0</unmodifiable>
<validationMessage/>
<validationRegExp/>
<values>paginated=Paginated|weekly=Group posts weekly|monthly=Group posts monthly|all=Show all posts</values>
<classType>com.xpn.xwiki.objects.classes.StaticListClass</classType>
</displayType>
<itemsPerPage>
<customDisplay/>
<disabled>0</disabled>
<name>itemsPerPage</name>
<number>4</number>
<numberType>integer</numberType>
<prettyName>Items per page (only in the Paginated display mode)</prettyName>
<size>2</size>
<tooltip/>
<unmodifiable>0</unmodifiable>
<validationMessage/>
<validationRegExp/>
<classType>com.xpn.xwiki.objects.classes.NumberClass</classType>
</itemsPerPage>
<title>
<customDisplay/>
<disabled>0</disabled>
<name>title</name>
<number>1</number>
<picker>0</picker>
<prettyName>Blog title</prettyName>
<size>30</size>
<tooltip/>
<unmodifiable>0</unmodifiable>
<validationMessage/>
<validationRegExp/>
<classType>com.xpn.xwiki.objects.classes.StringClass</classType>
</title>
</class>
<insertHereBlogXWikiClass/>
<name>Blog.WebHome</name>
<number>0</number>
<className>Blog.BlogClass</className>
Expand Down

0 comments on commit 1eaaa1e

Please sign in to comment.