mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 11:20:57 -06:00
25 lines
608 B
JavaScript
25 lines
608 B
JavaScript
import componentTest from 'helpers/component-test';
|
|
|
|
moduleForComponent("text-field", { integration: true });
|
|
|
|
componentTest("renders correctly with no properties set", {
|
|
template: `{{text-field}}`,
|
|
|
|
test(assert) {
|
|
assert.ok(this.$('input[type=text]').length);
|
|
}
|
|
});
|
|
|
|
componentTest("support a placeholder", {
|
|
template: `{{text-field placeholderKey="placeholder.i18n.key"}}`,
|
|
|
|
beforeEach() {
|
|
sandbox.stub(I18n, "t").returnsArg(0);
|
|
},
|
|
|
|
test(assert) {
|
|
assert.ok(this.$('input[type=text]').length);
|
|
assert.equal(this.$('input').prop('placeholder'), 'placeholder.i18n.key');
|
|
}
|
|
});
|