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
13 changes: 11 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
"containerEnv": {
"WORKSHOP_ROLE": "attendee"
},
"forwardPorts": [3000],
"forwardPorts": [
3000
],
"portsAttributes": {
"3000": {
"label": "Workshop planner (development environment in Codespaces)",
Expand All @@ -18,5 +20,12 @@
},
"onCreateCommand": "npm ci --ignore-scripts --no-audit --no-fund",
"postCreateCommand": "npm run setup",
"postStartCommand": "npm run workspace:start"
"postStartCommand": "npm run workspace:start",
"customizations": {
"vscode": {
"extensions": [
"ms-azuretools.vscode-documentdb"
]
}
}
}
13 changes: 11 additions & 2 deletions .devcontainer/organizer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
"containerEnv": {
"WORKSHOP_ROLE": "organizer"
},
"forwardPorts": [3000],
"forwardPorts": [
3000
],
"portsAttributes": {
"3000": {
"label": "Organizer development planner",
Expand All @@ -22,5 +24,12 @@
},
"onCreateCommand": "npm ci --ignore-scripts --no-audit --no-fund",
"postCreateCommand": "npm run setup && npm run organizer:check",
"postStartCommand": "npm run workspace:start"
"postStartCommand": "npm run workspace:start",
"customizations": {
"vscode": {
"extensions": [
"ms-azuretools.vscode-documentdb"
]
}
}
}
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ cross-listings, unresolved disagreements, and the excluded invalid break time.
**Ctrl/Cmd+P**, then type `exercises/starter/repository.js`. A GitHub file link
is a read-only source view, not the editable file in your running Codespace.

Both Codespaces profiles include the official
[DocumentDB for VS Code extension](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-documentdb)
(`ms-azuretools.vscode-documentdb`). It does not connect to or provision a database
automatically; the workshop's Compose setup still owns Site A and Site B.

Every workshop terminal command runs **inside Codespaces**, unless explicitly
following the optional [laptop-local appendix](docs/local.md).

Expand Down
5 changes: 1 addition & 4 deletions src/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ <h2 id="target-name">Connecting...</h2>
</div>
</section>

<div class="notice" id="location-notice" hidden></div>
<div class="notice" id="catalog-notice" hidden></div>
<section class="notice info stack" id="exercise" role="status" aria-labelledby="exercise-title" hidden>
<h2 id="exercise-title"></h2>
Expand Down Expand Up @@ -364,9 +363,7 @@ <h2 id="copy-title">Confirm selected favorites</h2>
$("copy-help").textContent = config.targets.some((target) => target.id === destination())
? `Destination: ${label(destination())}. Select up to 100 favorites.`
: "The presenter cloud target is not configured. Local planning and calendar export still work.";
notice("location-notice", config.scenario === "attendee"
? `Two independent self-hosted databases ${config.location === "codespaces" ? "inside this Codespace, not on your laptop" : "on this laptop"}. Site A / Site B simulate two sites; this is not live hybrid cloud, replication or automatic failover. No Azure account is needed.`
: `Presenter demonstration: ${config.location === "codespaces" ? "the development database is in Codespaces, not on-premises" : "the development database is on this laptop"}. Azure is a separate managed database; copying favorites is an explicit application operation, not replication.`);

}

function render() {
Expand Down
18 changes: 18 additions & 0 deletions test/experience.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,21 @@ test("optional reference counts match the real fixed snapshot, not attendees or
assert.throws(() => validatePipeline([{ [stage]: "forbidden" }]), { code: "READ_ONLY_PIPELINE" });
}
});


test("the removed location banner is absent without breaking configuration rendering", async () => {
const html = await readFile(new URL("../src/public/index.html", import.meta.url), "utf8");
assert.doesNotMatch(html, /location-notice|Two independent self-hosted databases/);
const { elements, run } = await browser();
run("renderConfiguration()");
assert.equal(elements.get("target-name").textContent, "Site A");
assert.equal(elements.has("location-notice"), false);
assert.match(html, /id="catalog-notice"/);
});

test("both Codespace profiles install the official DocumentDB extension", async () => {
for (const path of ["../.devcontainer/devcontainer.json", "../.devcontainer/organizer/devcontainer.json"]) {
const config = JSON.parse(await readFile(new URL(path, import.meta.url), "utf8"));
assert.ok(config.customizations.vscode.extensions.includes("ms-azuretools.vscode-documentdb"));
}
});
Loading