Skip to content

Commit

Permalink
Skip some tests that don't work for web w/ comments
Browse files Browse the repository at this point in the history
  • Loading branch information
DanTup committed Nov 26, 2019
1 parent 702679e commit 4dcbebb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
1 change: 1 addition & 0 deletions src/test/helpers.ts
Expand Up @@ -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"));
Expand Down
19 changes: 11 additions & 8 deletions 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));
Expand Down Expand Up @@ -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;
Expand All @@ -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),
Expand All @@ -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;
Expand All @@ -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);
Expand Down

0 comments on commit 4dcbebb

Please sign in to comment.