Files
threshold-ui/ui/desktop/tests/integration/components/hidden-secret-test.js
T
2021-06-24 15:19:26 -07:00

22 lines
661 B
JavaScript

import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { render, find } from '@ember/test-helpers';
import { hbs } from 'ember-cli-htmlbars';
module('Integration | Component | hidden-secret', function (hooks) {
setupRenderingTest(hooks);
test('it renders with a secret', async function (assert) {
assert.expect(2);
await render(hbs`
<HiddenSecret @secret='AAaaBBccDDeeOTXzSMT1234BB_Z8JzG7JkSVxI' />
`);
assert.ok(find('.hidden-secret'));
assert.equal(
find('.hidden-secret > span > span').textContent.trim(),
'■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■'
);
});
});