-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-navigation.html
More file actions
163 lines (153 loc) · 5.25 KB
/
test-navigation.html
File metadata and controls
163 lines (153 loc) · 5.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ClueChain Navigation Test</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 20px;
background: #f5f5f5;
}
.test-container {
max-width: 800px;
margin: 0 auto;
background: white;
padding: 20px;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.test-section {
margin: 20px 0;
padding: 15px;
border: 1px solid #ddd;
border-radius: 5px;
}
.test-step {
margin: 10px 0;
padding: 10px;
background: #f9f9f9;
border-left: 4px solid #4a90e2;
}
.result {
margin: 10px 0;
padding: 10px;
border-radius: 4px;
}
.success {
background: #d4edda;
border: 1px solid #c3e6cb;
color: #155724;
}
.error {
background: #f8d7da;
border: 1px solid #f5c6cb;
color: #721c24;
}
.info {
background: #d1ecf1;
border: 1px solid #bee5eb;
color: #0c5460;
}
button {
background: #4a90e2;
color: white;
border: none;
padding: 10px 20px;
border-radius: 4px;
cursor: pointer;
margin: 5px;
}
button:hover {
background: #357abd;
}
iframe {
width: 100%;
height: 400px;
border: 1px solid #ddd;
border-radius: 4px;
}
</style>
</head>
<body>
<div class="test-container">
<h1>ClueChain Navigation & Game Reset Test</h1>
<div class="test-section">
<h2>Test Instructions</h2>
<div class="test-step">
<strong>Step 1:</strong> Open the main game in the iframe below
</div>
<div class="test-step">
<strong>Step 2:</strong> Use arrow navigation to go to July 3rd (or any past date)
</div>
<div class="test-step">
<strong>Step 3:</strong> Select 1 vowel and 2 consonants as prompted
</div>
<div class="test-step">
<strong>Step 4:</strong> Verify that 3 clues appear immediately after selection
</div>
<div class="test-step">
<strong>Step 5:</strong> Verify that selected letters appear in the paragraph
</div>
<div class="test-step">
<strong>Step 6:</strong> Navigate to a different date and repeat
</div>
</div>
<div class="test-section">
<h2>Expected Results</h2>
<div class="result success">
✓ Arrow navigation advances exactly one day at a time
</div>
<div class="result success">
✓ After letter selection, 3 clues appear immediately
</div>
<div class="result success">
✓ Selected letters fill in the paragraph text
</div>
<div class="result success">
✓ Game state resets properly when navigating between dates
</div>
<div class="result success">
✓ Dates without puzzles show "No puzzle available" message
</div>
</div>
<div class="test-section">
<h2>Test Controls</h2>
<button onclick="reloadGame()">Reload Game</button>
<button onclick="clearConsole()">Clear Console</button>
<button onclick="showConsole()">Show Console Messages</button>
</div>
<div class="test-section">
<h2>Game Instance</h2>
<iframe id="gameFrame" src="index.html"></iframe>
</div>
<div class="test-section">
<h2>Console Output</h2>
<div id="consoleOutput" style="background: #000; color: #0f0; padding: 10px; font-family: monospace; height: 200px; overflow-y: auto;"></div>
</div>
</div>
<script>
function reloadGame() {
document.getElementById('gameFrame').src = 'index.html?' + Date.now();
}
function clearConsole() {
document.getElementById('consoleOutput').innerHTML = '';
}
function showConsole() {
const consoleDiv = document.getElementById('consoleOutput');
consoleDiv.innerHTML += '<div>[' + new Date().toLocaleTimeString() + '] Test page loaded</div>';
}
// Capture console messages from iframe (if possible)
window.addEventListener('message', function(event) {
if (event.data && event.data.type === 'console') {
const consoleDiv = document.getElementById('consoleOutput');
consoleDiv.innerHTML += '<div>[' + new Date().toLocaleTimeString() + '] ' + event.data.message + '</div>';
consoleDiv.scrollTop = consoleDiv.scrollHeight;
}
});
// Initialize
showConsole();
</script>
</body>
</html>