Skip to content

Commit

Permalink
Disable skip button while running
Browse files Browse the repository at this point in the history
  • Loading branch information
bearfriend committed Jul 25, 2023
1 parent 0135b30 commit b3230de
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/server/pause.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -147,6 +149,7 @@ beforeEach(async function() {

if (test.pause) {
runBtn.disabled = false;
skipBtn.disabled = false;
runBtn.focus();
}
});
Expand All @@ -161,6 +164,7 @@ function start() {

function run() {
runBtn.disabled = true;
skipBtn.disabled = true;
test.run();
}

Expand Down

0 comments on commit b3230de

Please sign in to comment.