From 4dcbebb15a4d04924419e2068ac93a03797fcc4b Mon Sep 17 00:00:00 2001 From: Danny Tuppeny Date: Tue, 26 Nov 2019 18:01:41 +0000 Subject: [PATCH] Skip some tests that don't work for web w/ comments --- src/test/helpers.ts | 1 + src/test/web_only/debug/web.test.ts | 19 +++++++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/test/helpers.ts b/src/test/helpers.ts index 272b924c52..17301136e5 100644 --- a/src/test/helpers.ts +++ b/src/test/helpers.ts @@ -99,6 +99,7 @@ export const webHelloWorldExampleSubFolder = vs.Uri.file(path.join(fsPath(webHel export const webHelloWorldExampleSubFolderIndexFile = vs.Uri.file(path.join(fsPath(webHelloWorldExampleSubFolder), "web/index.html")); export const webBrokenFolder = vs.Uri.file(path.join(fsPath(webProjectContainerFolder), "broken")); export const webBrokenIndexFile = vs.Uri.file(path.join(fsPath(webBrokenFolder), "web/index.html")); +export const webBrokenMainFile = vs.Uri.file(path.join(fsPath(webBrokenFolder), "lib/src/todo_list/todo_list_component.dart")); // Web tests export const webTestMainFile = vs.Uri.file(path.join(fsPath(webHelloWorldFolder), "test/basic_test.dart")); export const webTestBrokenFile = vs.Uri.file(path.join(fsPath(webHelloWorldFolder), "test/broken_test.dart")); diff --git a/src/test/web_only/debug/web.test.ts b/src/test/web_only/debug/web.test.ts index e39dd77ef8..1f1c23417d 100644 --- a/src/test/web_only/debug/web.test.ts +++ b/src/test/web_only/debug/web.test.ts @@ -1,12 +1,12 @@ import * as assert from "assert"; import * as path from "path"; import * as vs from "vscode"; -import { VmService, VmServiceExtension } from "../../../shared/enums"; +import { VmService } from "../../../shared/enums"; import { fetch } from "../../../shared/fetch"; import { fsPath } from "../../../shared/vscode/utils"; import { DartDebugClient } from "../../dart_debug_client"; import { ensureVariable } from "../../debug_helpers"; -import { activate, defer, delay, ext, extApi, getLaunchConfiguration, getPackages, logger, openFile, positionOf, sb, waitForResult, watchPromise, webBrokenIndexFile, webHelloWorldExampleSubFolderIndexFile, webHelloWorldFolder, webHelloWorldIndexFile, webHelloWorldMainFile } from "../../helpers"; +import { activate, defer, delay, ext, extApi, getLaunchConfiguration, getPackages, logger, openFile, positionOf, sb, waitForResult, watchPromise, webBrokenIndexFile, webBrokenMainFile, webHelloWorldExampleSubFolderIndexFile, webHelloWorldFolder, webHelloWorldIndexFile, webHelloWorldMainFile } from "../../helpers"; describe("web debugger", () => { beforeEach("activate webHelloWorldIndexFile", () => activate(webHelloWorldIndexFile)); @@ -414,7 +414,7 @@ describe("web debugger", () => { }); // Skipped due to https://github.com/flutter/flutter/issues/17007. - it.skip("stops on exception", async function () { + it("stops on exception", async function () { if (!extApi.dartCapabilities.webSupportsEvaluation) { this.skip(); return; @@ -432,13 +432,14 @@ describe("web debugger", () => { ]); }); - it("provides exception details when stopped on exception", async () => { - await openFile(webBrokenIndexFile); + // Skipped because unable to set break-on-exceptions without start-paused + it.skip("provides exception details when stopped on exception", async () => { + await openFile(webBrokenMainFile); const config = await startDebugger(webBrokenIndexFile); await Promise.all([ dc.configurationSequence(), dc.assertStoppedLocation("exception", { - line: positionOf("^won't find this").line + 1, // positionOf is 0-based, but seems to want 1-based + line: positionOf("^Oops").line + 1, // positionOf is 0-based, but seems to want 1-based path: fsPath(webBrokenIndexFile), }), dc.launch(config), @@ -448,7 +449,8 @@ describe("web debugger", () => { ensureVariable(variables, "$e.message", "message", `"(TODO WHEN UNSKIPPING)"`); }); - it("logs expected text (and does not stop) at a logpoint", async function () { + // Skipped because unable to set logpoints reliably without start-paused + it.skip("logs expected text (and does not stop) at a logpoint", async function () { if (!extApi.dartCapabilities.webSupportsEvaluation) { this.skip(); return; @@ -474,7 +476,8 @@ describe("web debugger", () => { ]); }); - it("writes failure output", async () => { + // Skipped due to https://github.com/dart-lang/webdev/issues/837. + it.skip("writes failure output", async () => { // This test really wants to check stderr, but since the widgets library catches the exception is // just comes via stdout. await openFile(webBrokenIndexFile);