Skip to content

Commit 8bf358d

Browse files
committed
clean up: remove node_modules, package-lock.json, and backup folders from git
1 parent aa5189f commit 8bf358d

64 files changed

Lines changed: 54 additions & 62901 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,3 +205,6 @@ cython_debug/
205205
marimo/_static/
206206
marimo/_lsp/
207207
__marimo__/
208+
node_modules/
209+
mock-project/node_modules/
210+
*.swp

mock-project/e2e_tests/colorblind.spec.js

Lines changed: 51 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ const { test, expect } = require('@playwright/test');
22

33
test('homepage loads and shows title', async ({ page }) => {
44
await page.goto('http://localhost:5000');
5-
await expect(page).toHaveTitle(/Colorblindness Checker Demo/);
5+
await expect(page).toHaveTitle(/Color Vision Test/);
6+
await expect(page.locator('h1')).toContainText('Color Vision Diagnostic Test');
67
});
78

89
test('health endpoint returns ok', async ({ request }) => {
@@ -11,37 +12,62 @@ test('health endpoint returns ok', async ({ request }) => {
1112
expect(await response.json()).toEqual({ status: 'ok' });
1213
});
1314

14-
test('red vs green returns false', async ({ request }) => {
15-
const response = await request.post('http://localhost:5000/check', {
16-
data: { color1: '#FF0000', color2: '#00FF00' }
17-
});
18-
expect(response.status()).toBe(200);
19-
expect(await response.json()).toEqual({ distinguishable: false });
15+
test('user can submit answers and complete the test', async ({ page }) => {
16+
await page.goto('http://localhost:5000');
17+
18+
// Get total number of plates from the progress indicator
19+
const totalText = await page.locator('p').first().textContent();
20+
const totalMatch = totalText.match(/of (\d+)/);
21+
const totalPlates = totalMatch ? parseInt(totalMatch[1]) : 10;
22+
23+
// Submit answers for all plates
24+
for (let i = 0; i < totalPlates; i++) {
25+
// Enter a guess (using 0 as default)
26+
await page.fill('input[name="answer"]', '0');
27+
await page.click('button[type="submit"]');
28+
await page.waitForLoadState('networkidle');
29+
}
30+
31+
// Should reach results page
32+
await expect(page.locator('h2')).toContainText('Your Color Blind Test Result');
2033
});
2134

22-
test('red vs blue returns true', async ({ request }) => {
23-
const response = await request.post('http://localhost:5000/check', {
24-
data: { color1: '#FF0000', color2: '#0000FF' }
25-
});
26-
expect(response.status()).toBe(200);
27-
expect(await response.json()).toEqual({ distinguishable: true });
35+
test('results page shows cone scores', async ({ page }) => {
36+
// Complete the test first
37+
await page.goto('http://localhost:5000');
38+
39+
const totalText = await page.locator('p').first().textContent();
40+
const totalMatch = totalText.match(/of (\d+)/);
41+
const totalPlates = totalMatch ? parseInt(totalMatch[1]) : 10;
42+
43+
for (let i = 0; i < totalPlates; i++) {
44+
await page.fill('input[name="answer"]', '0');
45+
await page.click('button[type="submit"]');
46+
await page.waitForLoadState('networkidle');
47+
}
48+
49+
// Verify results page has score elements
50+
await expect(page.locator('.score').first()).toBeVisible();
2851
});
2952

30-
test('full user flow via web interface', async ({ page }) => {
53+
test('reset button clears results and restarts test', async ({ page }) => {
3154
await page.goto('http://localhost:5000');
3255

33-
// Fill in colors
34-
await page.fill('#color1', '#FF0000');
35-
await page.fill('#color2', '#00FF00');
56+
// Complete the test
57+
const totalText = await page.locator('p').first().textContent();
58+
const totalMatch = totalText.match(/of (\d+)/);
59+
const totalPlates = totalMatch ? parseInt(totalMatch[1]) : 10;
3660

37-
// Click check button
38-
await page.click('button');
61+
for (let i = 0; i < totalPlates; i++) {
62+
await page.fill('input[name="answer"]', '0');
63+
await page.click('button[type="submit"]');
64+
await page.waitForLoadState('networkidle');
65+
}
3966

40-
// Wait for result and verify
41-
await expect(page.locator('.result')).toContainText('NOT DISTINGUISHABLE');
67+
// Click reset button
68+
await page.click('button[type="submit"]');
4269

43-
// Change to red and blue
44-
await page.fill('#color2', '#0000FF');
45-
await page.click('button');
46-
await expect(page.locator('.result')).toContainText('DISTINGUISHABLE');
70+
// Should be back to first plate
71+
await expect(page.locator('h1')).toContainText('Color Vision Diagnostic Test');
72+
await expect(page.locator('input[name="answer"]')).toBeVisible();
4773
});

mock-project/node_modules/.bin/playwright

Lines changed: 0 additions & 1 deletion
This file was deleted.

mock-project/node_modules/.bin/playwright-core

Lines changed: 0 additions & 1 deletion
This file was deleted.

mock-project/node_modules/.package-lock.json

Lines changed: 0 additions & 50 deletions
This file was deleted.

mock-project/node_modules/@playwright/test/LICENSE

Lines changed: 0 additions & 202 deletions
This file was deleted.

mock-project/node_modules/@playwright/test/NOTICE

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)