Files
react-native-devtools-frontend/test/e2e/issues/report-only_test.ts
T
Alfonso Castaño b60a4fdffc E2E test for report-only CSP issues
New E2E test to verify that the status of the violation is blocked or report-only.

DISABLE_THIRD_PARTY_CHECK=<Introduce report-only field in CDP issues>

Bug: chromium:1139223, chromium:1124712
Change-Id: Ibf01624a069fb83013a8fa162235d307bc3e07ff
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2485086
Commit-Queue: Alfonso Castaño <alcastano@google.com>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
2020-10-21 13:56:45 +00:00

23 lines
900 B
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 {goToResource} from '../../shared/helper.js';
import {describe, it} from '../../shared/mocha-extensions.js';
import {assertStatus, expandIssue, navigateToIssuesTab} from '../helpers/issues-helpers.js';
describe('The Issues tab report-only issues', async () => {
it('should report the violation as blocked', async () => {
await goToResource('elements/element-reveal-inline-issue.html');
await navigateToIssuesTab();
await expandIssue();
await assertStatus('blocked');
});
it('should report the violation as report-only', async () => {
await goToResource('network/csp-report-only.rawresponse');
await navigateToIssuesTab();
await expandIssue();
await assertStatus('report-only');
});
});