Commit 693696fb authored by Daisuke Akatsuka's avatar Daisuke Akatsuka
Browse files

Bug 1588962: Add a test whether reflect the rule change. r=rcaliman

Depends on D49534

Differential Revision:

extra : moz-landing-system : lando
parent 23c975fc
......@@ -12,4 +12,5 @@ support-files =
/* Any copyright is dedicated to the Public Domain. */
"use strict";
// Test whether the content of the issue list will be changed when the rules are changed
// on the rule view.
const TEST_URI = `<div style="border-block-color: lime;"></div>`;
add_task(async function() {
info("Enable 3 pane mode");
await pushPref("devtools.inspector.three-pane-enabled", true);
await addTab("data:text/html;charset=utf-8," + encodeURIComponent(TEST_URI));
const { inspector, panel } = await openCompatibilityView();
await selectNode("div", inspector);
info("Check the initial issue");
await assertIssueList(panel, [{ property: "border-block-color" }]);
info("Check the issue after toggling the property");
const view = inspector.getPanel("ruleview").view;
const rule = getRuleViewRuleEditor(view, 0).rule;
await _togglePropStatus(view, rule.textProps[0]);
await assertIssueList(panel, []);
info("Check the issue after toggling the property again");
await _togglePropStatus(view, rule.textProps[0]);
await assertIssueList(panel, [{ property: "border-block-color" }]);
async function _togglePropStatus(view, textProp) {
const onRuleViewRefreshed = view.once("ruleview-changed");;
await onRuleViewRefreshed;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment