-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14762 from jaswilli/input-type-sexpr
[BUGFIX release] Make ember-template-compiler handle {{input}} helpers with sub-expression "type"
- Loading branch information
Showing
3 changed files
with
43 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
packages/ember-template-compiler/tests/plugins/transform-input-type-syntax-test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { compile } from '../../index'; | ||
|
||
QUnit.module('ember-template-compiler: input type syntax'); | ||
|
||
QUnit.test('Can compile an {{input}} helper that has a sub-expression value as its type', function() { | ||
expect(0); | ||
|
||
compile(`{{input type=(if true 'password' 'text')}}`); | ||
}); | ||
|
||
QUnit.test('Can compile an {{input}} helper with a string literal type', function() { | ||
expect(0); | ||
|
||
compile(`{{input type='text'}}`); | ||
}); | ||
|
||
QUnit.test('Can compile an {{input}} helper with a type stored in a var', function() { | ||
expect(0); | ||
|
||
compile(`{{input type=_type}}`); | ||
}); |