diff --git a/vscode-extension/test/e2e/runTest.js b/vscode-extension/test/e2e/runTest.js index 43206e93..fdf32e9b 100644 --- a/vscode-extension/test/e2e/runTest.js +++ b/vscode-extension/test/e2e/runTest.js @@ -32,33 +32,6 @@ async function main() { ); } - childProcess.spawnSync( - cli, - [...args, "--install-extension", "octref.vetur"], - { - encoding: "utf-8", - stdio: "inherit", - }, - ); - - childProcess.spawnSync( - cli, - [...args, "--install-extension", "svelte.svelte-vscode"], - { - encoding: "utf-8", - stdio: "inherit", - }, - ); - - childProcess.spawnSync( - cli, - [...args, "--install-extension", "astro-build.astro-vscode"], - { - encoding: "utf-8", - stdio: "inherit", - }, - ); - await runTests({ vscodeExecutablePath, version, diff --git a/vscode-extension/test/e2e/suite/completion/completion.test.js b/vscode-extension/test/e2e/suite/completion/completion.test.js index 8698e56b..99dfd7e4 100644 --- a/vscode-extension/test/e2e/suite/completion/completion.test.js +++ b/vscode-extension/test/e2e/suite/completion/completion.test.js @@ -4,15 +4,9 @@ const { testCompletion } = require("./helper"); describe("SCSS Completion Test", function () { const docUri = getDocUri("completion/main.scss"); const modulesDocUri = getDocUri("completion/modules.scss"); - const vueDocUri = getDocUri("completion/AppButton.vue"); - const svelteDocUri = getDocUri("completion/AppButton.svelte"); - const astroDocUri = getDocUri("completion/AppButton.astro"); before(async () => { await showFile(docUri); - await showFile(vueDocUri); - await showFile(svelteDocUri); - await showFile(astroDocUri); await sleepCI(); }); @@ -65,26 +59,12 @@ describe("SCSS Completion Test", function () { }, ]; await testCompletion(docUri, position(11, 11), expectedCompletions); - await testCompletion(svelteDocUri, position(14, 11), expectedCompletions); - - // For Vue and Astro, the existing $ is not replaced by VS Code, so omit it from insertText - expectedCompletions = [ - { - label: "$tilde", - insertText: '"tilde"', - }, - ]; - await testCompletion(vueDocUri, position(22, 11), expectedCompletions); - await testCompletion(astroDocUri, position(17, 11), expectedCompletions); }); it("Offers completions from partial file", async () => { const expectedCompletions = [{ label: "$partial" }]; await testCompletion(docUri, position(17, 11), expectedCompletions); - await testCompletion(vueDocUri, position(28, 11), expectedCompletions); - await testCompletion(svelteDocUri, position(20, 11), expectedCompletions); - await testCompletion(astroDocUri, position(23, 11), expectedCompletions); }); it("Offers namespaces completions including prefixes", async () => { @@ -102,24 +82,6 @@ describe("SCSS Completion Test", function () { await testCompletion(docUri, position(23, 13), expectedCompletions); - // For Vue, Svelte and Astro, the existing . from the namespace is not replaced by VS Code, so omit them from insertText. - // However, we still need them both in the filter text. - expectedCompletions = [ - { - label: "$var-var-variable", - insertText: '"$var-var-variable"', - filterText: '"ns.$var-var-variable"', - }, - { - label: "fun-fun-function", - insertText: '"fun-fun-function()"', - }, - ]; - - await testCompletion(vueDocUri, position(34, 13), expectedCompletions); - await testCompletion(svelteDocUri, position(26, 13), expectedCompletions); - await testCompletion(astroDocUri, position(29, 13), expectedCompletions); - expectedCompletions = [ { label: "mix-mix-mixin", @@ -128,18 +90,6 @@ describe("SCSS Completion Test", function () { ]; await testCompletion(docUri, position(24, 15), expectedCompletions); - - // Same as for functions with regards to the . from the namespace. - expectedCompletions = [ - { - label: "mix-mix-mixin", - insertText: '"mix-mix-mixin"', - }, - ]; - - await testCompletion(vueDocUri, position(35, 15), expectedCompletions); - await testCompletion(svelteDocUri, position(27, 15), expectedCompletions); - await testCompletion(astroDocUri, position(30, 15), expectedCompletions); }); // We can't test this until somesass.suggestOnlyFromUse: true becomes the default setting @@ -149,15 +99,6 @@ describe("SCSS Completion Test", function () { await testCompletion(docUri, position(23, 13), expectedCompletions, { expectNoMatch: true, }); - await testCompletion(vueDocUri, position(34, 13), expectedCompletions, { - expectNoMatch: true, - }); - await testCompletion(svelteDocUri, position(26, 13), expectedCompletions, { - expectNoMatch: true, - }); - await testCompletion(astroDocUri, position(29, 13), expectedCompletions, { - expectNoMatch: true, - }); expectedCompletions = [ "secret", @@ -169,44 +110,6 @@ describe("SCSS Completion Test", function () { await testCompletion(docUri, position(24, 15), expectedCompletions, { expectNoMatch: true, }); - await testCompletion(vueDocUri, position(35, 15), expectedCompletions, { - expectNoMatch: true, - }); - await testCompletion(svelteDocUri, position(27, 15), expectedCompletions, { - expectNoMatch: true, - }); - await testCompletion(astroDocUri, position(30, 15), expectedCompletions, { - expectNoMatch: true, - }); - }); - - it("Offers no completions on Vuelike file outside SCSS regions", async () => { - await testCompletion(vueDocUri, position(2, 9), []); - await testCompletion(vueDocUri, position(6, 8), []); - await testCompletion(svelteDocUri, position(1, 16), []); - await testCompletion(astroDocUri, position(4, 16), []); - }); - - it("Offers variable completions on Vuelike file", async () => { - // In Vue and Astro files: - // For variables _without_ a namespace ($color as opposed to namespace.$color), - // VS Code does not replace the existing $ when using the completion. - // The insertText must be without one to avoid $$color. However, filterText - // still need the $ sign for the suggestion to match. - let expectedCompletions = [ - { label: "$color", insertText: '"color"' }, - { label: "$fonts", insertText: '"fonts"' }, - ]; - - await testCompletion(vueDocUri, position(16, 11), expectedCompletions); - await testCompletion(astroDocUri, position(11, 11), expectedCompletions); - - expectedCompletions = [ - { label: "$color", insertText: '"$color"' }, - { label: "$fonts", insertText: '"$fonts"' }, - ]; - - await testCompletion(svelteDocUri, position(8, 11), expectedCompletions); }); it("Offers namespace completion inside string interpolation", async () => { @@ -223,24 +126,6 @@ describe("SCSS Completion Test", function () { ]; await testCompletion(docUri, position(25, 40), expectedCompletions); - - // For Vue, Svelte and Astro, the existing . from the namespace is not replaced by VS Code, so omit them from insertText. - // However, we still need them both in the filter text. - expectedCompletions = [ - { - label: "$var-var-variable", - insertText: '"$var-var-variable"', - filterText: '"ns.$var-var-variable"', - }, - { - label: "fun-fun-function", - insertText: '"fun-fun-function()"', - }, - ]; - - await testCompletion(vueDocUri, position(36, 40), expectedCompletions); - await testCompletion(svelteDocUri, position(28, 40), expectedCompletions); - await testCompletion(astroDocUri, position(31, 40), expectedCompletions); }); it("Offers completions for Sass built-ins", async () => { @@ -253,20 +138,6 @@ describe("SCSS Completion Test", function () { ]; await testCompletion(docUri, position(36, 19), expectedCompletions); - - // For Vue, Svelte and Astro, the existing . from the namespace is not replaced by VS Code, so omit them from insertText. - // However, we still need them both in the filter text. - expectedCompletions = [ - { - label: "floor", - insertText: '"floor(${1:number})"', - filterText: '"math.floor"', - }, - ]; - - await testCompletion(vueDocUri, position(42, 19), expectedCompletions); - await testCompletion(svelteDocUri, position(34, 19), expectedCompletions); - await testCompletion(astroDocUri, position(37, 19), expectedCompletions); }); it("Offers namespace completion inside string interpolation with preceeding non-space character", async () => { diff --git a/vscode-extension/test/e2e/suite/definition/definitions.test.js b/vscode-extension/test/e2e/suite/definition/definitions.test.js index 8972dd3c..78c3972d 100644 --- a/vscode-extension/test/e2e/suite/definition/definitions.test.js +++ b/vscode-extension/test/e2e/suite/definition/definitions.test.js @@ -9,15 +9,9 @@ const { testDefinition } = require("./helper"); describe("SCSS Definition Test", function () { const docUri = getDocUri("definition/main.scss"); - const vueDocUri = getDocUri("definition/AppButton.vue"); - const svelteDocUri = getDocUri("definition/AppButton.svelte"); - const astroDocUri = getDocUri("definition/AppButton.astro"); before(async () => { await showFile(docUri); - await showFile(vueDocUri); - await showFile(svelteDocUri); - await showFile(astroDocUri); await sleepCI(); }); @@ -26,9 +20,6 @@ describe("SCSS Definition Test", function () { const expectedLocation = sameLineLocation(expectedDocumentUri, 1, 1, 10); await testDefinition(docUri, position(7, 13), expectedLocation); - await testDefinition(vueDocUri, position(15, 13), expectedLocation); - await testDefinition(svelteDocUri, position(9, 15), expectedLocation); - await testDefinition(astroDocUri, position(12, 15), expectedLocation); }); it("should find definition for functions", async () => { @@ -36,9 +27,6 @@ describe("SCSS Definition Test", function () { const expectedLocation = sameLineLocation(expectedDocumentUri, 1, 11, 19); await testDefinition(docUri, position(7, 24), expectedLocation); - await testDefinition(vueDocUri, position(15, 24), expectedLocation); - await testDefinition(svelteDocUri, position(9, 26), expectedLocation); - await testDefinition(astroDocUri, position(12, 26), expectedLocation); }); it("should find definition for mixins", async () => { @@ -46,9 +34,6 @@ describe("SCSS Definition Test", function () { const expectedLocation = sameLineLocation(expectedDocumentUri, 1, 8, 13); await testDefinition(docUri, position(9, 12), expectedLocation); - await testDefinition(vueDocUri, position(17, 12), expectedLocation); - await testDefinition(svelteDocUri, position(11, 14), expectedLocation); - await testDefinition(astroDocUri, position(14, 14), expectedLocation); }); it("should find definition for placeholder", async () => { @@ -63,9 +48,6 @@ describe("SCSS Definition Test", function () { const expectedLocation = sameLineLocation(expectedDocumentUri, 1, 1, 18); await testDefinition(docUri, position(15, 14), expectedLocation); - await testDefinition(vueDocUri, position(23, 14), expectedLocation); - await testDefinition(svelteDocUri, position(17, 14), expectedLocation); - await testDefinition(astroDocUri, position(20, 14), expectedLocation); }); it("should find symbol definition behind namespace and prefix", async () => { @@ -73,8 +55,5 @@ describe("SCSS Definition Test", function () { const expectedLocation = sameLineLocation(expectedDocumentUri, 1, 8, 17); await testDefinition(docUri, position(16, 17), expectedLocation); - await testDefinition(vueDocUri, position(24, 17), expectedLocation); - await testDefinition(svelteDocUri, position(18, 17), expectedLocation); - await testDefinition(astroDocUri, position(21, 17), expectedLocation); }); }); diff --git a/vscode-extension/test/e2e/suite/hover/hover.test.js b/vscode-extension/test/e2e/suite/hover/hover.test.js index 35577c4e..89fe99fb 100644 --- a/vscode-extension/test/e2e/suite/hover/hover.test.js +++ b/vscode-extension/test/e2e/suite/hover/hover.test.js @@ -4,16 +4,10 @@ const { testHover } = require("./helper"); describe("SCSS Hover Test", function () { const docUri = getDocUri("hover/main.scss"); const collisionUri = getDocUri("hover/collision.scss"); - const vueDocUri = getDocUri("hover/AppButton.vue"); - const svelteDocUri = getDocUri("hover/AppButton.svelte"); - const astroDocUri = getDocUri("hover/AppButton.astro"); before(async () => { await showFile(docUri); await showFile(collisionUri); - await showFile(vueDocUri); - await showFile(svelteDocUri); - await showFile(astroDocUri); await sleepCI(); }); @@ -25,9 +19,6 @@ describe("SCSS Hover Test", function () { }; await testHover(docUri, position(7, 13), expectedContents); - await testHover(vueDocUri, position(15, 13), expectedContents); - await testHover(svelteDocUri, position(9, 15), expectedContents); - await testHover(astroDocUri, position(12, 15), expectedContents); }); it("shows hover for functions", async () => { @@ -38,9 +29,6 @@ describe("SCSS Hover Test", function () { }; await testHover(docUri, position(7, 24), expectedContents); - await testHover(vueDocUri, position(15, 24), expectedContents); - await testHover(svelteDocUri, position(9, 26), expectedContents); - await testHover(astroDocUri, position(12, 26), expectedContents); }); it("shows hover for mixins", async () => { @@ -51,9 +39,6 @@ describe("SCSS Hover Test", function () { }; await testHover(docUri, position(9, 12), expectedContents); - await testHover(vueDocUri, position(17, 12), expectedContents); - await testHover(svelteDocUri, position(11, 14), expectedContents); - await testHover(astroDocUri, position(14, 14), expectedContents); }); it("shows hover for placeholders", async () => { @@ -74,9 +59,6 @@ describe("SCSS Hover Test", function () { }; await testHover(docUri, position(15, 14), expectedContents); - await testHover(vueDocUri, position(23, 14), expectedContents); - await testHover(svelteDocUri, position(17, 14), expectedContents); - await testHover(astroDocUri, position(20, 14), expectedContents); }); it("shows hover for symbol behind namespace and prefix", async () => { @@ -88,9 +70,6 @@ describe("SCSS Hover Test", function () { }; await testHover(docUri, position(16, 17), expectedContents); - await testHover(vueDocUri, position(24, 17), expectedContents); - await testHover(svelteDocUri, position(18, 17), expectedContents); - await testHover(astroDocUri, position(21, 17), expectedContents); }); it("shows hover for SassDoc annotations", async () => { diff --git a/vscode-extension/test/e2e/suite/signature/signature.test.js b/vscode-extension/test/e2e/suite/signature/signature.test.js index 1d8e3a8d..908bfd76 100644 --- a/vscode-extension/test/e2e/suite/signature/signature.test.js +++ b/vscode-extension/test/e2e/suite/signature/signature.test.js @@ -3,15 +3,9 @@ const { testSignature } = require("./helper"); describe("SCSS Signature Help Test", function () { const docUri = getDocUri("signature/main.scss"); - const vueDocUri = getDocUri("signature/AppButton.vue"); - const svelteDocUri = getDocUri("signature/AppButton.svelte"); - const astroDocUri = getDocUri("signature/AppButton.astro"); before(async () => { await showFile(docUri); - await showFile(vueDocUri); - await showFile(svelteDocUri); - await showFile(astroDocUri); await sleepCI(); }); @@ -29,9 +23,6 @@ describe("SCSS Signature Help Test", function () { }; await testSignature(docUri, position(5, 19), expected); - await testSignature(vueDocUri, position(14, 19), expected); - await testSignature(svelteDocUri, position(8, 19), expected); - await testSignature(astroDocUri, position(11, 19), expected); }); it("should suggest all parameters of mixin behind namespace and prefix", async () => { @@ -47,9 +38,6 @@ describe("SCSS Signature Help Test", function () { }; await testSignature(docUri, position(14, 30), expected); - await testSignature(vueDocUri, position(23, 30), expected); - await testSignature(svelteDocUri, position(17, 30), expected); - await testSignature(astroDocUri, position(20, 30), expected); }); it("should suggest the second parameter of mixin", async () => { @@ -65,9 +53,6 @@ describe("SCSS Signature Help Test", function () { }; await testSignature(docUri, position(6, 21), expected); - await testSignature(vueDocUri, position(15, 21), expected); - await testSignature(svelteDocUri, position(9, 21), expected); - await testSignature(astroDocUri, position(12, 21), expected); }); it("should suggest the second parameter of mixin behind namespace and prefix", async () => { @@ -83,9 +68,6 @@ describe("SCSS Signature Help Test", function () { }; await testSignature(docUri, position(15, 32), expected); - await testSignature(vueDocUri, position(24, 32), expected); - await testSignature(svelteDocUri, position(18, 32), expected); - await testSignature(astroDocUri, position(21, 32), expected); }); }); @@ -103,9 +85,6 @@ describe("SCSS Signature Help Test", function () { }; await testSignature(docUri, position(8, 16), expected); - await testSignature(vueDocUri, position(17, 16), expected); - await testSignature(svelteDocUri, position(11, 16), expected); - await testSignature(astroDocUri, position(14, 16), expected); }); it("should suggest all parameters of function behind namespace and prefix", async () => { @@ -121,9 +100,6 @@ describe("SCSS Signature Help Test", function () { }; await testSignature(docUri, position(17, 27), expected); - await testSignature(vueDocUri, position(26, 27), expected); - await testSignature(svelteDocUri, position(20, 27), expected); - await testSignature(astroDocUri, position(23, 27), expected); }); it("should suggest the second parameter of function", async () => { @@ -139,9 +115,6 @@ describe("SCSS Signature Help Test", function () { }; await testSignature(docUri, position(8, 26), expected); - await testSignature(vueDocUri, position(17, 26), expected); - await testSignature(svelteDocUri, position(11, 26), expected); - await testSignature(astroDocUri, position(14, 26), expected); }); it("should suggest the second parameter of function behind namespace and prefix", async () => { @@ -157,9 +130,6 @@ describe("SCSS Signature Help Test", function () { }; await testSignature(docUri, position(17, 48), expected); - await testSignature(vueDocUri, position(26, 48), expected); - await testSignature(svelteDocUri, position(20, 48), expected); - await testSignature(astroDocUri, position(23, 48), expected); }); it("should suggest all parameters of function from Sass built-in", async () => { diff --git a/vscode-extension/test/web/runTest.js b/vscode-extension/test/web/runTest.js index 9ff6c25f..3fce7a45 100644 --- a/vscode-extension/test/web/runTest.js +++ b/vscode-extension/test/web/runTest.js @@ -33,12 +33,6 @@ async function main() { browserType: "chromium", extensionDevelopmentPath, extensionTestsPath, - extensionIds: [ - // At time of writing, these don't work in the browser - // { id: "octref.vetur" }, - // { id: "svelte.svelte-vscode" }, - // { id: "astro-build.astro-vscode" }, - ], folderPath, waitForDebugger: waitForDebugger ? Number(waitForDebugger.slice(attachArgName.length))