Skip to content

Commit

Permalink
Streamline code, add ref test, update other ref tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tidoust committed May 28, 2024
1 parent d0a17a5 commit 06ca063
Show file tree
Hide file tree
Showing 8 changed files with 759 additions and 357 deletions.
11 changes: 11 additions & 0 deletions test/check-project-tohtml.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,15 @@ describe('The module that converts a project to HTML', function () {
const html = await convertProjectToHTML(project);
await assertSameAsRef(html);
});

it('creates the expected page when the reduce option is set', async function () {
setEnvKey('ISSUE_TEMPLATE', 'test/data/template-breakout.yml');
setEnvKey('PROJECT_NUMBER', 'breakouts-day-2024-reduce');
const project = await fetchTestProject();
const html = await convertProjectToHTML(project, {
seed: 'hophophop',
reduce: true
});
await assertSameAsRef(html);
});
});
207 changes: 207 additions & 0 deletions test/data/breakouts-day-2024-reduce.mjs

Large diffs are not rendered by default.

213 changes: 213 additions & 0 deletions test/data/ref-breakouts-day-2024-reduce.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,213 @@
<html>
<head>
<meta charset="utf-8">
<meta name="seed" content="hophophop">
<title>W3C Breakouts Day 2024 - Event schedule</title>
<style>
/* Table styles and colors adapted from Pure CSS:
* https://github.com/pure-css/pure
* ... under a BSD License:
* https://github.com/pure-css/pure/blob/master/LICENSE
*/
table {
border-collapse: collapse;
border-spacing: 0;
empty-cells: show;
border: 1px solid #cbcbcb;
}
table caption {
color: #000;
font: italic 85%/1 arial, sans-serif;
padding: 1em 0;
text-align: center;
}
table td,
table th {
border-left: 1px solid #cbcbcb;
border-bottom: 1px solid #cbcbcb;
border-width: 0 0 1px 1px;
font-size: inherit;
margin: 0;
overflow: visible;
padding: 0.5em 1em;
}
table thead {
background-color: #e0e0e0;
color: #000;
text-align: left;
vertical-align: bottom;
}
.conflict-error { background-color: #ddaeff; color: #8156a7; }
.capacity-error { background-color: #fcebbd; color: #af9540; }
.track-error { background-color: #e1f2fa; color: #5992aa; }
.scheduling-error { background-color: #f5ab9e; color: #8c3a2b; }
.scheduling-warning { background-color: #fcebbd; color: #8c3a2b; }
.track {
display: inline-block;
background-color: #0E8A16;
color: white;
border: 1px transparent;
border-radius: 1em;
margin-top: 0.2em;
margin-bottom: 0.2em;
padding: 3px 10px;
font-size: smaller;
white-space: nowrap;
}
</style>
<link rel="stylesheet" href="https://www.w3.org/StyleSheets/TR/base.css" type="text/css"/>
</head>
<body>
<h1>W3C Breakouts Day 2024</h1>
<section id="schedule">
<h2>Schedule</h2>
<section id="d2024-03-12">
<h3>2024-03-12</h3>
<table>
<thead>
<tr>
<th></th>
<th>Room 1</th>
<th>Room 2</th>
<th>Room 3</th>
<th>Room 4</th>
<th>Room 5</th>
<th>Room 6</th>
<th>Room 7</th>
</tr>
</thead>
<tbody>
<tr>
<th>
13:00-14:00
</th>
<td></td>
<td class="">
<p><b>#12</b>: Building Consensus on the Role of Real World Identities on the Web
<br/><i>Chair(s): martinthomson, marcoscaceres</i>
<br/><span class="track">track: identity</span>
</p>
</td>
<td class="">
<p><b>#21</b>: RDF-Star and RDF 1.2
<br/><i>Chair(s): rdfguy, ktk</i>
</p>
</td>
<td></td>
<td class="">
<p><b>#13</b>: Running Better Meetings - How to Facilitate at W3C
<br/><i>Chair(s): wareid</i>
</p>
</td>
<td class="">
<p><b>#18</b>: Registries for W3C Specifications
<br/><i>Chair(s): egekorkan, jkRhb</i>
</p>
</td>
<td class="">
<p><b>#11</b>: Nu Tracker: Helping you manage actions and horizontal review tasks from the command line
<br/><i>Chair(s): matatk</i>
</p>
</td>
</tr>
<tr>
<th>
14:00-15:00
</th>
<td></td>
<td class="">
<p><b>#7</b>: FedCM request settings & CORS
<br/><i>Chair(s): domfarolino</i>
<br/><span class="track">track: identity</span>
</p>
</td>
<td></td>
<td class="">
<p><b>#22</b>: Web features, Baseline status, and standardization signals
<br/><i>Chair(s): tidoust, captainbrosset, atopal</i>
</p>
</td>
<td class="">
<p><b>#16</b>: Privacy Principles for the Web
<br/><i>Chair(s): torgo, darobin, jyasskin</i>
</p>
</td>
<td class="">
<p><b>#15</b>: Schemata Discussion - Follow up from TPAC23
<br/><i>Chair(s): egekorkan</i>
</p>
</td>
<td class="">
<p><b>#10</b>: Exploring making site navigation more accessible, with "well-known destinations"
<br/><i>Chair(s): matatk</i>
</p>
</td>
</tr>
<tr>
<th>
21:00-22:00
</th>
<td></td>
<td class="">
<p><b>#9</b>: FedCM multiple IDP support
<br/><i>Chair(s): npm1</i>
<br/><span class="track">track: identity</span>
</p>
</td>
<td class="">
<p><b>#6</b>: Real Estate Community Group and the Web
<br/><i>Chair(s): JAlanBird-DO</i>
</p>
</td>
<td class="">
<p><b>#20</b>: How We Fund the Web Ecosystem
<br/><i>Chair(s): bkardell, darobin, meyerweb</i>
</p>
</td>
<td class="">
<p><b>#2</b>: Low-latency input events in workers
<br/><i>Chair(s): marcoscaceres, reillyeon, nondebug, 7ombie</i>
</p>
</td>
<td></td>
<td class="">
<p><b>#19</b>: Ethical Implications of Generative AI
<br/><i>Chair(s): rupakc, humeranoor</i>
</p>
</td>
</tr>
<tr>
<th>
22:00-23:00
</th>
<td></td>
<td class="">
<p><b>#3</b>: Promote the PROPOSED Federated Identity Working Group
<br/><i>Chair(s): hlflanagan</i>
<br/><span class="track">track: identity</span>
</p>
</td>
<td></td>
<td class="">
<p><b>#14</b>: Web security docs for MDN
<br/><i>Chair(s): wbamberg</i>
</p>
</td>
<td class="">
<p><b>#17</b>: Installing web apps as a new platform feature
<br/><i>Chair(s): diekus, amandabaker</i>
</p>
</td>
<td class="">
<p><b>#24</b>: Incubation: the on ramp to new work
<br/><i>Chair(s): cwilso</i>
</p>
</td>
<td></td>
</tr>
</tbody>
</table>
</section>
</section>
</body>
</html>
41 changes: 21 additions & 20 deletions test/data/ref-breakouts-day-2024.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<html>
<head>
<meta charset="utf-8">

<title>W3C Breakouts Day 2024 - Event schedule</title>
<style>
/* Table styles and colors adapted from Pure CSS:
Expand Down Expand Up @@ -54,6 +55,7 @@
white-space: nowrap;
}
</style>
<link rel="stylesheet" href="https://www.w3.org/StyleSheets/TR/base.css" type="text/css"/>
</head>
<body>
<h1>W3C Breakouts Day 2024</h1>
Expand Down Expand Up @@ -128,29 +130,29 @@ <h3>2024-03-12</h3>
</th>
<td></td>
<td class="">
<p><a href="https://github.com/w3c/tpac-breakouts/issues/12">#12</a>: Building Consensus on the Role of Real World Identities on the Web
<p><b><a href="https://github.com/w3c/tpac-breakouts/issues/12">#12</a></b>: Building Consensus on the Role of Real World Identities on the Web
<br/><i>Chair(s): martinthomson, marcoscaceres</i>
<br/><span class="track">track: identity</span>
</p>
</td>
<td class="">
<p><a href="https://github.com/w3c/tpac-breakouts/issues/21">#21</a>: RDF-Star and RDF 1.2
<p><b><a href="https://github.com/w3c/tpac-breakouts/issues/21">#21</a></b>: RDF-Star and RDF 1.2
<br/><i>Chair(s): rdfguy, ktk</i>
</p>
</td>
<td></td>
<td class="">
<p><a href="https://github.com/w3c/tpac-breakouts/issues/13">#13</a>: Running Better Meetings - How to Facilitate at W3C
<p><b><a href="https://github.com/w3c/tpac-breakouts/issues/13">#13</a></b>: Running Better Meetings - How to Facilitate at W3C
<br/><i>Chair(s): wareid</i>
</p>
</td>
<td class="">
<p><a href="https://github.com/w3c/tpac-breakouts/issues/18">#18</a>: Registries for W3C Specifications
<p><b><a href="https://github.com/w3c/tpac-breakouts/issues/18">#18</a></b>: Registries for W3C Specifications
<br/><i>Chair(s): egekorkan, jkRhb</i>
</p>
</td>
<td class="">
<p><a href="https://github.com/w3c/tpac-breakouts/issues/11">#11</a>: Nu Tracker: Helping you manage actions and horizontal review tasks from the command line
<p><b><a href="https://github.com/w3c/tpac-breakouts/issues/11">#11</a></b>: Nu Tracker: Helping you manage actions and horizontal review tasks from the command line
<br/><i>Chair(s): matatk</i>
</p>
</td>
Expand All @@ -161,29 +163,29 @@ <h3>2024-03-12</h3>
</th>
<td></td>
<td class="">
<p><a href="https://github.com/w3c/tpac-breakouts/issues/7">#7</a>: FedCM request settings & CORS
<p><b><a href="https://github.com/w3c/tpac-breakouts/issues/7">#7</a></b>: FedCM request settings & CORS
<br/><i>Chair(s): domfarolino</i>
<br/><span class="track">track: identity</span>
</p>
</td>
<td></td>
<td class="">
<p><a href="https://github.com/w3c/tpac-breakouts/issues/22">#22</a>: Web features, Baseline status, and standardization signals
<p><b><a href="https://github.com/w3c/tpac-breakouts/issues/22">#22</a></b>: Web features, Baseline status, and standardization signals
<br/><i>Chair(s): tidoust, captainbrosset, atopal</i>
</p>
</td>
<td class="">
<p><a href="https://github.com/w3c/tpac-breakouts/issues/16">#16</a>: Privacy Principles for the Web
<p><b><a href="https://github.com/w3c/tpac-breakouts/issues/16">#16</a></b>: Privacy Principles for the Web
<br/><i>Chair(s): torgo, darobin, jyasskin</i>
</p>
</td>
<td class="">
<p><a href="https://github.com/w3c/tpac-breakouts/issues/15">#15</a>: Schemata Discussion - Follow up from TPAC23
<p><b><a href="https://github.com/w3c/tpac-breakouts/issues/15">#15</a></b>: Schemata Discussion - Follow up from TPAC23
<br/><i>Chair(s): egekorkan</i>
</p>
</td>
<td class="">
<p><a href="https://github.com/w3c/tpac-breakouts/issues/10">#10</a>: Exploring making site navigation more accessible, with "well-known destinations"
<p><b><a href="https://github.com/w3c/tpac-breakouts/issues/10">#10</a></b>: Exploring making site navigation more accessible, with "well-known destinations"
<br/><i>Chair(s): matatk</i>
</p>
</td>
Expand All @@ -194,29 +196,29 @@ <h3>2024-03-12</h3>
</th>
<td></td>
<td class="">
<p><a href="https://github.com/w3c/tpac-breakouts/issues/9">#9</a>: FedCM multiple IDP support
<p><b><a href="https://github.com/w3c/tpac-breakouts/issues/9">#9</a></b>: FedCM multiple IDP support
<br/><i>Chair(s): npm1</i>
<br/><span class="track">track: identity</span>
</p>
</td>
<td class="">
<p><a href="https://github.com/w3c/tpac-breakouts/issues/6">#6</a>: Real Estate Community Group and the Web
<p><b><a href="https://github.com/w3c/tpac-breakouts/issues/6">#6</a></b>: Real Estate Community Group and the Web
<br/><i>Chair(s): JAlanBird-DO</i>
</p>
</td>
<td class="">
<p><a href="https://github.com/w3c/tpac-breakouts/issues/20">#20</a>: How We Fund the Web Ecosystem
<p><b><a href="https://github.com/w3c/tpac-breakouts/issues/20">#20</a></b>: How We Fund the Web Ecosystem
<br/><i>Chair(s): bkardell, darobin, meyerweb</i>
</p>
</td>
<td class="">
<p><a href="https://github.com/w3c/tpac-breakouts/issues/2">#2</a>: Low-latency input events in workers
<p><b><a href="https://github.com/w3c/tpac-breakouts/issues/2">#2</a></b>: Low-latency input events in workers
<br/><i>Chair(s): marcoscaceres, reillyeon, nondebug, 7ombie</i>
</p>
</td>
<td></td>
<td class="">
<p><a href="https://github.com/w3c/tpac-breakouts/issues/19">#19</a>: Ethical Implications of Generative AI
<p><b><a href="https://github.com/w3c/tpac-breakouts/issues/19">#19</a></b>: Ethical Implications of Generative AI
<br/><i>Chair(s): rupakc, humeranoor</i>
</p>
</td>
Expand All @@ -227,24 +229,24 @@ <h3>2024-03-12</h3>
</th>
<td></td>
<td class="">
<p><a href="https://github.com/w3c/tpac-breakouts/issues/3">#3</a>: Promote the PROPOSED Federated Identity Working Group
<p><b><a href="https://github.com/w3c/tpac-breakouts/issues/3">#3</a></b>: Promote the PROPOSED Federated Identity Working Group
<br/><i>Chair(s): hlflanagan</i>
<br/><span class="track">track: identity</span>
</p>
</td>
<td></td>
<td class="">
<p><a href="https://github.com/w3c/tpac-breakouts/issues/14">#14</a>: Web security docs for MDN
<p><b><a href="https://github.com/w3c/tpac-breakouts/issues/14">#14</a></b>: Web security docs for MDN
<br/><i>Chair(s): wbamberg</i>
</p>
</td>
<td class="">
<p><a href="https://github.com/w3c/tpac-breakouts/issues/17">#17</a>: Installing web apps as a new platform feature
<p><b><a href="https://github.com/w3c/tpac-breakouts/issues/17">#17</a></b>: Installing web apps as a new platform feature
<br/><i>Chair(s): diekus, amandabaker</i>
</p>
</td>
<td class="">
<p><a href="https://github.com/w3c/tpac-breakouts/issues/24">#24</a>: Incubation: the on ramp to new work
<p><b><a href="https://github.com/w3c/tpac-breakouts/issues/24">#24</a></b>: Incubation: the on ramp to new work
<br/><i>Chair(s): cwilso</i>
</p>
</td>
Expand All @@ -254,7 +256,6 @@ <h3>2024-03-12</h3>
</table>
</section>
</section>

<section id="yaml">
<h2>Data for Saving/Restoring Schedule</h2>
<pre id="data">
Expand Down
Loading

0 comments on commit 06ca063

Please sign in to comment.