mirror of
https://github.com/HeyPuter/puter.git
synced 2026-08-25 23:46:51 +00:00
Add reset results functionality to test UI
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (push) Has been cancelled
release-please / release-please (push) Has been cancelled
test / test (18.x) (push) Has been cancelled
test / test (20.x) (push) Has been cancelled
test / test (22.x) (push) Has been cancelled
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (push) Has been cancelled
release-please / release-please (push) Has been cancelled
test / test (18.x) (push) Has been cancelled
test / test (20.x) (push) Has been cancelled
test / test (22.x) (push) Has been cancelled
- Introduced a "Reset results" button to clear test container backgrounds and remove error messages. - Implemented hover styles for the reset button to enhance user interaction. - Ensured the reset functionality hides the progress panel and resets progress tracking.
This commit is contained in:
@@ -255,6 +255,11 @@
|
||||
opacity: 0.8;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
#reset-results:hover {
|
||||
color: #333;
|
||||
text-decoration: none;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
@@ -653,6 +658,18 @@
|
||||
runTests();
|
||||
});
|
||||
|
||||
// Reset results functionality
|
||||
$('#reset-results').click(() => {
|
||||
// Clear all test container background colors
|
||||
$('.test-container').css('background-color', '');
|
||||
// Remove all error message pre elements
|
||||
$('.test-container pre').remove();
|
||||
// Hide progress panel if it's showing
|
||||
hideProgressPanel();
|
||||
// Reset progress tracking
|
||||
resetProgress();
|
||||
});
|
||||
|
||||
// Master checkbox functionality
|
||||
$('#master-checkbox').change(function() {
|
||||
const isChecked = $(this).prop('checked');
|
||||
@@ -704,6 +721,7 @@
|
||||
</label>
|
||||
<span id="test-counter"></span>
|
||||
<div style="flex: 1; text-align: right;">
|
||||
<span id="reset-results" style="margin-right: 20px; cursor: pointer; color: #666; text-decoration: underline; font-size: 14px;">Reset results</span>
|
||||
<button id="run-tests" style="margin-right: 30px;">Run Tests</button>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
Reference in New Issue
Block a user