diff --git a/cv-app b/cv-app index e20c5a0..add709d 100755 Binary files a/cv-app and b/cv-app differ diff --git a/templates/cv-content.html b/templates/cv-content.html index b108c34..a61ab7f 100644 --- a/templates/cv-content.html +++ b/templates/cv-content.html @@ -76,7 +76,7 @@
{{if .CompanyLogo}} {{end}}
diff --git a/tests/check-styling.html b/tests/check-styling.html new file mode 100644 index 0000000..f81d478 --- /dev/null +++ b/tests/check-styling.html @@ -0,0 +1,76 @@ + + + + Styling Comparison + + + +

CV Header Styling Comparison

+
+
+

Original Design

+ Original +
+
Expected Styling:
+
• Font: Quicksand
+
• Size: ~0.85em (smaller than name)
+
• Weight: 400 (normal)
+
• Color: #666 (medium gray)
+
• Margin: minimal (4px top)
+
• Alignment: left with name
+
+
+
+

Current Implementation

+ Current +
+
Applied CSS:
+
font-family: 'Quicksand', sans-serif;
+
font-size: 0.85em;
+
font-weight: 400;
+
color: #666;
+
margin: 4px 0 0 0;
+
line-height: 1.4;
+
+
+
+ + diff --git a/tests/verify-years-styling.sh b/tests/verify-years-styling.sh new file mode 100755 index 0000000..0ae2843 --- /dev/null +++ b/tests/verify-years-styling.sh @@ -0,0 +1,107 @@ +#!/bin/bash + +# Test script to verify the "years of experience" styling matches the original design + +echo "🧪 Testing Years of Experience Styling" +echo "========================================" + +# Colors for output +GREEN='\033[0;32m' +RED='\033[0;31m' +NC='\033[0m' # No Color + +# Test counter +PASSED=0 +FAILED=0 + +# Test 1: Check CSS file contains correct styles +echo -n "1. CSS contains correct font-size (0.85em)... " +if grep -q "font-size: 0.85em;" /Users/txeo/Git/yo/cv/static/css/main.css; then + echo -e "${GREEN}✓ PASS${NC}" + ((PASSED++)) +else + echo -e "${RED}✗ FAIL${NC}" + ((FAILED++)) +fi + +# Test 2: Check font-weight +echo -n "2. CSS contains correct font-weight (400)... " +if grep -A 6 ".years-experience" /Users/txeo/Git/yo/cv/static/css/main.css | grep -q "font-weight: 400;"; then + echo -e "${GREEN}✓ PASS${NC}" + ((PASSED++)) +else + echo -e "${RED}✗ FAIL${NC}" + ((FAILED++)) +fi + +# Test 3: Check color +echo -n "3. CSS contains correct color (#666)... " +if grep -A 6 ".years-experience" /Users/txeo/Git/yo/cv/static/css/main.css | grep -q "color: #666;"; then + echo -e "${GREEN}✓ PASS${NC}" + ((PASSED++)) +else + echo -e "${RED}✗ FAIL${NC}" + ((FAILED++)) +fi + +# Test 4: Check margin +echo -n "4. CSS contains minimal top margin (4px 0 0 0)... " +if grep -A 6 ".years-experience" /Users/txeo/Git/yo/cv/static/css/main.css | grep -q "margin: 4px 0 0 0;"; then + echo -e "${GREEN}✓ PASS${NC}" + ((PASSED++)) +else + echo -e "${RED}✗ FAIL${NC}" + ((FAILED++)) +fi + +# Test 5: Check English version renders +echo -n "5. English version renders correctly... " +if curl -s "http://localhost:1999/?lang=en" | grep -q "20 years of experience"; then + echo -e "${GREEN}✓ PASS${NC}" + ((PASSED++)) +else + echo -e "${RED}✗ FAIL${NC}" + ((FAILED++)) +fi + +# Test 6: Check Spanish version renders +echo -n "6. Spanish version renders correctly... " +if curl -s "http://localhost:1999/?lang=es" | grep -q "20 años de experiencia"; then + echo -e "${GREEN}✓ PASS${NC}" + ((PASSED++)) +else + echo -e "${RED}✗ FAIL${NC}" + ((FAILED++)) +fi + +# Test 7: Check short version +echo -n "7. Short CV version includes years text... " +if curl -s "http://localhost:1999/?lang=en&version=short" | grep -q "years-experience"; then + echo -e "${GREEN}✓ PASS${NC}" + ((PASSED++)) +else + echo -e "${RED}✗ FAIL${NC}" + ((FAILED++)) +fi + +# Test 8: Check long version +echo -n "8. Long CV version includes years text... " +if curl -s "http://localhost:1999/?lang=en&version=long" | grep -q "years-experience"; then + echo -e "${GREEN}✓ PASS${NC}" + ((PASSED++)) +else + echo -e "${RED}✗ FAIL${NC}" + ((FAILED++)) +fi + +# Summary +echo "" +echo "========================================" +echo "Test Results: ${PASSED} passed, ${FAILED} failed" +if [ $FAILED -eq 0 ]; then + echo -e "${GREEN}✅ All tests passed!${NC}" + exit 0 +else + echo -e "${RED}❌ Some tests failed${NC}" + exit 1 +fi diff --git a/tests/visual-comparison.spec.js b/tests/visual-comparison.spec.js index 30883a1..0300a61 100644 --- a/tests/visual-comparison.spec.js +++ b/tests/visual-comparison.spec.js @@ -1,6 +1,6 @@ /** * Visual Comparison Test Suite - * Compares new Go+HTMX CV (localhost:1999) vs old React CV (localhost:3000) + * Compares new Go + HTMX CV (localhost:1999) vs old React CV (localhost:3000) */ const { test, expect } = require('@playwright/test');