Skip to content

Commit

Permalink
Remember focus between tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bearfriend committed Jul 25, 2023
1 parent b3230de commit 3a5371a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/server/pause.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ runBtn.addEventListener('click', run);
const testName = document.querySelector('#test-name');

/* eslint-disable no-undef, no-invalid-this */
let currentTest;
let currentTest, focusEl = runBtn;
beforeEach(async function() {
const fixture = new Promise(r => test.update = r);

Expand Down Expand Up @@ -163,6 +163,7 @@ function start() {
}

function run() {
focusEl = runBtn;
runBtn.disabled = true;
skipBtn.disabled = true;
test.run();
Expand All @@ -175,6 +176,7 @@ function runAll() {
}

function skip() {
focusEl = skipBtn;
run();
try {
currentTest.skip();
Expand Down

0 comments on commit 3a5371a

Please sign in to comment.