From aa3ea878d06bf2800b306bf7aad19b435c20b761 Mon Sep 17 00:00:00 2001 From: Danny Gleckler Date: Mon, 24 Jul 2023 16:55:54 -0400 Subject: [PATCH] Disable skip button while running --- src/server/pause.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/server/pause.js b/src/server/pause.js index 2612bcd1..e2a10468 100644 --- a/src/server/pause.js +++ b/src/server/pause.js @@ -117,9 +117,11 @@ const controls = ` document.body.insertAdjacentHTML('afterBegin', controls); -document.querySelector('#skip-button').addEventListener('click', skip); document.querySelector('#skip-all-button').addEventListener('click', skipAll); +const skipBtn = document.querySelector('#skip-button'); +skipBtn.addEventListener('click', skip); + const startBtn = document.querySelector('#start-button'); startBtn.addEventListener('click', start); @@ -147,6 +149,7 @@ beforeEach(async function() { if (test.pause) { runBtn.disabled = false; + skipBtn.disabled = false; runBtn.focus(); } }); @@ -161,6 +164,7 @@ function start() { function run() { runBtn.disabled = true; + skipBtn.disabled = true; test.run(); }