From 2a91ff723a4fd765edf55573af9e229fd2837840 Mon Sep 17 00:00:00 2001 From: Aiday Marlen Kyzy Date: Tue, 17 Sep 2024 18:46:00 +0200 Subject: [PATCH] addd code --- test/smoke/runner.js | 6 +++--- test/smoke/smoke.test.js | 7 +++++++ test/unit/all.js | 1 + 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/test/smoke/runner.js b/test/smoke/runner.js index 1e5f109d..27630682 100644 --- a/test/smoke/runner.js +++ b/test/smoke/runner.js @@ -14,7 +14,7 @@ const path = require('path'); /** @typedef {import('./common').PackagerKind} PackagerKind */ /** @typedef {import('./common').TestInfo} TestInfo */ -const DEBUG_TESTS = process.argv.includes('--debug-tests'); +const DEBUG_TESTS = true; // process.argv.includes('--debug-tests'); const REPO_ROOT = path.join(__dirname, '../../'); const PORT = 8563; @@ -42,7 +42,7 @@ async function runTests() { // uncomment to shortcircuit and run a specific combo // await runTest('webpack', 'chromium'); return; /** @type {PackagerKind[]} */ - const testTypes = ['amd', 'webpack', 'esbuild', 'vite']; + const testTypes = ['webpack']; // TODO: add parcel! (this currently fails because parcel replaces process with {}) for (const type of testTypes) { @@ -75,7 +75,7 @@ function runTest(packager, browser) { '--no-delay', '--headless', '--timeout', - '20000' + '2000000' ], { env, diff --git a/test/smoke/smoke.test.js b/test/smoke/smoke.test.js index 81a3ba65..dd556c92 100644 --- a/test/smoke/smoke.test.js +++ b/test/smoke/smoke.test.js @@ -113,17 +113,24 @@ suite(`Smoke Test '${testInfo.packager}' on '${testInfo.browser}'`, () => { }); test('should be able to create plaintext editor', async function () { + console.log('inside of test'); + console.log('REPO_ROOT : ', __dirname + '../../'); + await createEditor('hello world', 'plaintext'); // type a link in it await setEditorPosition(1, 12); await triggerEditorCommand('type', { text: '\nhttps://www.microsoft.com' }); + console.log('triggerEditorCommand'); + // check that the link gets highlighted, which indicates that the web worker is healthy await page.waitForSelector('.detected-link'); }); test('css smoke test', async function () { + console.log('css smoke test'); + await createEditor('.sel1 { background: red; }\\n.sel2 {}', 'css'); // check that a squiggle appears, which indicates that the language service is up and running diff --git a/test/unit/all.js b/test/unit/all.js index 28d1d9f9..ef459431 100644 --- a/test/unit/all.js +++ b/test/unit/all.js @@ -22,6 +22,7 @@ global.document.queryCommandSupported = function () { return false; }; global.UIEvent = tmp.window.UIEvent; +global._VSCODE_FILE_ROOT = ''; global.window = { location: {},