Skip to content

Commit

Permalink
* [#1067] test(tag): add demo and test for used of #{set} and #{get}
Browse files Browse the repository at this point in the history
  • Loading branch information
xael-fry committed Dec 29, 2016
1 parent 98dfd40 commit 49e575e
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
Expand Up @@ -11,5 +11,9 @@ public static void yesNo() {
public static void i18n() {
render();
}

public static void set() {
render();
}

}
@@ -0,0 +1,12 @@
We have declared #{set transactionsData:@Application.hello()/}
#{set transactionsData:@Application.hello()/}
<ul>
<li>Get var with &#35{get 'transactionsData' /}: #{get 'transactionsData' /}</li>
<li>Get var with &#36;{transactionsData}: ${transactionsData?.url}</li>
</ul>

We can use it in form:
#{form transactionsData, method:'POST', id:'creationForm' }
<input name="test">
<input type="submit">
#{/form}
@@ -0,0 +1,9 @@
#{selenium 'set'}
open('@{tagDemos.TagDemos.set()}')
// Test with #get tag
assertTextPresent('Get var with &#35{get 'transactionsData' /}: /sayHello')
// Test with Expressions accessor
assertTextPresent('Get var with &#36{transactionsData}: /sayHello')
// Test in form tag param
assertHtmlSource('*<form action="/sayHello" method="post" accept-charset="utf-8" id="creationForm">*')
#{/selenium}

0 comments on commit 49e575e

Please sign in to comment.