mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-19 13:04:39 +08:00
This removes <portal> specific tests from DevTools and updates other Issues tab tests to not rely on <portal> issues, but use quirks mode. Fixed: chromium:1505383 Bug: chromium:1498140 Change-Id: I212398daf2442945d1436425dca16ef6698bc201 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5062850 Reviewed-by: Alex Rudenko <alexrudenko@chromium.org> Auto-Submit: Benedikt Meurer <bmeurer@chromium.org> Commit-Queue: Alex Rudenko <alexrudenko@chromium.org> Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
50 lines
1.6 KiB
TypeScript
50 lines
1.6 KiB
TypeScript
// Copyright 2020 The Chromium Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
import {getBrowserAndPages, goToResource} from '../../shared/helper.js';
|
|
import {describe, it} from '../../shared/mocha-extensions.js';
|
|
import {navigateToConsoleTab, waitForIssueButtonLabel} from '../helpers/console-helpers.js';
|
|
|
|
describe('The Console Tab', async () => {
|
|
it('shows the toolbar button for no issue correctly', async () => {
|
|
// Navigate to page which causes no issues.
|
|
await goToResource('empty.html');
|
|
await navigateToConsoleTab();
|
|
|
|
await waitForIssueButtonLabel('No Issues');
|
|
});
|
|
|
|
it('shows the toolbar button for one issue correctly', async () => {
|
|
// Navigate to page which causes a single issue.
|
|
await goToResource('elements/quirks-mode.html');
|
|
await navigateToConsoleTab();
|
|
|
|
await waitForIssueButtonLabel('1 Issue:');
|
|
});
|
|
|
|
it('shows the toolbar button for three issues correctly', async () => {
|
|
// Navigate to page which causes three issues.
|
|
await goToResource('issues/cors-issue-2.html');
|
|
await navigateToConsoleTab();
|
|
|
|
await waitForIssueButtonLabel('3 Issues:');
|
|
});
|
|
|
|
it('updates the toolbar button correctly', async () => {
|
|
// Navigate to page which causes no issues.
|
|
await goToResource('empty.html');
|
|
await navigateToConsoleTab();
|
|
|
|
await waitForIssueButtonLabel('No Issues');
|
|
|
|
const {target} = getBrowserAndPages();
|
|
await target.evaluate(() => {
|
|
// Trigger a CookieIssue.
|
|
document.cookie = 'foo=bar;samesite=None';
|
|
});
|
|
|
|
await waitForIssueButtonLabel('1 Issue:');
|
|
});
|
|
});
|