Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#1067] test(tag): add demo and test for used of #{set} and #{get} #1074

Merged
merged 1 commit into from
Dec 29, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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}