added windows interaction test
adding more variant stuff
This commit is contained in:
@@ -306,6 +306,12 @@
|
||||
<div id="dbSyncMessage" class="message"></div>
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
<h2>Window Testing</h2>
|
||||
<button id="testWindowBtn" class="btn">Test: Save & Close Schematic Window</button>
|
||||
<div id="windowTestMessage" class="message"></div>
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
<h2>System Initialization</h2>
|
||||
<button id="initUserBtn" class="btn">Initialize User Environment</button>
|
||||
@@ -835,6 +841,36 @@
|
||||
loadVariants();
|
||||
});
|
||||
|
||||
// Window Testing
|
||||
const testWindowBtn = document.getElementById('testWindowBtn');
|
||||
const windowTestMessageEl = document.getElementById('windowTestMessage');
|
||||
|
||||
function showWindowTestMessage(text, type) {
|
||||
windowTestMessageEl.textContent = text;
|
||||
windowTestMessageEl.className = 'message ' + type;
|
||||
windowTestMessageEl.style.display = 'block';
|
||||
}
|
||||
|
||||
testWindowBtn.addEventListener('click', () => {
|
||||
testWindowBtn.disabled = true;
|
||||
showWindowTestMessage('Testing window interaction...', 'info');
|
||||
socket.emit('test_window_interaction');
|
||||
});
|
||||
|
||||
socket.on('window_test_status', (data) => {
|
||||
showWindowTestMessage(data.status, 'info');
|
||||
});
|
||||
|
||||
socket.on('window_test_complete', (data) => {
|
||||
showWindowTestMessage(data.message, 'success');
|
||||
testWindowBtn.disabled = false;
|
||||
});
|
||||
|
||||
socket.on('window_test_error', (data) => {
|
||||
showWindowTestMessage('Error: ' + data.error, 'error');
|
||||
testWindowBtn.disabled = false;
|
||||
});
|
||||
|
||||
// Close modals when clicking outside
|
||||
window.onclick = function(event) {
|
||||
if (event.target.className === 'modal') {
|
||||
|
||||
Reference in New Issue
Block a user