mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-11-09 23:44:24 +03:00
Test soft wrap column measurement with a custom gutter
This commit is contained in:
parent
a239b66396
commit
39bc295f1c
@ -2085,6 +2085,22 @@ describe('TextEditorComponent', () => {
|
||||
const bLabels = Array.from(bNumbers, e => e.textContent)
|
||||
expect(bLabels).toEqual(['b - 0', 'b - 1', 'b - 2', 'b - 3', 'b - 4', 'b - 5'])
|
||||
})
|
||||
|
||||
it("updates the editor's soft wrap width when a custom gutter's measurement is available", () => {
|
||||
const {component, element, editor} = buildComponent({
|
||||
lineNumberGutterVisible: false,
|
||||
width: 400,
|
||||
softWrapped: true,
|
||||
attach: false,
|
||||
})
|
||||
const gutter = editor.addGutter({name: 'a', priority: 10})
|
||||
gutter.getElement().style.width = '100px'
|
||||
|
||||
jasmine.attachToDOM(element)
|
||||
|
||||
expect(component.getGutterContainerWidth()).toBe(100)
|
||||
expect(editor.getSoftWrapColumn()).toBe(39);
|
||||
})
|
||||
})
|
||||
|
||||
describe('block decorations', () => {
|
||||
|
Loading…
Reference in New Issue
Block a user