Skip to content

Commit fd16c3a

Browse files
authored
Merge pull request #163 from DenisValeev/copilot/add-apps-to-global-index
Add Cloth Lab and Enchanted Forest Bunny to the toolbox index
2 parents 4291b8b + ca07677 commit fd16c3a

3 files changed

Lines changed: 39 additions & 15 deletions

File tree

index.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,18 @@ <h2 id="tools-section" class="section-title">Labs &amp; tools</h2>
502502
<span>Value Formatter</span>
503503
</a>
504504
</li>
505+
<li>
506+
<a class="app-button app-button--secondary app-button--wide" href="apps/cloth/">
507+
<span aria-hidden="true">🧵</span>
508+
<span>Cloth Lab</span>
509+
</a>
510+
</li>
511+
<li>
512+
<a class="app-button app-button--secondary app-button--wide" href="apps/enchanted-bunny/">
513+
<span aria-hidden="true">🐇</span>
514+
<span>Enchanted Forest Bunny</span>
515+
</a>
516+
</li>
505517
<li>
506518
<a class="docs-button app-button--secondary app-button--wide" href="docs/">
507519
<span aria-hidden="true">📖</span>

tests/home.spec.js

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ test.describe('Landing page', () => {
88
await expect(header.locator('h1')).toHaveText('Toolbox');
99

1010
const deckRows = page.locator('.app-row');
11-
await expect(deckRows).toHaveCount(4);
11+
await expect(deckRows).toHaveCount(3);
1212
await expect(deckRows.first()).toHaveAttribute('role', 'group');
1313

1414
const groupLabels = await deckRows.evaluateAll((nodes) =>
1515
nodes.map((node) => node.getAttribute('aria-label')),
1616
);
17-
expect(groupLabels).toEqual(['Jokes', 'Quotes', 'Total Recall', 'Slang']);
17+
expect(groupLabels).toEqual(['Jokes', 'Quotes', 'Slang']);
1818

1919
const deckLinkSets = await deckRows.evaluateAll((nodes) =>
2020
nodes.map((node) =>
@@ -34,15 +34,30 @@ test.describe('Landing page', () => {
3434
{ href: 'apps/quotes/', text: '💬 Quotes' },
3535
{ href: 'apps/quotes/all-quotes.html', text: 'All Quotes' },
3636
],
37-
[
38-
{ href: 'apps/total-recall/', text: '🧠 Total Recall' },
39-
],
4037
[
4138
{ href: 'apps/slang/', text: '🗣️ Slang' },
4239
{ href: 'apps/slang/all-slang.html', text: 'All Slang' },
4340
],
4441
]);
4542

43+
const toolLinks = page.locator('.tool-list a.app-button, .tool-list a.docs-button');
44+
await expect(toolLinks).toHaveCount(9);
45+
46+
const toolLinkHrefs = await toolLinks.evaluateAll((nodes) =>
47+
nodes.map((node) => node.getAttribute('href')),
48+
);
49+
expect(toolLinkHrefs).toEqual([
50+
'apps/total-recall/',
51+
'apps/similarity-report/',
52+
'apps/embedding-explorer/',
53+
'apps/asset-observatory/',
54+
'apps/value-formatter/',
55+
'apps/cloth/',
56+
'apps/enchanted-bunny/',
57+
'docs/',
58+
'apps/wiki/',
59+
]);
60+
4661
await expect(page.locator('a.app-button--primary')).toHaveCount(0);
4762
await expect(page.locator('a.app-card')).toHaveCount(0);
4863
await expect(page.locator('.dev-tools')).toHaveCount(0);

tests/index.spec.js

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ test.describe('Landing page', () => {
55
await page.goto('/');
66

77
const groupedRows = page.locator('.app-row[data-group]');
8-
await expect(groupedRows).toHaveCount(4);
8+
await expect(groupedRows).toHaveCount(3);
99

1010
const expectedRows = [
1111
{
@@ -20,12 +20,6 @@ test.describe('Landing page', () => {
2020
texts: ['💬 Quotes', 'All Quotes'],
2121
hrefs: ['apps/quotes/', 'apps/quotes/all-quotes.html'],
2222
},
23-
{
24-
group: 'total-recall',
25-
label: 'Total Recall',
26-
texts: ['🧠 Total Recall'],
27-
hrefs: ['apps/total-recall/'],
28-
},
2923
{
3024
group: 'slang',
3125
label: 'Slang',
@@ -62,7 +56,7 @@ test.describe('Landing page', () => {
6256

6357
const toolSection = page.locator('section.app-groups').nth(1);
6458
const toolButtons = toolSection.locator('a.app-button, a.docs-button');
65-
await expect(toolButtons).toHaveCount(6);
59+
await expect(toolButtons).toHaveCount(9);
6660

6761
const toolInfo = await toolButtons.evaluateAll((nodes) =>
6862
nodes.map((node) => ({
@@ -72,11 +66,14 @@ test.describe('Landing page', () => {
7266
);
7367

7468
expect(toolInfo).toEqual([
69+
{ text: '🧠 Total Recall', href: 'apps/total-recall/' },
7570
{ text: '🧪 Cosine Similarity Lab', href: 'apps/similarity-report/' },
7671
{ text: '🧬 Embedding Explorer', href: 'apps/embedding-explorer/' },
7772
{ text: '📊 Asset Observatory', href: 'apps/asset-observatory/' },
7873
{ text: '🧰 Value Formatter', href: 'apps/value-formatter/' },
79-
{ text: '📚 AI Docs', href: 'ai_docs/' },
74+
{ text: '🧵 Cloth Lab', href: 'apps/cloth/' },
75+
{ text: '🐇 Enchanted Forest Bunny', href: 'apps/enchanted-bunny/' },
76+
{ text: '📖 Docs', href: 'docs/' },
8077
{ text: '📚 Blog', href: 'apps/wiki/' },
8178
]);
8279

@@ -86,6 +83,6 @@ test.describe('Landing page', () => {
8683
await expect(valueFormatterButton).not.toContainText('—');
8784

8885
const allButtons = page.locator('a.app-button, a.docs-button');
89-
await expect(allButtons).toHaveCount(13);
86+
await expect(allButtons).toHaveCount(15);
9087
});
9188
});

0 commit comments

Comments
 (0)