Bug fix: fix autocompletion regression (#4476)
* Add final error-less expectation to autocomplete test * Fix failing test * tweak to leave function in place --------- Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch>
This commit is contained in:
		@ -694,6 +694,9 @@ test.describe('Editor tests', () => {
 | 
			
		||||
        .toHaveText(`sketch001 = startSketchOn('XZ')
 | 
			
		||||
    |> startProfileAt([3.14, 12], %)
 | 
			
		||||
    |> xLine(5, %) // lin`)
 | 
			
		||||
 | 
			
		||||
      // expect there to be no KCL errors
 | 
			
		||||
      await expect(page.locator('.cm-lint-marker-error')).toHaveCount(0)
 | 
			
		||||
    })
 | 
			
		||||
 | 
			
		||||
    test('with tab to accept the completion', async ({ page }) => {
 | 
			
		||||
 | 
			
		||||
@ -72,9 +72,10 @@ export default class EditorManager {
 | 
			
		||||
      // we cannot use <>.constructor.name since it will get destroyed
 | 
			
		||||
      // when packaging the application.
 | 
			
		||||
      const isTreeHighlightPlugin =
 | 
			
		||||
        e.value.hasOwnProperty('tree') &&
 | 
			
		||||
        e.value.hasOwnProperty('decoratedTo') &&
 | 
			
		||||
        e.value.hasOwnProperty('decorations')
 | 
			
		||||
        e?.value &&
 | 
			
		||||
        e.value?.hasOwnProperty('tree') &&
 | 
			
		||||
        e.value?.hasOwnProperty('decoratedTo') &&
 | 
			
		||||
        e.value?.hasOwnProperty('decorations')
 | 
			
		||||
 | 
			
		||||
      if (isTreeHighlightPlugin) {
 | 
			
		||||
        let originalUpdate = e.value.update
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user