Add 3 files
Browse files- README.md +7 -5
- index.html +848 -19
- prompts.txt +3 -0
README.md
CHANGED
@@ -1,10 +1,12 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
-
emoji:
|
4 |
-
colorFrom:
|
5 |
-
colorTo:
|
6 |
sdk: static
|
7 |
pinned: false
|
|
|
|
|
8 |
---
|
9 |
|
10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
1 |
---
|
2 |
+
title: test
|
3 |
+
emoji: 🐳
|
4 |
+
colorFrom: red
|
5 |
+
colorTo: purple
|
6 |
sdk: static
|
7 |
pinned: false
|
8 |
+
tags:
|
9 |
+
- deepsite
|
10 |
---
|
11 |
|
12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
@@ -1,19 +1,848 @@
|
|
1 |
-
<!
|
2 |
-
<html>
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html lang="en">
|
3 |
+
<head>
|
4 |
+
<meta charset="UTF-8">
|
5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>WebTest AI | Automated Website Analysis</title>
|
7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
8 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
9 |
+
<style>
|
10 |
+
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
|
11 |
+
|
12 |
+
body {
|
13 |
+
font-family: 'Inter', sans-serif;
|
14 |
+
background-color: #ffffff;
|
15 |
+
color: #343541;
|
16 |
+
}
|
17 |
+
|
18 |
+
.chatgpt-bg {
|
19 |
+
background-color: #343541;
|
20 |
+
}
|
21 |
+
|
22 |
+
.chatgpt-light-bg {
|
23 |
+
background-color: #444654;
|
24 |
+
}
|
25 |
+
|
26 |
+
.chatgpt-green {
|
27 |
+
background-color: #10a37f;
|
28 |
+
}
|
29 |
+
|
30 |
+
.chatgpt-green-hover:hover {
|
31 |
+
background-color: #0d8c6d;
|
32 |
+
}
|
33 |
+
|
34 |
+
.chatgpt-text-green {
|
35 |
+
color: #10a37f;
|
36 |
+
}
|
37 |
+
|
38 |
+
.chatgpt-border {
|
39 |
+
border-color: #565869;
|
40 |
+
}
|
41 |
+
|
42 |
+
.chatgpt-message {
|
43 |
+
background-color: #444654;
|
44 |
+
}
|
45 |
+
|
46 |
+
.chatgpt-user-message {
|
47 |
+
background-color: #343541;
|
48 |
+
}
|
49 |
+
|
50 |
+
.loading-spinner {
|
51 |
+
width: 48px;
|
52 |
+
height: 48px;
|
53 |
+
border: 5px solid rgba(255, 255, 255, 0.2);
|
54 |
+
border-radius: 50%;
|
55 |
+
border-top-color: #ffffff;
|
56 |
+
animation: spin 1s ease-in-out infinite;
|
57 |
+
}
|
58 |
+
|
59 |
+
@keyframes spin {
|
60 |
+
to { transform: rotate(360deg); }
|
61 |
+
}
|
62 |
+
|
63 |
+
.tab-button {
|
64 |
+
position: relative;
|
65 |
+
padding-bottom: 8px;
|
66 |
+
}
|
67 |
+
|
68 |
+
.tab-button.active::after {
|
69 |
+
content: '';
|
70 |
+
position: absolute;
|
71 |
+
bottom: 0;
|
72 |
+
left: 0;
|
73 |
+
right: 0;
|
74 |
+
height: 2px;
|
75 |
+
background-color: #10a37f;
|
76 |
+
animation: underline 0.3s ease-out;
|
77 |
+
}
|
78 |
+
|
79 |
+
@keyframes underline {
|
80 |
+
from { transform: scaleX(0); }
|
81 |
+
to { transform: scaleX(1); }
|
82 |
+
}
|
83 |
+
|
84 |
+
.code-block {
|
85 |
+
background-color: #343541;
|
86 |
+
color: #ffffff;
|
87 |
+
padding: 12px;
|
88 |
+
border-radius: 6px;
|
89 |
+
font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
|
90 |
+
font-size: 14px;
|
91 |
+
overflow-x: auto;
|
92 |
+
}
|
93 |
+
|
94 |
+
.progress-ring {
|
95 |
+
transform: rotate(-90deg);
|
96 |
+
}
|
97 |
+
|
98 |
+
.progress-ring-circle {
|
99 |
+
stroke-dasharray: 283;
|
100 |
+
stroke-dashoffset: 283;
|
101 |
+
transition: stroke-dashoffset 0.6s ease;
|
102 |
+
}
|
103 |
+
|
104 |
+
/* Custom scrollbar */
|
105 |
+
::-webkit-scrollbar {
|
106 |
+
width: 8px;
|
107 |
+
}
|
108 |
+
|
109 |
+
::-webkit-scrollbar-track {
|
110 |
+
background: #343541;
|
111 |
+
}
|
112 |
+
|
113 |
+
::-webkit-scrollbar-thumb {
|
114 |
+
background: #565869;
|
115 |
+
border-radius: 4px;
|
116 |
+
}
|
117 |
+
|
118 |
+
::-webkit-scrollbar-thumb:hover {
|
119 |
+
background: #6e6f80;
|
120 |
+
}
|
121 |
+
</style>
|
122 |
+
</head>
|
123 |
+
<body class="min-h-screen">
|
124 |
+
<div class="chatgpt-bg min-h-[320px]">
|
125 |
+
<div class="container mx-auto px-4 py-8">
|
126 |
+
<header class="flex justify-between items-center mb-12">
|
127 |
+
<div class="flex items-center">
|
128 |
+
<div class="w-10 h-10 rounded-lg bg-white/10 flex items-center justify-center mr-3">
|
129 |
+
<i class="fas fa-bolt text-white text-xl"></i>
|
130 |
+
</div>
|
131 |
+
<h1 class="text-white text-2xl font-bold">WebTest AI</h1>
|
132 |
+
</div>
|
133 |
+
<nav class="hidden md:flex space-x-8">
|
134 |
+
<a href="#" class="text-white/80 hover:text-white transition">Features</a>
|
135 |
+
<a href="#" class="text-white/80 hover:text-white transition">Pricing</a>
|
136 |
+
<a href="#" class="text-white/80 hover:text-white transition">Docs</a>
|
137 |
+
<a href="#" class="text-white/80 hover:text-white transition">Contact</a>
|
138 |
+
</nav>
|
139 |
+
<button class="bg-white text-gray-800 px-4 py-2 rounded-lg font-medium hover:bg-gray-100 transition">
|
140 |
+
Sign In
|
141 |
+
</button>
|
142 |
+
</header>
|
143 |
+
|
144 |
+
<div class="max-w-3xl mx-auto text-center">
|
145 |
+
<h2 class="text-4xl font-bold text-white mb-6">Automated Website Testing & Analysis</h2>
|
146 |
+
<p class="text-xl text-white/80 mb-8">AI-powered insights for performance, accessibility, and UX best practices</p>
|
147 |
+
|
148 |
+
<div class="bg-white/5 rounded-xl p-1 shadow-lg">
|
149 |
+
<div class="flex flex-col md:flex-row gap-1 bg-white/5 rounded-lg">
|
150 |
+
<input type="url" id="urlInput" placeholder="Enter website URL (e.g., https://example.com)"
|
151 |
+
class="flex-grow px-5 py-4 bg-white/5 text-white placeholder-white/50 rounded-lg focus:outline-none focus:ring-2 focus:ring-white/30">
|
152 |
+
<button id="runTestsBtn" class="chatgpt-green hover:chatgpt-green-hover text-white px-6 py-4 rounded-lg font-medium transition flex items-center justify-center">
|
153 |
+
<i class="fas fa-play mr-2"></i> Analyze
|
154 |
+
</button>
|
155 |
+
</div>
|
156 |
+
</div>
|
157 |
+
|
158 |
+
<div class="mt-6 flex flex-wrap justify-center gap-4">
|
159 |
+
<div class="flex items-center text-white/80 text-sm">
|
160 |
+
<i class="fas fa-check-circle mr-2 text-white"></i> Automated testing
|
161 |
+
</div>
|
162 |
+
<div class="flex items-center text-white/80 text-sm">
|
163 |
+
<i class="fas fa-check-circle mr-2 text-white"></i> AI recommendations
|
164 |
+
</div>
|
165 |
+
<div class="flex items-center text-white/80 text-sm">
|
166 |
+
<i class="fas fa-check-circle mr-2 text-white"></i> Accessibility audit
|
167 |
+
</div>
|
168 |
+
</div>
|
169 |
+
</div>
|
170 |
+
</div>
|
171 |
+
</div>
|
172 |
+
|
173 |
+
<div class="container mx-auto px-4 py-12 -mt-20">
|
174 |
+
<div id="loadingIndicator" class="hidden">
|
175 |
+
<div class="bg-white rounded-xl shadow-lg p-8 text-center max-w-2xl mx-auto">
|
176 |
+
<div class="loading-spinner mx-auto mb-6"></div>
|
177 |
+
<h3 class="text-xl font-semibold text-gray-800 mb-2">Analyzing your website</h3>
|
178 |
+
<p class="text-gray-500 mb-6">We're running comprehensive tests and generating AI-powered insights...</p>
|
179 |
+
|
180 |
+
<div class="w-full bg-gray-200 rounded-full h-2 mb-4">
|
181 |
+
<div id="progressBar" class="chatgpt-green h-2 rounded-full" style="width: 0%"></div>
|
182 |
+
</div>
|
183 |
+
<p id="progressText" class="text-sm text-gray-500">Initializing analysis engine</p>
|
184 |
+
|
185 |
+
<div id="aiChatContainer" class="mt-8 text-left hidden">
|
186 |
+
<h4 class="text-lg font-medium text-gray-800 mb-3">AI Analysis Progress</h4>
|
187 |
+
<div id="aiChat" class="space-y-3 max-h-60 overflow-y-auto p-4 bg-gray-50 rounded-lg">
|
188 |
+
<!-- AI chat messages will appear here -->
|
189 |
+
</div>
|
190 |
+
</div>
|
191 |
+
</div>
|
192 |
+
</div>
|
193 |
+
|
194 |
+
<div id="resultsContainer" class="hidden">
|
195 |
+
<div class="bg-white rounded-xl shadow-lg overflow-hidden mb-12">
|
196 |
+
<div class="flex overflow-x-auto px-6 border-b chatgpt-border">
|
197 |
+
<button class="tab-button active px-4 py-4 font-medium text-gray-500 hover:text-gray-800 transition" data-tab="summary">
|
198 |
+
Summary
|
199 |
+
</button>
|
200 |
+
<button class="tab-button px-4 py-4 font-medium text-gray-500 hover:text-gray-800 transition" data-tab="functional">
|
201 |
+
Functional Tests
|
202 |
+
</button>
|
203 |
+
<button class="tab-button px-4 py-4 font-medium text-gray-500 hover:text-gray-800 transition" data-tab="ux">
|
204 |
+
UX Analysis
|
205 |
+
</button>
|
206 |
+
<button class="tab-button px-4 py-4 font-medium text-gray-500 hover:text-gray-800 transition" data-tab="accessibility">
|
207 |
+
Accessibility
|
208 |
+
</button>
|
209 |
+
<button class="tab-button px-4 py-4 font-medium text-gray-500 hover:text-gray-800 transition" data-tab="ai">
|
210 |
+
AI Review
|
211 |
+
</button>
|
212 |
+
</div>
|
213 |
+
|
214 |
+
<div id="summary" class="tab-content p-8">
|
215 |
+
<div class="flex flex-col md:flex-row gap-8 mb-8">
|
216 |
+
<div class="flex-1">
|
217 |
+
<h3 class="text-xl font-semibold text-gray-800 mb-6">Test Overview</h3>
|
218 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
219 |
+
<div class="bg-gray-50 p-5 rounded-xl">
|
220 |
+
<div class="flex items-center justify-between mb-3">
|
221 |
+
<h4 class="font-medium text-gray-700">Functional Tests</h4>
|
222 |
+
<span id="functionalScore" class="text-gray-500">0/0</span>
|
223 |
+
</div>
|
224 |
+
<div class="w-full bg-gray-200 rounded-full h-2">
|
225 |
+
<div id="functionalProgress" class="chatgpt-green h-2 rounded-full" style="width: 0%"></div>
|
226 |
+
</div>
|
227 |
+
</div>
|
228 |
+
<div class="bg-gray-50 p-5 rounded-xl">
|
229 |
+
<div class="flex items-center justify-between mb-3">
|
230 |
+
<h4 class="font-medium text-gray-700">UX Score</h4>
|
231 |
+
<span id="uxScore" class="text-gray-500">0%</span>
|
232 |
+
</div>
|
233 |
+
<div class="w-full bg-gray-200 rounded-full h-2">
|
234 |
+
<div id="uxProgress" class="chatgpt-green h-2 rounded-full" style="width: 0%"></div>
|
235 |
+
</div>
|
236 |
+
</div>
|
237 |
+
<div class="bg-gray-50 p-5 rounded-xl">
|
238 |
+
<div class="flex items-center justify-between mb-3">
|
239 |
+
<h4 class="font-medium text-gray-700">Accessibility</h4>
|
240 |
+
<span id="accessibilityScore" class="text-gray-500">0/100</span>
|
241 |
+
</div>
|
242 |
+
<div class="w-full bg-gray-200 rounded-full h-2">
|
243 |
+
<div id="accessibilityProgress" class="chatgpt-green h-2 rounded-full" style="width: 0%"></div>
|
244 |
+
</div>
|
245 |
+
</div>
|
246 |
+
<div class="bg-gray-50 p-5 rounded-xl">
|
247 |
+
<div class="flex items-center justify-between mb-3">
|
248 |
+
<h4 class="font-medium text-gray-700">Performance</h4>
|
249 |
+
<span id="performanceScore" class="text-gray-500">0/100</span>
|
250 |
+
</div>
|
251 |
+
<div class="w-full bg-gray-200 rounded-full h-2">
|
252 |
+
<div id="performanceProgress" class="chatgpt-green h-2 rounded-full" style="width: 0%"></div>
|
253 |
+
</div>
|
254 |
+
</div>
|
255 |
+
</div>
|
256 |
+
</div>
|
257 |
+
|
258 |
+
<div class="md:w-64 flex flex-col items-center justify-center">
|
259 |
+
<div class="relative w-40 h-40 mb-4">
|
260 |
+
<svg class="progress-ring w-full h-full" viewBox="0 0 100 100">
|
261 |
+
<circle class="text-gray-200" stroke-width="8" stroke="currentColor" fill="transparent" r="45" cx="50" cy="50"/>
|
262 |
+
<circle id="overallScoreRing" class="progress-ring-circle text-green-600" stroke-width="8" stroke-linecap="round" stroke="currentColor" fill="transparent" r="45" cx="50" cy="50"/>
|
263 |
+
</svg>
|
264 |
+
<div class="absolute inset-0 flex items-center justify-center">
|
265 |
+
<span id="overallScore" class="text-3xl font-bold text-gray-800">0%</span>
|
266 |
+
</div>
|
267 |
+
</div>
|
268 |
+
<p class="text-gray-500 text-center">Overall website score based on all test criteria</p>
|
269 |
+
</div>
|
270 |
+
</div>
|
271 |
+
|
272 |
+
<div class="mb-8">
|
273 |
+
<h3 class="text-xl font-semibold text-gray-800 mb-6">Key Findings</h3>
|
274 |
+
<div id="keyFindings" class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
275 |
+
<!-- Dynamically populated -->
|
276 |
+
</div>
|
277 |
+
</div>
|
278 |
+
|
279 |
+
<div class="mb-8">
|
280 |
+
<h3 class="text-xl font-semibold text-gray-800 mb-6">Visual Issues</h3>
|
281 |
+
<div id="visualIssues" class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
282 |
+
<!-- Screenshots with highlighted issues will appear here -->
|
283 |
+
</div>
|
284 |
+
</div>
|
285 |
+
|
286 |
+
<div class="flex flex-col md:flex-row gap-4 justify-between items-center pt-6 border-t border-gray-200">
|
287 |
+
<div class="text-sm text-gray-500">
|
288 |
+
Analysis completed: <span id="analysisDate" class="font-medium">Just now</span>
|
289 |
+
</div>
|
290 |
+
<div class="flex gap-3">
|
291 |
+
<button id="downloadReportBtn" class="chatgpt-green hover:chatgpt-green-hover text-white px-5 py-2.5 rounded-lg font-medium transition flex items-center">
|
292 |
+
<i class="fas fa-download mr-2"></i> Download Report
|
293 |
+
</button>
|
294 |
+
<button id="shareResultsBtn" class="bg-white border border-gray-300 hover:bg-gray-50 text-gray-700 px-5 py-2.5 rounded-lg font-medium transition flex items-center">
|
295 |
+
<i class="fas fa-share-alt mr-2"></i> Share
|
296 |
+
</button>
|
297 |
+
</div>
|
298 |
+
</div>
|
299 |
+
</div>
|
300 |
+
|
301 |
+
<div id="functional" class="tab-content p-8 hidden">
|
302 |
+
<h3 class="text-xl font-semibold text-gray-800 mb-6">Functional Test Results</h3>
|
303 |
+
<p class="text-gray-500 mb-6">Automated tests performed using headless browser technology</p>
|
304 |
+
|
305 |
+
<div id="functionalResults" class="space-y-4">
|
306 |
+
<!-- Dynamically populated -->
|
307 |
+
</div>
|
308 |
+
</div>
|
309 |
+
|
310 |
+
<div id="ux" class="tab-content p-8 hidden">
|
311 |
+
<h3 class="text-xl font-semibold text-gray-800 mb-6">UX Analysis</h3>
|
312 |
+
<p class="text-gray-500 mb-6">Identified UX issues based on industry best practices</p>
|
313 |
+
|
314 |
+
<div id="uxResults" class="space-y-6">
|
315 |
+
<!-- Dynamically populated -->
|
316 |
+
</div>
|
317 |
+
</div>
|
318 |
+
|
319 |
+
<div id="accessibility" class="tab-content p-8 hidden">
|
320 |
+
<h3 class="text-xl font-semibold text-gray-800 mb-6">Accessibility Issues</h3>
|
321 |
+
<p class="text-gray-500 mb-6">WCAG 2.1 compliance issues identified</p>
|
322 |
+
|
323 |
+
<div id="accessibilityResults" class="space-y-4">
|
324 |
+
<!-- Dynamically populated -->
|
325 |
+
</div>
|
326 |
+
</div>
|
327 |
+
|
328 |
+
<div id="ai" class="tab-content p-8 hidden">
|
329 |
+
<h3 class="text-xl font-semibold text-gray-800 mb-6">AI-Powered Code Review</h3>
|
330 |
+
<p class="text-gray-500 mb-6">Advanced analysis of HTML/CSS structure and patterns</p>
|
331 |
+
|
332 |
+
<div id="aiAnalysisResults" class="space-y-8">
|
333 |
+
<!-- Dynamically populated -->
|
334 |
+
</div>
|
335 |
+
</div>
|
336 |
+
</div>
|
337 |
+
|
338 |
+
<div class="grid grid-cols-1 md:grid-cols-3 gap-8 mb-12">
|
339 |
+
<div class="bg-white p-6 rounded-xl shadow">
|
340 |
+
<div class="w-12 h-12 rounded-lg bg-blue-100 flex items-center justify-center mb-4">
|
341 |
+
<i class="fas fa-bolt text-blue-600 text-xl"></i>
|
342 |
+
</div>
|
343 |
+
<h4 class="font-semibold text-lg mb-2">Lightning Fast</h4>
|
344 |
+
<p class="text-gray-500">Get comprehensive test results in seconds with our optimized testing engine.</p>
|
345 |
+
</div>
|
346 |
+
<div class="bg-white p-6 rounded-xl shadow">
|
347 |
+
<div class="w-12 h-12 rounded-lg bg-purple-100 flex items-center justify-center mb-4">
|
348 |
+
<i class="fas fa-robot text-purple-600 text-xl"></i>
|
349 |
+
</div>
|
350 |
+
<h4 class="font-semibold text-lg mb-2">AI-Powered</h4>
|
351 |
+
<p class="text-gray-500">Our AI identifies issues human testers might miss and provides actionable recommendations.</p>
|
352 |
+
</div>
|
353 |
+
<div class="bg-white p-6 rounded-xl shadow">
|
354 |
+
<div class="w-12 h-12 rounded-lg bg-green-100 flex items-center justify-center mb-4">
|
355 |
+
<i class="fas fa-chart-line text-green-600 text-xl"></i>
|
356 |
+
</div>
|
357 |
+
<h4 class="font-semibold text-lg mb-2">Detailed Reports</h4>
|
358 |
+
<p class="text-gray-500">Export professional PDF reports to share with your team or clients.</p>
|
359 |
+
</div>
|
360 |
+
</div>
|
361 |
+
</div>
|
362 |
+
</div>
|
363 |
+
|
364 |
+
<footer class="bg-gray-900 text-white py-12">
|
365 |
+
<div class="container mx-auto px-4">
|
366 |
+
<div class="grid grid-cols-1 md:grid-cols-4 gap-8 mb-8">
|
367 |
+
<div>
|
368 |
+
<h5 class="text-lg font-semibold mb-4">WebTest AI</h5>
|
369 |
+
<p class="text-gray-400">Automated website testing powered by AI for developers and designers.</p>
|
370 |
+
</div>
|
371 |
+
<div>
|
372 |
+
<h5 class="text-lg font-semibold mb-4">Product</h5>
|
373 |
+
<ul class="space-y-2">
|
374 |
+
<li><a href="#" class="text-gray-400 hover:text-white transition">Features</a></li>
|
375 |
+
<li><a href="#" class="text-gray-400 hover:text-white transition">Pricing</a></li>
|
376 |
+
<li><a href="#" class="text-gray-400 hover:text-white transition">API</a></li>
|
377 |
+
</ul>
|
378 |
+
</div>
|
379 |
+
<div>
|
380 |
+
<h5 class="text-lg font-semibold mb-4">Resources</h5>
|
381 |
+
<ul class="space-y-2">
|
382 |
+
<li><a href="#" class="text-gray-400 hover:text-white transition">Documentation</a></li>
|
383 |
+
<li><a href="#" class="text-gray-400 hover:text-white transition">Blog</a></li>
|
384 |
+
<li><a href="#" class="text-gray-400 hover:text-white transition">Support</a></li>
|
385 |
+
</ul>
|
386 |
+
</div>
|
387 |
+
<div>
|
388 |
+
<h5 class="text-lg font-semibold mb-4">Company</h5>
|
389 |
+
<ul class="space-y-2">
|
390 |
+
<li><a href="#" class="text-gray-400 hover:text-white transition">About</a></li>
|
391 |
+
<li><a href="#" class="text-gray-400 hover:text-white transition">Careers</a></li>
|
392 |
+
<li><a href="#" class="text-gray-400 hover:text-white transition">Contact</a></li>
|
393 |
+
</ul>
|
394 |
+
</div>
|
395 |
+
</div>
|
396 |
+
<div class="pt-8 border-t border-gray-800 flex flex-col md:flex-row justify-between items-center">
|
397 |
+
<p class="text-gray-400 mb-4 md:mb-0">© 2023 WebTest AI. All rights reserved.</p>
|
398 |
+
<div class="flex space-x-6">
|
399 |
+
<a href="#" class="text-gray-400 hover:text-white transition"><i class="fab fa-twitter"></i></a>
|
400 |
+
<a href="#" class="text-gray-400 hover:text-white transition"><i class="fab fa-github"></i></a>
|
401 |
+
<a href="#" class="text-gray-400 hover:text-white transition"><i class="fab fa-linkedin"></i></a>
|
402 |
+
</div>
|
403 |
+
</div>
|
404 |
+
</div>
|
405 |
+
</footer>
|
406 |
+
|
407 |
+
<script>
|
408 |
+
// Mock data for demonstration
|
409 |
+
const mockTestResults = {
|
410 |
+
functional: [
|
411 |
+
{ name: "Page Load", status: "pass", description: "The page loaded successfully within 2.1 seconds." },
|
412 |
+
{ name: "Main Navigation", status: "pass", description: "All navigation links are working correctly." },
|
413 |
+
{ name: "Contact Form Submission", status: "fail", description: "Form submission fails with 500 error.", element: "#contact-form" },
|
414 |
+
{ name: "Mobile Responsiveness", status: "pass", description: "Page layout adapts well to mobile screens." },
|
415 |
+
{ name: "Image Loading", status: "fail", description: "3 images failed to load (404 errors).", elements: [".hero-image", ".product-img-2", ".logo"] },
|
416 |
+
{ name: "Button Functionality", status: "fail", description: "2 buttons are not clickable on mobile.", elements: [".cta-button", ".menu-toggle"] }
|
417 |
+
],
|
418 |
+
ux: [
|
419 |
+
{ issue: "Color Misuse", severity: "high", description: "Red color used for confirmation buttons which typically indicate danger.", recommendation: "Use green or blue for confirmation actions. Reserve red for destructive actions.", element: ".confirm-btn", screenshot: "https://via.placeholder.com/600x400/FF0000/FFFFFF?text=Red+Confirmation+Button" },
|
420 |
+
{ issue: "Button Placement", severity: "medium", description: "Primary call-to-action button is not prominent enough.", recommendation: "Increase button size by 20% and use a more contrasting color.", element: ".primary-cta", screenshot: "https://via.placeholder.com/600x400/CCCCCC/000000?text=Weak+CTA" },
|
421 |
+
{ issue: "Form Labels", severity: "high", description: "5 form fields are missing proper labels.", recommendation: "Add descriptive labels to all form fields and ensure they're properly associated.", elements: ["#email-input", "#password-input", "#search-field"], screenshot: "https://via.placeholder.com/600x400/FFFFFF/000000?text=Unlabeled+Form" }
|
422 |
+
],
|
423 |
+
accessibility: [
|
424 |
+
{ issue: "Missing Alt Text", severity: "high", description: "9 images are missing alt text attributes.", recommendation: "Add descriptive alt text to all images for screen readers.", elements: [".hero-image", ".product-img", ".logo"], screenshot: "https://via.placeholder.com/600x400/FFFFFF/000000?text=Image+No+Alt" },
|
425 |
+
{ issue: "Heading Structure", severity: "medium", description: "Heading levels skip from h2 to h4 creating hierarchy confusion.", recommendation: "Maintain a consistent heading hierarchy (h1 > h2 > h3).", elements: ["h2.main-title", "h4.subsection"], screenshot: "https://via.placeholder.com/600x400/FFFFFF/000000?text=Heading+Structure" },
|
426 |
+
{ issue: "Low Contrast", severity: "medium", description: "Text contrast ratio of 3.8:1 for body text (should be at least 4.5:1).", recommendation: "Increase contrast between text and background colors.", elements: [".light-text", ".footer-links"], screenshot: "https://via.placeholder.com/600x400/CCCCCC/FFFFFF?text=Low+Contrast" }
|
427 |
+
],
|
428 |
+
aiAnalysis: [
|
429 |
+
{
|
430 |
+
category: "HTML Structure",
|
431 |
+
findings: [
|
432 |
+
"Semantic HTML misuse: 4 divs could be replaced with proper semantic elements (nav, section, article)",
|
433 |
+
"Missing lang attribute in html tag",
|
434 |
+
"No viewport meta tag for responsive behavior"
|
435 |
+
],
|
436 |
+
recommendations: [
|
437 |
+
"Replace generic divs with semantic HTML5 elements",
|
438 |
+
"Add lang attribute to html tag (e.g., <html lang='en'>)",
|
439 |
+
"Add viewport meta tag: <meta name='viewport' content='width=device-width, initial-scale=1'>"
|
440 |
+
],
|
441 |
+
codeExamples: [
|
442 |
+
{
|
443 |
+
bad: "<div class='nav'>...</div>",
|
444 |
+
good: "<nav>...</nav>"
|
445 |
+
},
|
446 |
+
{
|
447 |
+
bad: "<div class='content-section'>...</div>",
|
448 |
+
good: "<section>...</section>"
|
449 |
+
}
|
450 |
+
]
|
451 |
+
},
|
452 |
+
{
|
453 |
+
category: "CSS Practices",
|
454 |
+
findings: [
|
455 |
+
"Overuse of !important (12 instances)",
|
456 |
+
"Color values defined in multiple places (inconsistent branding)",
|
457 |
+
"Media queries not mobile-first"
|
458 |
+
],
|
459 |
+
recommendations: [
|
460 |
+
"Remove all !important declarations and refactor specificity",
|
461 |
+
"Use CSS variables for brand colors",
|
462 |
+
"Restructure media queries to follow mobile-first approach"
|
463 |
+
],
|
464 |
+
codeExamples: [
|
465 |
+
{
|
466 |
+
bad: ".button { color: red !important; }",
|
467 |
+
good: ":root { --primary-color: #EF4444; }\n.button { color: var(--primary-color); }"
|
468 |
+
}
|
469 |
+
]
|
470 |
+
},
|
471 |
+
{
|
472 |
+
category: "JavaScript",
|
473 |
+
findings: [
|
474 |
+
"jQuery used where native methods would suffice",
|
475 |
+
"No error handling for API calls",
|
476 |
+
"Event listeners not properly removed"
|
477 |
+
],
|
478 |
+
recommendations: [
|
479 |
+
"Replace simple jQuery selectors with document.querySelector",
|
480 |
+
"Add try/catch blocks for all API calls",
|
481 |
+
"Implement proper cleanup of event listeners"
|
482 |
+
],
|
483 |
+
codeExamples: [
|
484 |
+
{
|
485 |
+
bad: "$('.button').click(function() {...});",
|
486 |
+
good: "document.querySelector('.button').addEventListener('click', () => {...});"
|
487 |
+
}
|
488 |
+
]
|
489 |
+
}
|
490 |
+
],
|
491 |
+
summary: {
|
492 |
+
functionalScore: "3/6",
|
493 |
+
functionalPercentage: 50,
|
494 |
+
uxScore: "45%",
|
495 |
+
accessibilityScore: "68/100",
|
496 |
+
performanceScore: "82/100",
|
497 |
+
overallScore: 65,
|
498 |
+
keyFindings: [
|
499 |
+
"Critical accessibility issue: 9 images missing alt text",
|
500 |
+
"Form submission fails with server error",
|
501 |
+
"Color misuse: red used for confirmation actions",
|
502 |
+
"Semantic HTML structure needs improvement",
|
503 |
+
"Multiple CSS anti-patterns detected"
|
504 |
+
],
|
505 |
+
screenshots: [
|
506 |
+
{
|
507 |
+
url: "https://via.placeholder.com/600x400/FF0000/FFFFFF?text=Red+Confirmation+Button",
|
508 |
+
description: "Red color used for confirmation button"
|
509 |
+
},
|
510 |
+
{
|
511 |
+
url: "https://via.placeholder.com/600x400/FFFFFF/000000?text=Unlabeled+Form",
|
512 |
+
description: "Form fields missing labels"
|
513 |
+
}
|
514 |
+
]
|
515 |
+
}
|
516 |
+
};
|
517 |
+
|
518 |
+
// Tab functionality
|
519 |
+
document.querySelectorAll('.tab-button').forEach(btn => {
|
520 |
+
btn.addEventListener('click', () => {
|
521 |
+
document.querySelectorAll('.tab-button').forEach(b => {
|
522 |
+
b.classList.remove('active', 'text-gray-800');
|
523 |
+
b.classList.add('text-gray-500');
|
524 |
+
});
|
525 |
+
document.querySelectorAll('.tab-content').forEach(c => c.classList.add('hidden'));
|
526 |
+
|
527 |
+
btn.classList.add('active', 'text-gray-800');
|
528 |
+
btn.classList.remove('text-gray-500');
|
529 |
+
const tabId = btn.getAttribute('data-tab');
|
530 |
+
document.getElementById(tabId).classList.remove('hidden');
|
531 |
+
});
|
532 |
+
});
|
533 |
+
|
534 |
+
// Run tests button
|
535 |
+
document.getElementById('runTestsBtn').addEventListener('click', async () => {
|
536 |
+
const url = document.getElementById('urlInput').value.trim();
|
537 |
+
if (!url) {
|
538 |
+
alert('Please enter a valid URL');
|
539 |
+
return;
|
540 |
+
}
|
541 |
+
|
542 |
+
// Show loading indicator
|
543 |
+
document.getElementById('loadingIndicator').classList.remove('hidden');
|
544 |
+
document.getElementById('resultsContainer').classList.add('hidden');
|
545 |
+
document.getElementById('aiChatContainer').classList.remove('hidden');
|
546 |
+
|
547 |
+
// Add initial AI message
|
548 |
+
addAIMessage("Initializing website analysis for: " + url);
|
549 |
+
addAIMessage("Starting headless browser session to capture page structure...");
|
550 |
+
|
551 |
+
// Simulate progress (in a real app, this would be based on actual test progress)
|
552 |
+
let progress = 0;
|
553 |
+
const progressInterval = setInterval(() => {
|
554 |
+
progress += Math.random() * 10;
|
555 |
+
if (progress > 100) progress = 100;
|
556 |
+
document.getElementById('progressBar').style.width = `${progress}%`;
|
557 |
+
document.getElementById('progressText').textContent = getProgressMessage(progress);
|
558 |
+
|
559 |
+
// Add AI messages at certain progress points
|
560 |
+
if (progress > 20 && progress < 25) {
|
561 |
+
addAIMessage("Capturing page structure and generating test cases...");
|
562 |
+
}
|
563 |
+
if (progress > 40 && progress < 45) {
|
564 |
+
addAIMessage("Analyzing color usage and contrast ratios...");
|
565 |
+
}
|
566 |
+
if (progress > 60 && progress < 65) {
|
567 |
+
addAIMessage("Evaluating semantic HTML structure...");
|
568 |
+
}
|
569 |
+
if (progress > 80 && progress < 85) {
|
570 |
+
addAIMessage("Generating improvement recommendations...");
|
571 |
+
}
|
572 |
+
|
573 |
+
if (progress === 100) {
|
574 |
+
clearInterval(progressInterval);
|
575 |
+
addAIMessage("Analysis complete! Generating final report...");
|
576 |
+
setTimeout(() => {
|
577 |
+
showResults();
|
578 |
+
}, 1000);
|
579 |
+
}
|
580 |
+
}, 500);
|
581 |
+
});
|
582 |
+
|
583 |
+
function addAIMessage(message) {
|
584 |
+
const chatContainer = document.getElementById('aiChat');
|
585 |
+
const messageDiv = document.createElement('div');
|
586 |
+
messageDiv.className = 'flex items-start';
|
587 |
+
messageDiv.innerHTML = `
|
588 |
+
<div class="flex-shrink-0 mr-3 mt-1">
|
589 |
+
<div class="w-8 h-8 rounded-full bg-blue-100 flex items-center justify-center">
|
590 |
+
<i class="fas fa-robot text-blue-600"></i>
|
591 |
+
</div>
|
592 |
+
</div>
|
593 |
+
<div class="bg-gray-100 px-4 py-2 rounded-lg text-gray-700">${message}</div>
|
594 |
+
`;
|
595 |
+
chatContainer.appendChild(messageDiv);
|
596 |
+
chatContainer.scrollTop = chatContainer.scrollHeight;
|
597 |
+
}
|
598 |
+
|
599 |
+
function getProgressMessage(progress) {
|
600 |
+
if (progress < 20) return "Initializing AI analysis engine...";
|
601 |
+
if (progress < 40) return "Capturing page structure...";
|
602 |
+
if (progress < 60) return "Running automated tests...";
|
603 |
+
if (progress < 80) return "Analyzing UX patterns...";
|
604 |
+
if (progress < 95) return "Generating recommendations...";
|
605 |
+
return "Finalizing report...";
|
606 |
+
}
|
607 |
+
|
608 |
+
function showResults() {
|
609 |
+
document.getElementById('loadingIndicator').classList.add('hidden');
|
610 |
+
document.getElementById('resultsContainer').classList.remove('hidden');
|
611 |
+
|
612 |
+
// Set current date
|
613 |
+
const now = new Date();
|
614 |
+
document.getElementById('analysisDate').textContent = now.toLocaleString();
|
615 |
+
|
616 |
+
// Update overall score ring
|
617 |
+
const overallScore = mockTestResults.summary.overallScore;
|
618 |
+
const circumference = 283;
|
619 |
+
const offset = circumference - (overallScore / 100) * circumference;
|
620 |
+
document.getElementById('overallScoreRing').style.strokeDashoffset = offset;
|
621 |
+
document.getElementById('overallScore').textContent = `${overallScore}%`;
|
622 |
+
|
623 |
+
// Populate summary
|
624 |
+
document.getElementById('functionalScore').textContent = mockTestResults.summary.functionalScore;
|
625 |
+
document.getElementById('functionalProgress').style.width = `${mockTestResults.summary.functionalPercentage}%`;
|
626 |
+
document.getElementById('uxScore').textContent = mockTestResults.summary.uxScore;
|
627 |
+
document.getElementById('uxProgress').style.width = mockTestResults.summary.uxScore;
|
628 |
+
document.getElementById('accessibilityScore').textContent = mockTestResults.summary.accessibilityScore;
|
629 |
+
document.getElementById('accessibilityProgress').style.width = mockTestResults.summary.accessibilityScore;
|
630 |
+
document.getElementById('performanceScore').textContent = mockTestResults.summary.performanceScore;
|
631 |
+
document.getElementById('performanceProgress').style.width = mockTestResults.summary.performanceScore;
|
632 |
+
|
633 |
+
const keyFindingsContainer = document.getElementById('keyFindings');
|
634 |
+
keyFindingsContainer.innerHTML = '';
|
635 |
+
mockTestResults.summary.keyFindings.forEach(finding => {
|
636 |
+
const div = document.createElement('div');
|
637 |
+
div.className = 'bg-gray-50 p-4 rounded-lg';
|
638 |
+
div.innerHTML = `
|
639 |
+
<div class="flex items-start">
|
640 |
+
<span class="flex-shrink-0 mt-1 mr-3">
|
641 |
+
<i class="fas ${finding.includes('Critical') ? 'fa-exclamation-circle text-red-500' : 'fa-info-circle text-blue-500'}"></i>
|
642 |
+
</span>
|
643 |
+
<span class="text-gray-700">${finding}</span>
|
644 |
+
</div>
|
645 |
+
`;
|
646 |
+
keyFindingsContainer.appendChild(div);
|
647 |
+
});
|
648 |
+
|
649 |
+
// Populate visual issues
|
650 |
+
const visualIssuesContainer = document.getElementById('visualIssues');
|
651 |
+
visualIssuesContainer.innerHTML = '';
|
652 |
+
mockTestResults.summary.screenshots.forEach(screenshot => {
|
653 |
+
const div = document.createElement('div');
|
654 |
+
div.className = 'bg-white p-3 rounded-lg border border-gray-200';
|
655 |
+
div.innerHTML = `
|
656 |
+
<img src="${screenshot.url}" alt="${screenshot.description}" class="w-full h-auto rounded mb-2">
|
657 |
+
<p class="text-sm text-gray-600">${screenshot.description}</p>
|
658 |
+
`;
|
659 |
+
visualIssuesContainer.appendChild(div);
|
660 |
+
});
|
661 |
+
|
662 |
+
// Populate functional tests
|
663 |
+
const functionalResultsContainer = document.getElementById('functionalResults');
|
664 |
+
functionalResultsContainer.innerHTML = '';
|
665 |
+
mockTestResults.functional.forEach(test => {
|
666 |
+
const div = document.createElement('div');
|
667 |
+
div.className = `p-4 rounded-lg mb-3 ${
|
668 |
+
test.status === 'pass' ? 'bg-green-50 border border-green-200' : 'bg-red-50 border border-red-200'
|
669 |
+
}`;
|
670 |
+
|
671 |
+
let elementsHtml = '';
|
672 |
+
if (test.element) {
|
673 |
+
elementsHtml = `<p class="mt-1 text-sm text-gray-500">Element: <code class="bg-gray-100 px-1 py-0.5 rounded">${test.element}</code></p>`;
|
674 |
+
} else if (test.elements) {
|
675 |
+
elementsHtml = `<p class="mt-1 text-sm text-gray-500">Elements: ${test.elements.map(el => `<code class="bg-gray-100 px-1 py-0.5 rounded">${el}</code>`).join(', ')}</p>`;
|
676 |
+
}
|
677 |
+
|
678 |
+
div.innerHTML = `
|
679 |
+
<div class="flex justify-between items-start">
|
680 |
+
<h3 class="font-medium">${test.name}</h3>
|
681 |
+
<span class="px-3 py-1 rounded-full text-xs font-medium ${
|
682 |
+
test.status === 'pass' ? 'bg-green-100 text-green-800' : 'bg-red-100 text-red-800'
|
683 |
+
}">
|
684 |
+
${test.status === 'pass' ? 'PASS' : 'FAIL'}
|
685 |
+
</span>
|
686 |
+
</div>
|
687 |
+
<p class="mt-2 text-gray-600">${test.description}</p>
|
688 |
+
${elementsHtml}
|
689 |
+
`;
|
690 |
+
functionalResultsContainer.appendChild(div);
|
691 |
+
});
|
692 |
+
|
693 |
+
// Populate UX analysis
|
694 |
+
const uxResultsContainer = document.getElementById('uxResults');
|
695 |
+
uxResultsContainer.innerHTML = '';
|
696 |
+
mockTestResults.ux.forEach(issue => {
|
697 |
+
const div = document.createElement('div');
|
698 |
+
div.className = `p-5 rounded-lg border ${
|
699 |
+
issue.severity === 'high' ? 'border-red-200 bg-red-50' :
|
700 |
+
issue.severity === 'medium' ? 'border-yellow-200 bg-yellow-50' :
|
701 |
+
'border-green-200 bg-green-50'
|
702 |
+
}`;
|
703 |
+
|
704 |
+
let screenshotHtml = '';
|
705 |
+
if (issue.screenshot) {
|
706 |
+
screenshotHtml = `
|
707 |
+
<div class="mt-4">
|
708 |
+
<p class="text-sm text-gray-500 mb-1">Screenshot:</p>
|
709 |
+
<img src="${issue.screenshot}" alt="${issue.issue}" class="w-full h-auto rounded">
|
710 |
+
</div>
|
711 |
+
`;
|
712 |
+
}
|
713 |
+
|
714 |
+
div.innerHTML = `
|
715 |
+
<div class="flex justify-between items-start">
|
716 |
+
<h3 class="font-medium">${issue.issue}</h3>
|
717 |
+
<span class="px-3 py-1 rounded-full text-xs font-medium ${
|
718 |
+
issue.severity === 'high' ? 'bg-red-100 text-red-800' :
|
719 |
+
issue.severity === 'medium' ? 'bg-yellow-100 text-yellow-800' :
|
720 |
+
'bg-green-100 text-green-800'
|
721 |
+
}">
|
722 |
+
${issue.severity.toUpperCase()}
|
723 |
+
</span>
|
724 |
+
</div>
|
725 |
+
<p class="mt-2 text-gray-600">${issue.description}</p>
|
726 |
+
${issue.element ? `<p class="mt-1 text-sm text-gray-500">Element: <code class="bg-gray-100 px-1 py-0.5 rounded">${issue.element}</code></p>` : ''}
|
727 |
+
<div class="mt-3 p-3 bg-white rounded border border-gray-200">
|
728 |
+
<h4 class="font-medium text-gray-800 mb-1">Recommendation</h4>
|
729 |
+
<p class="text-gray-700">${issue.recommendation}</p>
|
730 |
+
</div>
|
731 |
+
${screenshotHtml}
|
732 |
+
`;
|
733 |
+
uxResultsContainer.appendChild(div);
|
734 |
+
});
|
735 |
+
|
736 |
+
// Populate accessibility
|
737 |
+
const accessibilityResultsContainer = document.getElementById('accessibilityResults');
|
738 |
+
accessibilityResultsContainer.innerHTML = '';
|
739 |
+
mockTestResults.accessibility.forEach(issue => {
|
740 |
+
const div = document.createElement('div');
|
741 |
+
div.className = `p-5 rounded-lg border ${
|
742 |
+
issue.severity === 'high' ? 'border-red-200 bg-red-50' :
|
743 |
+
issue.severity === 'medium' ? 'border-yellow-200 bg-yellow-50' :
|
744 |
+
'border-green-200 bg-green-50'
|
745 |
+
}`;
|
746 |
+
|
747 |
+
let screenshotHtml = '';
|
748 |
+
if (issue.screenshot) {
|
749 |
+
screenshotHtml = `
|
750 |
+
<div class="mt-4">
|
751 |
+
<p class="text-sm text-gray-500 mb-1">Screenshot:</p>
|
752 |
+
<img src="${issue.screenshot}" alt="${issue.issue}" class="w-full h-auto rounded">
|
753 |
+
</div>
|
754 |
+
`;
|
755 |
+
}
|
756 |
+
|
757 |
+
div.innerHTML = `
|
758 |
+
<div class="flex justify-between items-start">
|
759 |
+
<h3 class="font-medium">${issue.issue}</h3>
|
760 |
+
<span class="px-3 py-1 rounded-full text-xs font-medium ${
|
761 |
+
issue.severity === 'high' ? 'bg-red-100 text-red-800' :
|
762 |
+
issue.severity === 'medium' ? 'bg-yellow-100 text-yellow-800' :
|
763 |
+
'bg-green-100 text-green-800'
|
764 |
+
}">
|
765 |
+
${issue.severity.toUpperCase()}
|
766 |
+
</span>
|
767 |
+
</div>
|
768 |
+
<p class="mt-2 text-gray-600">${issue.description}</p>
|
769 |
+
${issue.elements ? `<p class="mt-1 text-sm text-gray-500">Elements: ${issue.elements.map(el => `<code class="bg-gray-100 px-1 py-0.5 rounded">${el}</code>`).join(', ')}</p>` : ''}
|
770 |
+
<div class="mt-3 p-3 bg-white rounded border border-gray-200">
|
771 |
+
<h4 class="font-medium text-gray-800 mb-1">Recommendation</h4>
|
772 |
+
<p class="text-gray-700">${issue.recommendation}</p>
|
773 |
+
</div>
|
774 |
+
${screenshotHtml}
|
775 |
+
`;
|
776 |
+
accessibilityResultsContainer.appendChild(div);
|
777 |
+
});
|
778 |
+
|
779 |
+
// Populate AI analysis
|
780 |
+
const aiAnalysisContainer = document.getElementById('aiAnalysisResults');
|
781 |
+
aiAnalysisContainer.innerHTML = '';
|
782 |
+
mockTestResults.aiAnalysis.forEach(category => {
|
783 |
+
const div = document.createElement('div');
|
784 |
+
div.className = 'bg-white p-5 rounded-lg border border-gray-200 shadow-sm';
|
785 |
+
|
786 |
+
let findingsHtml = '<ul class="list-disc pl-5 mt-2 space-y-1">';
|
787 |
+
category.findings.forEach(finding => {
|
788 |
+
findingsHtml += `<li class="text-gray-700">${finding}</li>`;
|
789 |
+
});
|
790 |
+
findingsHtml += '</ul>';
|
791 |
+
|
792 |
+
let recommendationsHtml = '<ul class="list-disc pl-5 mt-2 space-y-1">';
|
793 |
+
category.recommendations.forEach(recommendation => {
|
794 |
+
recommendationsHtml += `<li class="text-green-600">${recommendation}</li>`;
|
795 |
+
});
|
796 |
+
recommendationsHtml += '</ul>';
|
797 |
+
|
798 |
+
let codeExamplesHtml = '';
|
799 |
+
if (category.codeExamples && category.codeExamples.length > 0) {
|
800 |
+
codeExamplesHtml = '<div class="mt-4 space-y-4">';
|
801 |
+
category.codeExamples.forEach(example => {
|
802 |
+
codeExamplesHtml += `
|
803 |
+
<div>
|
804 |
+
<p class="text-sm font-medium text-gray-700 mb-1">Bad Practice:</p>
|
805 |
+
<div class="code-block">${example.bad}</div>
|
806 |
+
<p class="text-sm font-medium text-gray-700 mt-3 mb-1">Recommended:</p>
|
807 |
+
<div class="code-block">${example.good}</div>
|
808 |
+
</div>
|
809 |
+
`;
|
810 |
+
});
|
811 |
+
codeExamplesHtml += '</div>';
|
812 |
+
}
|
813 |
+
|
814 |
+
div.innerHTML = `
|
815 |
+
<h3 class="text-lg font-semibold text-gray-800 mb-3">${category.category}</h3>
|
816 |
+
<div class="mt-3">
|
817 |
+
<h4 class="font-medium text-gray-700">Findings:</h4>
|
818 |
+
${findingsHtml}
|
819 |
+
</div>
|
820 |
+
<div class="mt-4">
|
821 |
+
<h4 class="font-medium text-green-600">Recommendations:</h4>
|
822 |
+
${recommendationsHtml}
|
823 |
+
</div>
|
824 |
+
${codeExamplesHtml}
|
825 |
+
`;
|
826 |
+
aiAnalysisContainer.appendChild(div);
|
827 |
+
});
|
828 |
+
}
|
829 |
+
|
830 |
+
// Download report button
|
831 |
+
document.getElementById('downloadReportBtn').addEventListener('click', () => {
|
832 |
+
alert('In a real implementation, this would generate and download a PDF report with all test results and AI recommendations.');
|
833 |
+
});
|
834 |
+
|
835 |
+
// Share results button
|
836 |
+
document.getElementById('shareResultsBtn').addEventListener('click', () => {
|
837 |
+
alert('In a real implementation, this would allow sharing results via email or generating a shareable link.');
|
838 |
+
});
|
839 |
+
|
840 |
+
// For demonstration, show the mock results on page load
|
841 |
+
window.addEventListener('load', () => {
|
842 |
+
// Uncomment to auto-populate with mock data for demo
|
843 |
+
// document.getElementById('urlInput').value = 'https://example.com';
|
844 |
+
// showResults();
|
845 |
+
});
|
846 |
+
</script>
|
847 |
+
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Doeee/test" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
848 |
+
</html>
|
prompts.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
You are a senior full-stack developer and AI engineer. Build a tool that allows users to input any URL. The tool must do the following: 1. Load the webpage in a headless browser (like Selenium, Playwright, or Puppeteer). 2. Auto-generate frontend test cases using best practices (e.g., test if the page loads, buttons work, forms submit, elements are clickable). 3. Use AI (GPT) to analyze the full HTML, CSS, and visible structure of the page and identify bad practices or UX issues. This includes: • Color misuse (e.g., red for confirmation buttons) • Accessibility problems (e.g., missing alt text, low contrast) • Semantic structure problems (e.g., heading levels, missing labels) • General UI/UX anti-patterns 4. Execute the tests and show results to the user in a clean, readable report. 5. Include a recommendation section with improvement suggestions generated by GPT. Output should include: • Functional test results (pass/fail + descriptions) • UX/UI best-practice analysis • Screenshots of problematic sections (optional) • A downloadable or web-viewable report. use Chat GPT style.
|
2 |
+
use this site style. "https://bolt.new/"
|
3 |
+
change style to https://chatgpt.com/
|