From 8f592eb4bda2a89f06639578b8d5341c32fbe82d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Pupier?= Date: Mon, 6 May 2024 11:35:18 +0200 Subject: [PATCH] FUSETOOLS2-2311 - fix tests with VS Code 1.86+ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit on Windows and Mac, the returned completion has a different structure in some cases starting with VS Code 1.86+. Signed-off-by: Aurélien Pupier --- .github/workflows/OtherOSes.yml | 2 +- .github/workflows/main.yml | 2 +- src/test/suite/completion.util.ts | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/OtherOSes.yml b/.github/workflows/OtherOSes.yml index 6c00ab5ca..494fa04dd 100644 --- a/.github/workflows/OtherOSes.yml +++ b/.github/workflows/OtherOSes.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: os: [windows-latest, macos-latest] - version: ["1.85.2"] # [x.x.x | latest | max] + version: ["1.85.2", max] # [x.x.x | latest | max] type: [stable] # [stable | insider] fail-fast: false diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 55edc6a9b..f6fc48c5c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - version: ["1.85.2"] # [x.x.x | latest | max] + version: ["1.85.2", max] # [x.x.x | latest | max] type: [stable] # [stable | insider] fail-fast: false diff --git a/src/test/suite/completion.util.ts b/src/test/suite/completion.util.ts index a462913f6..361aae455 100644 --- a/src/test/suite/completion.util.ts +++ b/src/test/suite/completion.util.ts @@ -35,7 +35,8 @@ export async function checkExpectedCompletion(docUri: vscode.Uri, position: vsco const actualCompletionList = value as vscode.CompletionList; lastCompletionList = actualCompletionList; const completionItemFound = actualCompletionList.items.find(completion => { - return completion.label.toString() === expectedCompletion.label.toString() + return (completion.label.toString() === expectedCompletion.label.toString() + || completion.label.toString() === (expectedCompletion.label as vscode.CompletionItemLabel).label) && completion.documentation === expectedCompletion.documentation && (expectedCompletion.insertText === undefined || completion.insertText === expectedCompletion.insertText); });