From ad6b2131d6f66631e14ad657135762bbd6f8fdbf Mon Sep 17 00:00:00 2001 From: Linus Eriksson Date: Thu, 15 Feb 2018 22:47:33 +0100 Subject: [PATCH] Style the scrollbar in the test --- spec/text-editor-component-spec.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/spec/text-editor-component-spec.js b/spec/text-editor-component-spec.js index 69bb4dbe0..ba36b7e0a 100644 --- a/spec/text-editor-component-spec.js +++ b/spec/text-editor-component-spec.js @@ -905,13 +905,20 @@ describe('TextEditorComponent', () => { expect(component.getLineNumberGutterWidth()).toBe(originalLineNumberGutterWidth) }) - it('gracefully handles edits that change the maxScrollTop by causing the horizontal scrollbar to disappear', async () => { + fit('gracefully handles edits that change the maxScrollTop by causing the horizontal scrollbar to disappear', async () => { const rowsPerTile = 1 const {component, element, editor} = buildComponent({rowsPerTile, autoHeight: false}) await setEditorHeightInLines(component, 1) await setEditorWidthInCharacters(component, 7) + // Updating scrollbar styles. + const style = document.createElement('style') + style.textContent = '::-webkit-scrollbar { height: 17px; width: 10px; }' + jasmine.attachToDOM(style) + TextEditor.didUpdateScrollbarStyles() + await component.getNextUpdatePromise() + element.focus() component.setScrollTop(component.measurements.lineHeight)