Skip to content

Commit

Permalink
chore: add deprecation message to w3c-common profile (#3109)
Browse files Browse the repository at this point in the history
  • Loading branch information
sidvishnoi authored Sep 14, 2020
1 parent ab1e507 commit c8d8be3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
5 changes: 5 additions & 0 deletions profiles/w3c-common.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
*/

"use strict";

import { pub } from "../src/core/pubsubhub.js";

// In case everything else fails, we want the error
window.addEventListener("error", ev => {
console.error(ev.error, ev.message, ev);
Expand Down Expand Up @@ -96,6 +99,8 @@ async function domReady() {
try {
ui.show();
await domReady();
const msg = `"respec-w3c-common" profile has been deprecated in favor of the "respec-w3c" profile and will not receive any future updates, including the support for W3C 2020 process. [Please migrate to "respec-w3c" profile.](https://github.com/w3c/respec/wiki/respec-w3c-common-migration-guide)`;
pub("warn", msg);
await runner.runAll(plugins);
} finally {
ui.enable();
Expand Down
10 changes: 5 additions & 5 deletions tests/spec/core/ui-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,18 @@ describe("Core - UI", () => {
const doc = await makeRSDoc(makeStandardOps());
const ui = doc.defaultView.respecUI;

expect(doc.getElementById("respec-pill-warning")).toBeNull();
expect(doc.getElementById("respec-pill-warning")).not.toBeNull();

ui.warning("test 1");
const button = doc.getElementById("respec-pill-warning");

expect(button).toBeTruthy();
expect(button.textContent).toBe("1");
expect(button.getAttribute("aria-label")).toBe("1 ReSpec Warning");

ui.warning("test 2");
expect(button.textContent).toBe("2");
expect(button.getAttribute("aria-label")).toBe("2 ReSpec Warnings");

ui.warning("test 2");
expect(button.textContent).toBe("3");
expect(button.getAttribute("aria-label")).toBe("3 ReSpec Warnings");
});

describe("ui/dfn-list", () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/spec/core/webidl-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ describe("Core - WebIDL", () => {

// void type of promise
expect(voidLink.textContent).toBe("void");
expect(voidLink.href.endsWith("#idl-void")).toBe(true);
expect(voidLink.href.endsWith("#idl-void")).toBe(false);

// unsigned long long argument
expect(unsignedLongLink.textContent).toBe("unsigned long long");
Expand Down

0 comments on commit c8d8be3

Please sign in to comment.