"use strict";
// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
Object.defineProperty(exports, "__esModule", { value: true });
const issues_helpers_js_1 = require("../helpers/issues-helpers.js");
describe('The Issues tab categories checkbox', () => {
    it('should group issues by associated categories when checked', async ({ inspectedPage, devToolsPage }) => {
        await inspectedPage.goToResource('elements/element-reveal-inline-issue.html');
        await (0, issues_helpers_js_1.navigateToIssuesTab)(devToolsPage);
        if (!await (0, issues_helpers_js_1.getGroupByCategoryChecked)(devToolsPage)) {
            await (0, issues_helpers_js_1.toggleGroupByCategory)(devToolsPage);
        }
        await (0, issues_helpers_js_1.expandCategory)(devToolsPage);
        await (0, issues_helpers_js_1.assertCategoryName)('Content Security Policy', devToolsPage);
        await (0, issues_helpers_js_1.expandIssue)(devToolsPage);
        await (0, issues_helpers_js_1.assertIssueTitle)('Content Security Policy blocks inline execution of scripts and stylesheets', devToolsPage);
    });
    it('should use a flat list of issues when not checked', async ({ inspectedPage, devToolsPage }) => {
        await inspectedPage.goToResource('elements/element-reveal-inline-issue.html');
        await (0, issues_helpers_js_1.navigateToIssuesTab)(devToolsPage);
        if (await (0, issues_helpers_js_1.getGroupByCategoryChecked)(devToolsPage)) {
            await (0, issues_helpers_js_1.toggleGroupByCategory)(devToolsPage);
        }
        await (0, issues_helpers_js_1.expandIssue)(devToolsPage);
        await (0, issues_helpers_js_1.assertIssueTitle)('Content Security Policy blocks inline execution of scripts and stylesheets', devToolsPage);
    });
});
//# sourceMappingURL=group-by-categories.test.js.map