Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add deprecation message to w3c-common profile #3109

Merged
merged 2 commits into from
Sep 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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