Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check to make sure testRun exists #112

Merged
merged 1 commit into from
Jun 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions ui/src/views/TestRunner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,15 +156,17 @@ export const TestRunner = () => {
const sepArray = testRunArrayCopy.find(({ sep }) => sep === test.sep);
if (sepArray) {
const testRun = sepArray.tests[testRunOrderMap[getTestRunId(test)]];
if (result) {
if (result.failureMode) {
sepArray.progress.failed++;
} else {
sepArray.progress.passed++;
if (testRun) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Ifropc I'm not sure if this is a correct fix, but at least it won't break the UI. It looks like the tests are still running, so we could look for ways to not run them at all.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Getting rid of delay would be nice, but it's ok for now

if (result) {
if (result.failureMode) {
sepArray.progress.failed++;
} else {
sepArray.progress.passed++;
}
numberOfTestsRun.current++;
}
numberOfTestsRun.current++;
testRun.result = result;
}
testRun.result = result;
}
setTestRunArray(testRunArrayCopy);

Expand Down