2016-11-08 13:40:35 -05:00
|
|
|
import componentTest from 'helpers/component-test';
|
2013-12-19 13:29:15 -05:00
|
|
|
|
2016-11-08 13:40:35 -05:00
|
|
|
moduleForComponent("text-field", { integration: true });
|
|
|
|
|
|
|
|
componentTest("renders correctly with no properties set", {
|
|
|
|
template: `{{text-field}}`,
|
|
|
|
|
|
|
|
test(assert) {
|
|
|
|
assert.ok(this.$('input[type=text]').length);
|
|
|
|
}
|
2013-12-19 13:29:15 -05:00
|
|
|
});
|
|
|
|
|
2016-11-08 13:40:35 -05:00
|
|
|
componentTest("support a placeholder", {
|
|
|
|
template: `{{text-field placeholderKey="placeholder.i18n.key"}}`,
|
2013-12-19 13:29:15 -05:00
|
|
|
|
2016-11-08 13:40:35 -05:00
|
|
|
setup() {
|
|
|
|
sandbox.stub(I18n, "t").returnsArg(0);
|
|
|
|
},
|
2013-12-19 13:29:15 -05:00
|
|
|
|
2016-11-08 13:40:35 -05:00
|
|
|
test(assert) {
|
|
|
|
assert.ok(this.$('input[type=text]').length);
|
|
|
|
assert.equal(this.$('input').prop('placeholder'), 'placeholder.i18n.key');
|
|
|
|
}
|
2013-12-19 13:29:15 -05:00
|
|
|
});
|