summaryrefslogtreecommitdiffstats
path: root/devtools/client/inspector/flexbox/test/browser_flexbox_empty_state.js
blob: 82e523ebe01bcdef70c5f7959a980acf3d2ce971 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* Any copyright is dedicated to the Public Domain.
 http://creativecommons.org/publicdomain/zero/1.0/ */

"use strict";

// Test that a message is displayed when no flex container is selected.

const TEST_URI = `
  <div></div>
`;

add_task(async function () {
  await addTab("data:text/html;charset=utf-8," + encodeURIComponent(TEST_URI));
  const { flexboxInspector } = await openLayoutView();
  const { document: doc } = flexboxInspector;

  info("Checking the initial state of the Flexbox Inspector.");
  ok(
    doc.querySelector(
      ".flex-accordion .devtools-sidepanel-no-result",
      "A message is shown when no flex container is selected."
    )
  );
});