Branchwell

Jobley / website · jobley.ai / test / curriculum.test.mjs

1import test from 'node:test';
2import assert from 'node:assert/strict';
3import { readFileSync } from 'node:fs';
4const read = path => readFileSync(new URL('../' + path, import.meta.url), 'utf8');
5const {careers, families} = JSON.parse(read('assets/career-directory.json'));
6function verify(path, exactTitle) {
7 const body = read(path.slice(1) + 'index.html');
8 assert.match(body, /<main id="main" class="shell role-guide">/, path);
9 assert.match(body, /<h1>[^<]+<\/h1>/, path);
10 if (exactTitle) assert.ok(body.includes('<h1>' + exactTitle + '</h1>'), path);
11 assert.match(body, /<p class="lead">[^<]{35,}<\/p>/, path);
12 assert.match(body, /<h2 id="training-heading">(?:Formal training|Scope) and next steps<\/h2>/, path);
13 const steps = body.match(/<ol class="curriculum-steps">(.*?)<\/ol>/s)?.[1];
14 assert.ok(steps, path);
15 assert.equal([...steps.matchAll(/<li><h3>[^<]+<\/h3><p>[^<]{10,}<\/p>/g)].length, 4, path);
16 assert.match(steps, /href="https:\/\//, path);
17 assert.match(body, /not a credential or a job offer/, path);
18 assert.match(body, /href="glimmer:\/\/community\/atom-[a-z0-9-]+"/, path);
19 assert.doesNotMatch(body, /<form|\/api\/candidates/, path);
20}
21
22test('all 848 career pages render four complete steps and training routes with no JS', () => {
23 assert.equal(careers.length, 848);
24 for (const [code] of careers) verify('/careers/' + code + '/');
25 for (const [code] of families) {
26 const family = read('careers/families/' + code + '/index.html');
27 const actual = [...family.matchAll(/href="\/careers\/(\d{2}-\d{4})\//g)].map(x => x[1]);
28 assert.deepEqual(actual, careers.map(([id]) => id).filter(id=>id.startsWith(code+'-')));
29 }
30 assert.match(read('careers/47-2111/index.html'), /learn-trade-electrical/);
31 assert.match(read('careers/47-2152/index.html'), /learn-trade-plumbing/);
32 assert.match(read('careers/49-9021/index.html'), /learn-trade-hvac/);
33 assert.match(read('careers/15-2051/index.html'), /weekly counts with missing values/);
34});
35test('all 216 curated roles plus 30 project support tracks have dedicated guides', () => {
36 const roster = read('volunteer/index.html');
37 const paths = new Set([...roster.matchAll(/href="(\/volunteer\/learn\/[a-z0-9-]+\/)"/g)].map(x=>x[1]));
38 assert.equal(paths.size, 246);
39 for (const path of paths) verify(path);
40});
41
42test('civilian energy requests and guides point to the same community and web fallback', () => {
43 const roster = read('volunteer/index.html');
44 const fallback = 'https://projectatom.ai/nuclear-disarmament#civilian-energy';
45 const deepLink = 'glimmer://community/atom-civilian-nuclear-energy';
46 const scope = roster.split('id="civilian-nuclear-energy"')[1].split('</section>')[0];
47 assert.ok(scope.includes(fallback));
48 assert.match(scope, /Public-source research and education only\./);
49 assert.equal(scope.split(deepLink).length - 1, 3);
50 const paths = new Set([...scope.matchAll(/href="(\/volunteer\/learn\/civilian-nuclear-[a-z-]+\/)"/g)].map(m => m[1]));
51 assert.equal(paths.size, 3);
52 for (const path of paths) {
53 const guide = read(path.slice(1) + 'index.html');
54 assert.ok(guide.includes(deepLink) && guide.includes(fallback), path);
55 assert.match(guide, /href="https:\/\/www\.(nrc|eia)\.gov\//, path);
56 }
57});
58
59test('solar roof role guides open the project community and provide a web fallback', () => {
60 const roster = read('volunteer/index.html');
61 const fallback = 'https://projectatom.ai/#solar-roof-tiles';
62 const deepLink = 'glimmer://community/atom-build-solar-roof-tiles';
63 const section = roster.split('id="solar-roof-tiles"')[1].split('</section>')[0];
64 assert.ok(section.includes(fallback));
65 assert.match(section, /one shared open tile design/);
66 assert.match(section, /independent local teams/);
67 assert.equal(section.split(deepLink).length - 1, 2);
68 for (const path of ['roofing-and-building-envelope-engineer', 'solar-pv-and-roof-integration-specialist']) {
69 const guide = read('volunteer/learn/' + path + '/index.html');
70 assert.ok(guide.includes(deepLink) && guide.includes(fallback), path);
71 assert.match(guide, /href="https:\/\/www\.energy\.gov\//);
72 }
73});
74
75test('every role, career and family has unique local lazy-loaded art', () => {
76 const unique = new Set();
77 const add = (path) => {
78 const svg = read(path.slice(1));
79 assert.match(svg, /<svg xmlns="http:\/\/www\.w3\.org\/2000\/svg" width="224" height="112" viewBox="0 0 224 112">/);
80 assert.doesNotMatch(svg, /<(script|image|foreignObject)\b|https:\/\//);
81 unique.add(svg);
82 };
83 const verify = (html, n, prefix) => {
84 const paths = [...html.matchAll(/<img class="role-art [^"]+" src="(\/assets\/role-art\/[a-z-]+\/[a-z0-9-]+\.svg)" width="224" height="112" alt="" loading="lazy" decoding="async">/g)]
85 .map(m => m[1]).filter(path => path.startsWith(prefix));
86 assert.equal(paths.length, n, prefix);
87 assert.equal(new Set(paths).size, n, prefix);
88 for (const path of paths) add(path);
89 };
90 const roster = read('volunteer/index.html');
91 verify(roster, 216, '/assets/role-art/volunteer/');
92 verify(read('careers/index.html'), 22, '/assets/role-art/family/');
93 for (const [code] of careers) {
94 const image = '/assets/role-art/career/' + code + '.svg';
95 add(image);
96 assert.ok(read('careers/' + code + '/index.html').includes(image), code);
97 assert.ok(read('careers/families/' + code.slice(0, 2) + '/index.html').includes(image), code);
98 }
99 for (const match of roster.matchAll(/href="(\/volunteer\/learn\/[a-z0-9-]+\/)"/g)) {
100 const page = read(match[1].slice(1) + 'index.html');
101 if (page.includes('/assets/role-art/support/')) verify(page, 1, '/assets/role-art/support/');
102 }
103 assert.equal(unique.size, 1116);
104});
105
106test('pet and distribution roles link to their exact Glimmer and web workstreams with local art', () => {
107 const listing = read('volunteer/index.html');
108 for (const [slug, project, fragment = project] of [
109 ['cat-tree-and-pet-furniture-designer', 'cat-tree'],
110 ['scratching-post-product-designer', 'scratching-post'],
111 ['leash-and-collar-hardware-sourcing-volunteer', 'dog-walking-gear'],
112 ['pet-friendly-textile-materials-developer', 'pet-friendly-fabrics'],
113 ['local-vehicle-distribution-and-service-planner', 'global-distribution', 'global-product-distribution'],
114 ['cross-border-freight-customs-and-sourcing-specialist', 'global-distribution', 'global-product-distribution'],
115 ['local-delivery-network-and-driver-operations-planner', 'global-distribution', 'global-product-distribution'],
116 ['shipping-platform-software-and-reliability-volunteer', 'global-distribution', 'global-product-distribution'],
117 ]) {
118 const card = listing.split('id="' + slug + '"')[1].split('</li>\n </ul>')[0].split('<li class="job"')[0];
119 const guide = read('volunteer/learn/' + slug + '/index.html');
120 for (const html of [card, guide]) {
121 assert.ok(html.includes('glimmer://community/atom-build-' + project), slug);
122 assert.ok(html.includes('https://projectatom.ai/open-designs#' + fragment), slug);
123 assert.ok(html.includes('/assets/role-art/volunteer/' + slug + '.svg'), slug);
124 }
125 }
126});
127
128test('the new civilian science roles have distinct Glimmer routes, four-step guides and original art', () => {
129 const listing = read('volunteer/index.html');
130 const illustrations = [];
131 for (const [group, slug, title, source, scope] of [
132 ['nanotechnology', 'nanotechnology-evidence-researcher', 'Nanotechnology evidence researcher',
133 'https://www.nano.gov/about-nanotechnology/', /No material fabrication, handling, product testing or field deployment/],
134 ['quantum-computing', 'quantum-computing-simulator-researcher', 'Quantum computing simulator researcher',
135 'https://quantum.cloud.ibm.com/learning/courses/basics-of-quantum-information/quantum-circuits/introduction', /No hardware access, cloud account, cryptographic attacks/],
136 ]) {
137 const deepLink = 'glimmer://community/atom-' + group;
138 const section = listing.split('id="' + group + '"')[1]?.split('</section>')[0];
139 assert.ok(section && section.includes('id="' + slug + '"'), slug);
140 assert.ok(section.includes(deepLink), slug);
141 assert.match(section, scope, slug);
142 const path = '/volunteer/learn/' + slug + '/';
143 verify(path, title);
144 const guide = read(path.slice(1) + 'index.html');
145 assert.ok(guide.includes(deepLink) && guide.includes(source) && guide.includes('/volunteer/#' + slug), slug);
146 assert.match(guide, scope, slug);
147 const art = '/assets/role-art/volunteer/' + slug + '.svg';
148 assert.ok(section.includes(art) && guide.includes(art), slug);
149 illustrations.push(read(art.slice(1)));
150 }
151 assert.notEqual(...illustrations);
152});
153
154test('vehicle autonomy role remains in Motors and has offline-only scope, safety evidence, original art and exact route', () => {
155 const listing = read('volunteer/index.html');
156 const section = listing.split('id="motors-robotics-and-space"')[1]?.split('</section>')[0];
157 const slug = 'vehicle-autonomy-safety-researcher';
158 const card = section.split('id="' + slug + '"')[1]?.split('<li class="job"')[0] ?? '';
159 const guideUrl = '/volunteer/learn/' + slug + '/';
160 const route = 'glimmer://community/atom-motors';
161 const art = '/assets/role-art/volunteer/' + slug + '.svg';
162 assert.equal(listing.split('id="motors-robotics-and-space"').length, 2);
163 for (const existingRoute of [route, 'glimmer://community/atom-robotics-space']) assert.ok(section.includes(existingRoute));
164 assert.ok(card.includes(route) && card.includes(guideUrl) && card.includes(art));
165 assert.match(card, /simulated camera, radar and distance-sensor data/);
166 verify(guideUrl, 'Vehicle autonomy safety researcher');
167 const guide = read(guideUrl.slice(1) + 'index.html');
168 assert.ok(guide.includes(route) && guide.includes(art) && guide.includes('/volunteer/#' + slug));
169 assert.match(guide, /No vehicle control, hardware modification, or road testing/);
170 assert.match(guide, /independent reviewer/);
171 assert.match(guide, /https:\/\/www\.nhtsa\.gov\/automated-vehicles-safety\/published-reports-and-documents/);
172});
173
174test('every EV engineering layer has a distinct role, guide, art and Motors destination', () => {
175 const listing = read('volunteer/index.html');
176 const section = listing.split('id="motors-robotics-and-space"')[1].split('</section>')[0];
177 for (const slug of [
178 'charging-infrastructure-volunteer', 'ev-technician-or-mechanic', 'vehicle-autonomy-safety-researcher',
179 'ev-battery-and-bms-researcher', 'ev-motor-and-power-electronics-researcher',
180 'vehicle-chassis-brakes-and-steering-researcher', 'vehicle-embedded-systems-and-networks-researcher',
181 'vehicle-sensors-and-calibration-researcher', 'vehicle-perception-and-sensor-fusion-researcher',
182 'vehicle-localization-and-mapping-researcher', 'vehicle-planning-and-control-researcher',
183 'vehicle-simulation-and-qa-researcher', 'vehicle-functional-safety-and-human-factors-researcher',
184 'ev-manufacturing-and-quality-researcher', 'vehicle-defensive-cybersecurity-researcher'
185 ]) {
186 const card = section.split('id="' + slug + '"')[1]?.split('<li class="job"')[0] ?? '';
187 const guideUrl = '/volunteer/learn/' + slug + '/';
188 const guide = read(guideUrl.slice(1) + 'index.html');
189 const route = 'glimmer://community/atom-motors';
190 const art = '/assets/role-art/volunteer/' + slug + '.svg';
191 assert.ok(card.includes(route) && card.includes(art), slug);
192 assert.ok(guide.includes(route) && guide.includes(art) && guide.includes('/volunteer/#' + slug), slug);
193 verify(guideUrl);
194 }
195});
196
197test('transport feasibility and home HVAC roles all have exact communities, desk-only scope and unique art', () => {
198 const listing = read('volunteer/index.html');
199 const reviewed = [
200 ['electric-semi-trucks', 'electric-semi-truck-route-and-charging-researcher', /No vehicle operation, energized charging equipment/],
201 ['electric-aircraft-propulsion', 'electric-aircraft-propulsion-feasibility-researcher', /No energized systems, propeller operation/],
202 ['home-hvac', 'home-hvac-load-and-duct-design-researcher', /No installation or commissioning of real equipment/],
203 ['home-hvac', 'home-heat-pump-performance-and-controls-researcher', /No installation or commissioning of real equipment/],
204 ['home-hvac', 'home-ventilation-and-indoor-air-quality-researcher', /No installation or commissioning of real equipment/],
205 ['home-hvac', 'home-hvac-installation-service-and-commissioning-researcher', /No installation or commissioning of real equipment/],
206 ];
207 for (const [group, slug, scope] of reviewed) {
208 assert.equal(listing.split('id="' + group + '"').length, 2, group);
209 const section = listing.split('id="' + group + '"')[1].split('</section>')[0];
210 const card = section.split('id="' + slug + '"')[1]?.split('<li class="job"')[0] ?? '';
211 const guideUrl = '/volunteer/learn/' + slug + '/';
212 const guide = read(guideUrl.slice(1) + 'index.html');
213 const route = 'glimmer://community/atom-' + group;
214 const art = '/assets/role-art/volunteer/' + slug + '.svg';
215 assert.ok(card.includes(route) && card.includes(art), slug);
216 assert.ok(guide.includes(route) && guide.includes(art) && guide.includes('/volunteer/#' + slug), slug);
217 assert.match(guide, scope, slug);
218 verify(guideUrl);
219 }
220});
221
222test('all eight integrated home roles have simulation-only starters, exact handoffs and distinct schematic art', () => {
223 const slugs = [
224 'home-architecture-and-maintainability-researcher',
225 'home-building-envelope-and-durability-researcher',
226 'home-renewable-energy-and-storage-integration-researcher',
227 'home-electronics-and-appliance-efficiency-researcher',
228 'home-water-and-plumbing-integration-researcher',
229 'home-shared-duct-coordination-and-commissioning-researcher',
230 'home-inclusive-design-and-accessibility-researcher',
231 'home-lifecycle-affordability-and-local-construction-researcher',
232 ];
233 const listing = read('volunteer/index.html');
234 assert.equal(listing.split('id="integrated-open-homes"').length, 2);
235 const section = listing.split('id="integrated-open-homes"')[1].split('</section>')[0];
236 for (const slug of slugs) {
237 assert.ok(section.includes('id="' + slug + '"'), slug);
238 const card = section.split('id="' + slug + '"')[1].split('<li class="job"')[0];
239 const guideUrl = '/volunteer/learn/' + slug + '/';
240 const guide = read(guideUrl.slice(1) + 'index.html');
241 const art = '/assets/role-art/volunteer/' + slug + '.svg';
242 for (const page of [card, guide]) {
243 assert.ok(page.includes('glimmer://community/atom-integrated-open-homes') && page.includes(art), slug);
244 }
245 assert.match(guide, /Do not build, install, energize or commission real systems/);
246 assert.ok(guide.includes('/volunteer/#' + slug), slug);
247 verify(guideUrl);
248 }
249});
250
251test('computing and connected appliance roles have exact Glimmer routes and simulation-only guides', () => {
252 const groups = {
253 'computing-hardware-design': [
254 'computer-system-architecture-and-interconnect-researcher',
255 'computer-mechanical-thermal-and-service-design-researcher',
256 'computer-hardware-validation-and-accessibility-researcher',
257 ],
258 'useful-connected-appliances': [
259 'automatic-cooker-usability-and-safety-researcher',
260 'repairable-refrigerator-monitoring-and-controls-researcher',
261 'appliance-offline-firmware-and-interoperability-researcher',
262 'appliance-electronics-and-resilience-researcher',
263 'appliance-mechanical-failure-and-commissioning-safety-researcher',
264 ],
265 };
266 const listing = read('volunteer/index.html');
267 for (const [group, slugs] of Object.entries(groups)) {
268 const section = listing.split('id="' + group + '"')[1]?.split('</section>')[0] ?? '';
269 for (const slug of slugs) {
270 const card = section.split('id="' + slug + '"')[1]?.split('<li class="job"')[0] ?? '';
271 const guideUrl = '/volunteer/learn/' + slug + '/';
272 const guide = read(guideUrl.slice(1) + 'index.html');
273 const art = '/assets/role-art/volunteer/' + slug + '.svg';
274 for (const page of [card, guide]) {
275 assert.ok(page.includes('glimmer://community/atom-' + group) && page.includes(art), slug);
276 }
277 assert.match(guide, /No live appliance operation, electrical modification/);
278 assert.ok(guide.includes('/volunteer/#' + slug), slug);
279 verify(guideUrl);
280 }
281 }
282 const existing = [
283 'processor-architecture-volunteer',
284 'memory-chip-design-volunteer',
285 'computer-board-design-volunteer',
286 'storage-systems-volunteer',
287 'firmware-and-drivers-volunteer',
288 ];
289 for (const slug of existing) assert.equal(listing.split('id="' + slug + '"').length, 2, slug);
290});
291
292test('open 3D printer and additive research have distinct illustrated roles and exact community links', () => {
293 const roster = read('volunteer/index.html');
294 const projects = [
295 ['open-source-multimaterial-printer', 'atom-open-3d-printer', 6, /unpowered fixture/],
296 ['additive-manufacturing-research', 'atom-additive-manufacturing', 2, /uncured resin/],
297 ];
298 for (const [anchor, category, count, scope] of projects) {
299 assert.ok(roster.includes('href="#' + anchor + '"'), anchor);
300 const section = roster.split('id="' + anchor + '"')[1].split('</section>')[0];
301 assert.match(section, scope, anchor);
302 const cards = [...section.matchAll(/<li class="job" id="([a-z0-9-]+)">(.*?)<\/li>(?=<li class="job"|<\/ul>)/gs)];
303 assert.equal(cards.length, count, anchor);
304 for (const [, slug, card] of cards) {
305 const path = '/volunteer/learn/' + slug + '/';
306 const image = '/assets/role-art/volunteer/' + slug + '.svg';
307 const deepLink = 'glimmer://community/' + category;
308 for (const value of [path, image, deepLink, 'Community work in Glimmer · Unpaid']) assert.ok(card.includes(value), slug + ': ' + value);
309 const guide = read(path.slice(1) + 'index.html');
310 for (const value of [deepLink, image, '/volunteer/#' + slug]) assert.ok(guide.includes(value), slug + ': ' + value);
311 assert.ok(read(image.slice(1)).includes('<svg'), image);
312 }
313 }
314});
315
316test('preventive care research has three illustrated, research-only guides opening the correct Glimmer community', () => {
317 const roster = read('volunteer/index.html');
318 assert.ok(roster.includes('href="#preventive-care-research"'));
319 const section = roster.split('id="preventive-care-research"')[1].split('</section>')[0];
320 assert.match(section, /alongside standard preventive services and indicated care/);
321 assert.match(section, /No patient or animal contact, diagnosis, treatment, or clinical advice/);
322 assert.match(section, /No drug development, promotion, sales, or distribution/);
323 const route = 'glimmer://community/atom-preventive-care-research';
324 const titles = [
325 'veterinarian-or-veterinary-scientist-for-preventive-health-research',
326 'preventive-medicine-clinician-or-public-health-scientist',
327 'dentist-dental-hygienist-or-oral-health-scientist',
328 ];
329 assert.equal(section.split(route).length - 1, titles.length);
330 for (const slug of titles) {
331 const guide = read('volunteer/learn/' + slug + '/index.html');
332 const art = '/assets/role-art/volunteer/' + slug + '.svg';
333 assert.ok(section.includes(art) && guide.includes(art));
334 assert.ok(guide.includes(route) && guide.includes('/volunteer/#' + slug));
335 assert.ok(read(art.slice(1)).includes('<svg'));
336 }
337});
338
339test('three app and platform roles complement existing phone and Linux research without duplicating their focus', () => {
340 const roster = read('volunteer/index.html');
341 const cards = [
342 ['dual-screen-foldable-phone', 'aosp-and-cuttlefish-platform-contributor', 'atom-build-flip-phone', /virtual device/, /not require a Google or Apple account/],
343 ['linux-desktop-computers', 'linux-app-porting-and-accessibility-contributor', 'atom-build-linux-desktop', /disposable Linux VM/, /existing Mac and iPhone clients intact/],
344 ['software-and-ai', 'glimmer-identity-and-cross-device-sync-contributor', 'atom-software', /first-party Glimmer sign-in/, /never real accounts or production records/],
345 ];
346 assert.match(roster, /id="linux-desktop-accessibility-and-qa"/);
347 assert.match(roster, /id="dual-screen-foldable-interaction-designer"/);
348 for (const [anchor, slug, category, first, second] of cards) {
349 const section = roster.split('id="' + anchor + '"')[1].split('</section>')[0];
350 assert.ok(section.includes('id="' + slug + '"'));
351 const guide = read('volunteer/learn/' + slug + '/index.html');
352 const art = '/assets/role-art/volunteer/' + slug + '.svg';
353 assert.ok(section.includes(art) && guide.includes(art));
354 assert.ok(guide.includes('glimmer://community/' + category));
355 assert.match(guide, first);
356 assert.match(guide, second);
357 assert.ok(read(art.slice(1)).includes('<svg'));
358 }
359});
360
361test('Lightwell has six experienced-contributor guides, original art, safe prototype boundaries and both project routes', () => {
362 const roster = read('volunteer/index.html');
363 const anchor = 'lightwell-open-lighting';
364 const route = 'glimmer://community/atom-lightwell-open-lighting';
365 const website = 'https://hellolightwell.com/';
366 assert.ok(roster.includes('href="#' + anchor + '"'));
367 const section = roster.split('id="' + anchor + '"')[1].split('</section>')[0];
368 assert.ok(section.includes(website));
369 assert.match(section, /No product, sales, installation, or certification/);
370 assert.match(section, /No mains wiring/);
371 assert.match(section, /share a public work sample/);
372 const titles = [
373 ['lightwell-mechanical-and-repairability-designer', /experience designing or building at least one lighting fixture/],
374 ['lightwell-low-voltage-and-electrical-safety-contributor', /experience designing and testing at least one LED driver/],
375 ['lightwell-matter-firmware-contributor', /experience commissioning and controlling at least one actual Matter device/],
376 ['lightwell-local-controller-and-automation-designer', /experience implementing or integrating a local smart-home controller/],
377 ['lightwell-validation-and-certification-planner', /electrical-product validation, lab testing or compliance experience/],
378 ['lightwell-production-parts-and-documentation-contributor', /experience creating a manufacturing package/],
379 ];
380 assert.equal(section.split(route).length - 1, titles.length);
381 for (const [slug, experience] of titles) {
382 const guide = read('volunteer/learn/' + slug + '/index.html');
383 const art = '/assets/role-art/volunteer/' + slug + '.svg';
384 assert.ok(section.includes(art) && guide.includes(art));
385 for (const value of [route, website, '/volunteer/#' + slug]) assert.ok(guide.includes(value), slug + ': ' + value);
386 assert.match(guide, experience);
387 assert.ok(read(art.slice(1)).includes('<svg'));
388 }
389});
390
391test('Open Garden Design publishes five illustrated native Mac contributor paths', () => {
392 const roster = read('volunteer/index.html');
393 const anchor = 'open-garden-design';
394 const route = 'glimmer://community/atom-open-garden-design';
395 assert.ok(roster.includes('href="#' + anchor + '"'));
396 const section = roster.split('id="' + anchor + '"')[1].split('</section>')[0];
397 assert.match(section, /native Mac app for garden and interior design/);
398 assert.match(section, /replaceable furniture/);
399 assert.match(section, /interior scenes from multiple photos/);
400 assert.ok(section.includes('/assets/open-garden-design.svg'));
401 assert.match(read('assets/open-garden-design.svg'), /width="1200" height="630"/);
402 assert.match(section, /Unpaid, optional community work/);
403 assert.doesNotMatch(section, /Gemini|Google|Plasticity|volunteer with us/i);
404 const roles = [
405 ['garden-house-modeling-and-mac-3d-engineer', /STL as optional exchange/],
406 ['garden-plant-catalog-and-horticulture-researcher', /check taxonomy and distribution/],
407 ['garden-3d-plant-artist-and-asset-librarian', /redistribution and attribution record/],
408 ['garden-layout-and-mac-accessibility-designer', /with a keyboard and with VoiceOver|with only a keyboard and with VoiceOver/],
409 ['garden-atom-design-assistance-and-qa-contributor', /dismissing a suggestion leaves the plan unchanged/],
410 ];
411 assert.equal(section.split(route).length - 1, roles.length);
412 const illustrations = new Set();
413 for (const [slug, evidence] of roles) {
414 const guide = read('volunteer/learn/' + slug + '/index.html');
415 const art = '/assets/role-art/volunteer/' + slug + '.svg';
416 assert.ok(section.includes(art) && guide.includes(art), slug);
417 assert.ok(guide.includes(route), slug);
418 assert.ok(guide.includes('/volunteer/#' + slug), slug);
419 assert.match(guide, evidence, slug);
420 const image = read(art.slice(1));
421 assert.match(image, /<svg/);
422 illustrations.add(image);
423 }
424 assert.equal(illustrations.size, roles.length);
425});
426
427test('hosting research roles extend the existing data center section with illustrated learning paths', () => {
428 const roster=read('volunteer/index.html');
429 const section=roster.split('id="data-centers-power-and-manufacturing"')[1].split('</section>')[0];
430 const work=[
431 ['first-party-hosting-platform-and-reliability-researcher', /target availability, recovery and data-loss/],
432 ['hosting-transit-dns-and-tls-researcher', /two fictional carrier paths/],
433 ['data-center-acquisition-diligence-researcher', /utility capacity and lead time/],
434 ['hosting-cost-and-capacity-analyst', /low, expected and high utilization/],
435 ['hosting-operations-and-security-planning-researcher', /tabletop outage discussion/],
436 ];
437 assert.match(section, /No facility or hosting service is open. These roles are unpaid research only/);
438 assert.ok(section.includes('/assets/first-party-hosting-concept.png'));
439 assert.ok(section.includes('id="data-center-network-engineer"'));
440 assert.ok(section.includes('id="worldwide-data-center-site-planner"'));
441 for (const [slug, marker] of work) {
442 const guide=read('volunteer/learn/'+slug+'/index.html');
443 const art='/assets/role-art/volunteer/'+slug+'.svg';
444 assert.ok(section.includes(art) && guide.includes(art), slug);
445 assert.ok(guide.includes('glimmer://community/atom-data-centers-trades'), slug);
446 assert.match(guide, marker, slug);
447 assert.match(guide, /Use public references, fictional sites and synthetic workloads/);
448 assert.ok(read(art.slice(1)).includes('<svg'));
449 }
450});
451
452test('electric boats and dockside charging have six illustrated guides and a desk-only cruise scope', () => {
453 const roster = read('volunteer/index.html');
454 const group = 'electric-boats-and-dockside-charging';
455 const route = 'glimmer://community/atom-electric-boats';
456 assert.ok(roster.includes('href="#' + group + '"'));
457 const section = roster.split('id="' + group + '"')[1].split('</section>')[0];
458 assert.match(section, /small non-passenger battery-electric boats/);
459 assert.match(section, /separate desk-only feasibility study/);
460 const slugs = [
461 'electric-boat-hull-and-route-modeling-contributor',
462 'electric-marine-propulsion-and-controls-contributor',
463 'marine-battery-safety-contributor',
464 'dockside-charging-and-marina-planning-contributor',
465 'electric-boat-testing-and-lifecycle-research-contributor',
466 'civilian-nuclear-electric-cruise-feasibility-researcher',
467 ];
468 assert.equal(section.split(route).length - 1, slugs.length);
469 for (const slug of slugs) {
470 const art = '/assets/role-art/volunteer/' + slug + '.svg';
471 assert.ok(section.includes('id="' + slug + '"'));
472 assert.ok(section.includes(art));
473 assert.match(read(art.slice(1)), /<svg/);
474 const guide = read('volunteer/learn/' + slug + '/index.html');
475 assert.ok(guide.includes(route));
476 assert.ok(guide.includes(art));
477 assert.ok(guide.includes('/volunteer/#' + slug));
478 }
479 const cruise = read('volunteer/learn/' + slugs.at(-1) + '/index.html');
480 assert.match(cruise, /port-entry eligibility and passenger emergency planning/);
481 assert.match(cruise, /no reactor design, fuel work, or operating procedures/);
482});