Skip to content

Commit

Permalink
re-push
Browse files Browse the repository at this point in the history
  • Loading branch information
howard-e committed Aug 24, 2021
1 parent c020d1c commit c3345b6
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions client/components/TestRun/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ const TestRun = ({ auth }) => {
};

const performButtonAction = async (action, index) => {
const saveForm = async (withResult = false) =>
const saveForm = async (withResult = false) => {
await handleUpdateTestPlanRunResultAction(
withResult
? {
Expand All @@ -177,6 +177,9 @@ const TestRun = ({ auth }) => {
state: testRunStateRef.current
}
);
if (withResult) return !!testRunResultRef.current;
return true;
};

switch (action) {
case 'goToTestAtIndex': {
Expand Down Expand Up @@ -208,7 +211,11 @@ const TestRun = ({ auth }) => {
if (testRendererSubmitButtonRef.current) {
testRendererSubmitButtonRef.current.click();
setIsTestSubmitClicked(true);
await saveForm(true);

// check to see if form was successfully submitted, if so, return to top of summary document
const forceFocusOnSave = await saveForm(true);
if (forceFocusOnSave)
if (titleRef.current) titleRef.current.focus();
}
break;
}
Expand Down

0 comments on commit c3345b6

Please sign in to comment.