refactor: 💡 extract helper-text styles
This commit is contained in:
10 files changed
+18
-22
No files matched your search
@@ -17,7 +17,7 @@ module('Integration | Component | rose/form/input', function (hooks) {
|
||||
const fieldEl = find('input');
|
||||
const id = fieldEl.id;
|
||||
const helperId = `helper-text-${id}`;
|
||||
const helperTextEl = find('.rose-form-input-helper-text');
|
||||
const helperTextEl = find('.rose-form-helper-text');
|
||||
assert.equal(helperTextEl.textContent.trim(), 'Help me');
|
||||
assert.equal(helperTextEl.id, helperId);
|
||||
assert.equal(fieldEl.getAttribute('aria-describedby').trim(), helperId);
|
||||
|
||||
@@ -44,7 +44,7 @@ module('Integration | Component | rose/form/select', function (hooks) {
|
||||
const fieldEl = find('select');
|
||||
const id = fieldEl.id;
|
||||
const helperId = `helper-text-${id}`;
|
||||
const helperTextEl = find('.rose-form-select-helper-text');
|
||||
const helperTextEl = find('.rose-form-helper-text');
|
||||
assert.equal(helperTextEl.textContent.trim(), 'Help me');
|
||||
assert.equal(helperTextEl.id, helperId);
|
||||
assert.equal(fieldEl.getAttribute('aria-describedby').trim(), helperId);
|
||||
|
||||
@@ -17,7 +17,7 @@ module('Integration | Component | rose/form/textarea', function (hooks) {
|
||||
const fieldEl = find('textarea');
|
||||
const id = fieldEl.id;
|
||||
const helperId = `helper-text-${id}`;
|
||||
const helperTextEl = find('.rose-form-input-helper-text');
|
||||
const helperTextEl = find('.rose-form-helper-text');
|
||||
assert.equal(helperTextEl.textContent.trim(), 'Help me');
|
||||
assert.equal(helperTextEl.id, helperId);
|
||||
assert.equal(fieldEl.getAttribute('aria-describedby').trim(), helperId);
|
||||
|
||||
Reference in new issue
Block a user