Skip to content
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
10 changes: 6 additions & 4 deletions src/w3c/templates/sotd.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,16 +213,18 @@ function renderNotRec(conf) {
break;
case "CRD":
statusExplanation = html`A Candidate Recommendation Draft integrates
changes from the previous Candidate Recommendation that the Working Group
intends to include in a subsequent Candidate Recommendation Snapshot.`;
changes from the previous Candidate Recommendation that the Working
Group${conf.multipleWGs ? "s intend" : " intends"} to include in a
subsequent Candidate Recommendation Snapshot.`;
if (conf.pubMode === "LS") {
updatePolicy = lsUpdatePolicy;
}
break;
case "CRYD":
statusExplanation = html`A Candidate Registry Draft integrates changes
from the previous Candidate Registry Snapshot that the Working Group
intends to include in a subsequent Candidate Registry Snapshot.`;
from the previous Candidate Registry Snapshot that the Working
Group${conf.multipleWGs ? "s intend" : " intends"} to include in a
subsequent Candidate Registry Snapshot.`;
if (conf.pubMode === "LS") {
updatePolicy = lsUpdatePolicy;
}
Expand Down
40 changes: 39 additions & 1 deletion tests/spec/w3c/group-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe("W3C — Group", () => {
]);
});

it("when a multiple groups are specified, it pluralizes the groups", async () => {
it("when multiple groups are specified, it pluralizes the groups", async () => {
const ops = makeStandardOps({
group: ["payments", "webapps"],
specStatus: "NOTE",
Expand All @@ -49,6 +49,44 @@ describe("W3C — Group", () => {
);
});

for (const specStatus of ["CRD", "CRYD"]) {
it(`${specStatus}: writes "Working Group intends" for a single group`, async () => {
const ops = makeStandardOps({
group: "payments",
specStatus,
});
const doc = await makeRSDoc(ops);
const sotd = doc.getElementById("sotd").textContent.replace(/\s+/g, " ");
expect(sotd)
.withContext(specStatus)
.toContain("that the Working Group intends to include in");
});

it(`${specStatus}: writes "Working Group intends" for a single group in an array`, async () => {
const ops = makeStandardOps({
group: ["payments"],
specStatus,
});
const doc = await makeRSDoc(ops);
const sotd = doc.getElementById("sotd").textContent.replace(/\s+/g, " ");
expect(sotd)
.withContext(specStatus)
.toContain("that the Working Group intends to include in");
});

it(`${specStatus}: writes "Working Groups intend" for multiple groups`, async () => {
const ops = makeStandardOps({
group: ["payments", "webapps"],
specStatus,
});
const doc = await makeRSDoc(ops);
const sotd = doc.getElementById("sotd").textContent.replace(/\s+/g, " ");
expect(sotd)
.withContext(specStatus)
.toContain("that the Working Groups intend to include in");
});
}

it("overrides superseded options", async () => {
const inputConf = { group: "payments", wg: "foo", wgId: "1234" };
const conf = await getGroupConf(inputConf);
Expand Down
Loading