Rename module

HighlightTags was bad because:
- we haven’t called placeholders ‘tags’ for a long time
- it also does resizing of the `<textarea>`, not just highlighting the
  placeholders
This commit is contained in:
Chris Hill-Scott
2019-10-16 15:20:05 +01:00
parent d0ce4d07a3
commit 6c0e853db4
13 changed files with 22 additions and 19 deletions

View File

@@ -1,14 +1,14 @@
const helpers = require('./support/helpers.js');
beforeAll(() => {
require('../../app/assets/javascripts/highlightTags.js');
require('../../app/assets/javascripts/enhancedTextbox.js');
});
afterAll(() => {
require('./support/teardown.js');
});
describe('Highlight tags', () => {
describe('Enhanced textbox', () => {
let input;
let textarea;
@@ -38,11 +38,11 @@ describe('Highlight tags', () => {
document.body.innerHTML = `
<div class="form-group">
<label for="subject">Subject</label>
<input class="form-control textbox-highlight-textbox" data-module="highlight-tags" type="text" name="subject" id="subject" />
<input class="form-control textbox-highlight-textbox" data-module="enhanced-textbox" type="text" name="subject" id="subject" />
</div>
<div class="form-group">
<label for="template_content">Message</label>
<textarea class="form-control form-control-1-1 textbox-highlight-textbox" data-module="highlight-tags" id="template_content" name="template_content" rows="8">
<textarea class="form-control form-control-1-1 textbox-highlight-textbox" data-module="enhanced-textbox" id="template_content" name="template_content" rows="8">
</textarea>
</div>`;