Skip to content

Commit

Permalink
fix firefox line item test
Browse files Browse the repository at this point in the history
another scenario where browser internal rules change and the generated
DOM is slightly different than what we expect.
  • Loading branch information
nchase committed Dec 19, 2017
1 parent 0f510ab commit 318606d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions spec/content.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,7 @@ describe('Content TestCase', function () {
fireEvent(target, 'keydown', {
keyCode: MediumEditor.util.keyCode.BACKSPACE
});
this.el.innerHTML = stripLinebreak(this.el);
expect(this.el.innerHTML).toBe('<p>lorem ipsum</p><ul><li></li><li>lorem ipsum</li></ul>');
});
});
Expand Down Expand Up @@ -811,3 +812,7 @@ describe('Content TestCase', function () {
});
});
});

function stripLinebreak(element) {
return element.innerHTML.replace('<br>', '');
}

0 comments on commit 318606d

Please sign in to comment.