"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "ui/tests/integration/components/masked-input-test.js" between
vault-1.8.1.tar.gz and vault-1.8.2.tar.gz

About: vault is a tool for secrets management, encryption as a service, and privileged access management.

masked-input-test.js  (vault-1.8.1):masked-input-test.js  (vault-1.8.2)
import { module, test } from 'qunit'; import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit'; import { setupRenderingTest } from 'ember-qunit';
import { render, focus } from '@ember/test-helpers'; import { render, focus, triggerKeyEvent } from '@ember/test-helpers';
import { create } from 'ember-cli-page-object'; import { create } from 'ember-cli-page-object';
import hbs from 'htmlbars-inline-precompile'; import hbs from 'htmlbars-inline-precompile';
import maskedInput from 'vault/tests/pages/components/masked-input'; import maskedInput from 'vault/tests/pages/components/masked-input';
const component = create(maskedInput); const component = create(maskedInput);
module('Integration | Component | masked input', function(hooks) { module('Integration | Component | masked input', function(hooks) {
setupRenderingTest(hooks); setupRenderingTest(hooks);
test('it renders', async function(assert) { test('it renders', async function(assert) {
skipping to change at line 91 skipping to change at line 91
assert.equal(unMaskedValue.length, this.value.length); assert.equal(unMaskedValue.length, this.value.length);
}); });
test('it does not unmask text on focus', async function(assert) { test('it does not unmask text on focus', async function(assert) {
this.set('value', '123456789-123456789-123456789'); this.set('value', '123456789-123456789-123456789');
await render(hbs`{{masked-input value=value}}`); await render(hbs`{{masked-input value=value}}`);
assert.dom('.masked-value').hasClass('masked-font'); assert.dom('.masked-value').hasClass('masked-font');
await focus('.masked-value'); await focus('.masked-value');
assert.dom('.masked-value').hasClass('masked-font'); assert.dom('.masked-value').hasClass('masked-font');
}); });
test('it does not remove value on tab', async function(assert) {
this.set('value', 'hello');
await render(hbs`{{masked-input value=value}}`);
await triggerKeyEvent('[data-test-textarea]', 'keydown', 9);
await component.toggleMasked();
let unMaskedValue = document.querySelector('.masked-value').value;
assert.equal(unMaskedValue, this.value);
});
}); });
 End of changes. 2 change blocks. 
1 lines changed or deleted 10 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)