From fae53c3981c02fdba494bf0b7adfa3fa7581a48e Mon Sep 17 00:00:00 2001 From: Victor Elci Date: Fri, 10 May 2024 10:17:48 -0400 Subject: [PATCH] feat: allow specifying input type --- addon/components/input-credit-card-cvc.hbs | 2 +- addon/components/input-credit-card-cvc.js | 4 ++++ addon/components/input-credit-card-number.hbs | 2 +- addon/components/input-credit-card-number.js | 4 ++++ tests/integration/components/input-credit-card-cvc-test.js | 6 ++++++ .../integration/components/input-credit-card-number-test.js | 6 ++++++ 6 files changed, 22 insertions(+), 2 deletions(-) diff --git a/addon/components/input-credit-card-cvc.hbs b/addon/components/input-credit-card-cvc.hbs index 2404d5f..421b5f7 100644 --- a/addon/components/input-credit-card-cvc.hbs +++ b/addon/components/input-credit-card-cvc.hbs @@ -1,5 +1,5 @@ `); + + assert.dom('input').hasAttribute('type', 'password'); + }); }); diff --git a/tests/integration/components/input-credit-card-number-test.js b/tests/integration/components/input-credit-card-number-test.js index ad55514..df39e2f 100644 --- a/tests/integration/components/input-credit-card-number-test.js +++ b/tests/integration/components/input-credit-card-number-test.js @@ -43,4 +43,10 @@ module('Integration | Component | input-credit-card-number', function (hooks) { await typeIn('input', '1'); assert.equal(this.number, '4111111111111111'); }); + + test('it can specify the input type', async function (assert) { + await render(hbs``); + + assert.dom('input').hasAttribute('type', 'password'); + }); });