I have installed ember-bootstrap
in my application. Then, I created a login-form component.
In the app/templates/login-form.hbs
, there are 3 Bootstrap input
. Which are the following:
<label for="email">Email</label>
<input id="email" value= name="email" class="form-control" oninput= type="text" placeholder="Email" required>
<label for="password">Password</label>
<input id="password" value= name="password" class="form-control" oninput= type="password" placeholder="Password" required>
When I do integration test in Components, it does not seem to identify this
.
test('it renders', function(assert) {
assert.expect(3);
assert.equal(this.$('input').attr('name'),'email','has Email')
assert.equal(this.$('input').attr('name'),'password','has Password')
assert.equal(this.$('button').text(),'Login','has Login')
});
In the input
, I get undefined
results. What is the proper way to call input for a form.group
component in Bootstrap, to be used in the component testing?
Aucun commentaire:
Enregistrer un commentaire