Skip to content

Commit

Permalink
Merge pull request #1074 from xael-fry/1067_tagSetAndGet
Browse files Browse the repository at this point in the history
[#1067] test(tag): add demo and test for used of #{set} and #{get}
  • Loading branch information
asolntsev authored Dec 29, 2016
2 parents cffe3bf + 49e575e commit 8b7c5dc
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,9 @@ public static void yesNo() {
public static void i18n() {
render();
}

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

}
Original file line number Diff line number Diff line change
@@ -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}
Original file line number Diff line number Diff line change
@@ -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 8b7c5dc

Please sign in to comment.