+
Image Component Tests
+
Image uses Astro's built-in Image component for optimized image delivery with ImageKit transformations.
+
+
+
+
1. Basic Image with urlEndpoint prop
+
+
+
+
+
+
2. Image with leading slash in src
+
+
+
+
+
+
3. Image with transformation
+
+
+
+
+
+
4. Image with queryParameters
+
+
+
+
+
+
5. Responsive image with sizes
+
+
+
+
+
+
6. Responsive image with fixed sizes (300px)
+
+
+
+
+
+
7. Non-responsive image (responsive=false)
+
+
+
+
+
+
8. Image with custom class
+
+
+
+
+
+
9. Image with loading="eager"
+
+
+
+
+
+
10. Image with transformationPosition="path"
+
+
+
+
+
+
11. Image with transformationPosition="path" + custom transformations
+
+
+
+
+
+
12. Image with custom deviceBreakpoints
+
+
+
+
+
+
13. Image with custom imageBreakpoints
+
+
+
+
+
+
14. Image with data attributes
+
+
+
+
+
+
15. Image with multiple chained transformations
+
+
+
+
+
Astro Image Component Props
+
The following tests verify that Astro's built-in Image component props work correctly with Image.
+
+
+
+
16. Image with format="avif"
+
+
+
+
+
+
17. Image with quality="high"
+
+
+
+
+
+
18. Image with quality=50
+
+
+
+
+
+
19. Image with decoding="sync"
+
+
+
+
+
+
20. Image with fetchpriority="high"
+
+
+
+
+
+
21. Image with densities=[1.5, 2]
+
+
+
+
+
+
22. Image with widths=[240, 540, 720]
+
+
+
+
+
+
23. Image with layout="constrained"
+
+
+
+
+
+
24. Image with layout="full-width"
+
+
+
+
+
+
25. Image with layout="fixed"
+
+
+
+
+
+
26. Image with fit="contain"
+
+
+
+
+
+
27. Image with position="top left"
+
+
+
+
+
+
28. Image with priority (eager loading shorthand)
+
+
+
+
+
+
29. Image with inline style
+
+
+
+
+
+
30. Image with id attribute
+
+
+
+
+
Property Conflict Tests (Invalid Combinations)
+
Per Astro docs: These property combinations should not be used together. Testing graceful handling.
+
+
+
+
31. CONFLICT: densities + layout (densities should be ignored)
+
+
+
+
+
+
32. CONFLICT: densities + widths (only one should be used)
+
+
+
+
+
+
33. CONFLICT: widths without sizes (sizes required)
+
+
+
+
+
+
34. CONFLICT: layout=fixed + widths (fixed layout shouldn't vary widths)
+
+
+
+
+
+
35. CONFLICT: layout=none + responsive=true (none disables responsiveness)
+
+
+
+
+
Valid Property Combinations
+
These property combinations work correctly together.
+
+
+
+
36. VALID: widths + sizes (responsive with explicit widths)
+
+
+
+
+
+
37. VALID: densities alone (density-based srcset)
+
+
+
+
+
+
38. VALID: layout=constrained + format + quality
+
+
+
+
+
+
39. VALID: layout=full-width with responsive props
+
+
+
+
+
+
40. VALID: responsive=true + ImageKit breakpoints
+
+
+
+
+
Edge Case Tests
+
Testing extreme values and boundary conditions.
+
+
+
+
41. Minimal dimensions (1px × 1px)
+
+
+
+
+
+
42. Extreme aspect ratio (1:1000)
+
+
+
+
+
+
43. Extreme aspect ratio (1000:1)
+
+
+
+
+
+
44. Quality = 0 (minimum)
+
+
+
+
+
+
45. Quality = 100 (maximum)
+
+
+
+
+
+
46. Format = webp
+
+
+
+
+
+
47. Format = avif
+
+
+
+
+
+
48. Format = svg
+
+
+
+
+
+
49. Multiple complex transformations
+
+
+
+
+
+
50. transformationPosition="path" + transformations
+
+
+
+
+
+
51. transformationPosition="query" + queryParameters
+
+
+
+
+
+
52. Large width (5000px)
+
+
+
+
+
+
53. Quality preset = "low"
+
+
+
+
+
+
54. Quality preset = "mid"
+
+
+
+
+
+
55. Quality preset = "max"
+
+
+
+
+
+
56. Responsive with extreme device breakpoints
+
+
+
+
+
+
57. Responsive with extreme image breakpoints
+
+
+
+
+
diff --git a/test-app/src/pages/index.astro b/test-app/src/pages/index.astro
new file mode 100644
index 0000000..c2a3b8f
--- /dev/null
+++ b/test-app/src/pages/index.astro
@@ -0,0 +1,61 @@
+---
+---
+
+
+
+
+
+
Video Component Tests
+
+
+
+
Basic Video with urlEndpoint prop
+
+
+
+
+
+
Video with leading slash in src
+
+
+
+
+
+
Video with transformations
+
+
+
+
+
+
Video with all HTML attributes
+
+
+
+
+
+
Video with different urlEndpoint
+
+
+
+
+
+
Video with transformationPosition="path"
+
+
+
+
+
+
Video with custom class
+
+
+
+
+
+
Video with queryParameters
+
+
+
+
+
+
Video with chained transformations
+
+
+
+
+
+
Video without controls (autoplay, muted, loop)
+
+
+
+
+
Edge Case Tests
+
Testing extreme values and boundary conditions for video component.
+
+
+
+
Minimal dimensions (1px × 1px)
+
+
+
+
+
+
Large dimensions (4000px × 2000px)
+
+
+
+
+
+
Extreme aspect ratio (1:500)
+
+
+
+
+
+
Extreme aspect ratio (500:1)
+
+
+
+
+
+
Multiple complex transformations
+
+
+
+
+
+
transformationPosition="path"
+
+
+
+
+
+
transformationPosition="query" + queryParameters
+
+
+
+
+
+
All HTML attributes combined
+
+
+
+
+
+
diff --git a/test-app/tsconfig.json b/test-app/tsconfig.json
new file mode 100644
index 0000000..051dd7d
--- /dev/null
+++ b/test-app/tsconfig.json
@@ -0,0 +1,8 @@
+{
+ "extends": "astro/tsconfigs/strict",
+ "compilerOptions": {
+ "skipLibCheck": true,
+ "types": ["node"]
+ },
+ "include": ["src/**/*", "src/env.d.ts"]
+}