Skip to content

Commit 3431527

Browse files
OrKoNDevtools-frontend LUCI CQ
authored andcommitted
Migrate test/e2e/console/console-ignore-list_test.ts
[email protected] Fixed: 416404998 Change-Id: I8f212779282e224b49a9a440f02272240f8c2e59 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6702386 Reviewed-by: Philip Pfaffe <[email protected]> Auto-Submit: Alex Rudenko <[email protected]> Commit-Queue: Alex Rudenko <[email protected]>
1 parent 72872b9 commit 3431527

File tree

4 files changed

+62
-66
lines changed

4 files changed

+62
-66
lines changed

test/e2e/console/BUILD.gn

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ node_ts_library("console") {
1010
"console-autocomplete_test.ts",
1111
"console-context-menu_test.ts",
1212
"console-context-selector_test.ts",
13-
"console-ignore-list_test.ts",
1413
"console-insight_test.ts",
1514
"console-repl-mode_test.ts",
1615
"issues-toolbar_test.ts",

test/e2e/console/console-ignore-list_test.ts

Lines changed: 0 additions & 65 deletions
This file was deleted.

test/e2e_non_hosted/console/BUILD.gn

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ ts_e2e_library("console") {
1616
"console-expand-recursively_test.ts",
1717
"console-fetch-logging_test.ts",
1818
"console-filter_test.ts",
19+
"console-ignore-list_test.ts",
1920
"console-last-result_test.ts",
2021
"console-live-expressions_test.ts",
2122
"console-log_test.ts",
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
// Copyright 2023 The Chromium Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
5+
import {assert} from 'chai';
6+
7+
import {
8+
navigateToConsoleTab,
9+
} from '../../e2e/helpers/console-helpers.js';
10+
import {setIgnoreListPattern} from '../../e2e/helpers/settings-helpers.js';
11+
import {
12+
getVisibleTextContents,
13+
replacePuppeteerUrl,
14+
} from '../../shared/helper.js';
15+
16+
describe('Ignore list', () => {
17+
it('can be toggled on and off in console stack trace', async ({devToolsPage, inspectedPage}) => {
18+
await setIgnoreListPattern('thirdparty', devToolsPage);
19+
20+
await inspectedPage.goToResource('../resources/sources/multi-files.html');
21+
await navigateToConsoleTab(devToolsPage);
22+
await inspectedPage.evaluate('wrapper(() => {console.trace("test");});');
23+
24+
await devToolsPage.waitFor('.stack-preview-container:not(.show-hidden-rows)');
25+
await devToolsPage.waitForVisible('.show-all-link');
26+
27+
const minimized = [
28+
'(anonymous) @ (index):1',
29+
'(anonymous) @ (index):1',
30+
];
31+
const full = [
32+
'(anonymous) @ (index):1',
33+
'innercall @ multi-files-thirdparty.js:8',
34+
'callfunc @ multi-files-thirdparty.js:16',
35+
'(anonymous) @ (index):1',
36+
];
37+
38+
assert.deepEqual(
39+
(await getVisibleTextContents('.stack-preview-container tbody tr', devToolsPage))
40+
.map((value: string|null) => value ? replacePuppeteerUrl(value) : value),
41+
minimized);
42+
43+
await devToolsPage.click('.show-all-link .link');
44+
await devToolsPage.waitFor('.stack-preview-container.show-hidden-rows');
45+
await devToolsPage.waitForVisible('.show-less-link');
46+
47+
assert.deepEqual(
48+
(await getVisibleTextContents('.stack-preview-container tbody tr', devToolsPage))
49+
.map((value: string|null) => value ? replacePuppeteerUrl(value) : value),
50+
full);
51+
52+
await devToolsPage.click('.show-less-link .link');
53+
await devToolsPage.waitFor('.stack-preview-container:not(.show-hidden-rows)');
54+
await devToolsPage.waitForVisible('.show-all-link');
55+
56+
assert.deepEqual(
57+
(await getVisibleTextContents('.stack-preview-container tbody tr', devToolsPage))
58+
.map((value: string|null) => value ? replacePuppeteerUrl(value) : value),
59+
minimized);
60+
});
61+
});

0 commit comments

Comments
 (0)