Style the scrollbar in the test

This commit is contained in:
Linus Eriksson
2018-02-15 22:47:33 +01:00
parent 3059d14bd7
commit ad6b2131d6

View File

@@ -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)