"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
// 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.
const chai_1 = require("chai");
const emulation_helpers_js_1 = require("../helpers/emulation-helpers.js");
const DUO_VERTICAL_SPANNED_WIDTH = '1114';
const DUO_VERTICAL_WIDTH = '540';
describe('Dual screen mode', () => {
    it('User can toggle between single and dual screenmodes for a dual screen device', async ({ devToolsPage, inspectedPage }) => {
        await (0, emulation_helpers_js_1.startEmulationWithDualScreenPage)(devToolsPage, inspectedPage);
        await (0, emulation_helpers_js_1.selectDualScreen)(devToolsPage);
        await (0, emulation_helpers_js_1.clickToggleButton)(devToolsPage);
        await (0, emulation_helpers_js_1.waitForWidthOfDevice)(devToolsPage, DUO_VERTICAL_SPANNED_WIDTH);
        await (0, emulation_helpers_js_1.clickToggleButton)(devToolsPage);
        await (0, emulation_helpers_js_1.waitForWidthOfDevice)(devToolsPage, DUO_VERTICAL_WIDTH);
    });
    it('User may not click toggle dual screen button for a non-dual screen device', async ({ devToolsPage, inspectedPage }) => {
        await (0, emulation_helpers_js_1.startEmulationWithDualScreenPage)(devToolsPage, inspectedPage);
        await (0, emulation_helpers_js_1.selectNonDualScreenDevice)(devToolsPage);
        // toggle button should not be found
        const toggleButton = await (0, emulation_helpers_js_1.selectToggleButton)(devToolsPage);
        chai_1.assert.isNull(toggleButton);
    });
});
//# sourceMappingURL=dual-screen.test.js.map