-
Notifications
You must be signed in to change notification settings - Fork 90
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
Added a new 'Run all' button to interactive toolbar on the web interface #981
Changes from all commits
c7a9ad0
227d910
caa2b7b
abc5495
6dd0acc
f4cf239
691fe4d
3c11876
565b87b
1fe3225
fe22198
52c2fcb
8e22ac1
63f7103
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Introduced a new plan-level Run button to the toolbar on the interactive GUI. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ import { | |
ReloadButton, | ||
ResetButton, | ||
AbortButton, | ||
RunAllButton, | ||
SaveButton, | ||
} from "../Toolbar/InteractiveButtons"; | ||
import NavBreadcrumbs from "../Nav/NavBreadcrumbs"; | ||
|
@@ -63,6 +64,7 @@ class InteractiveReportComponent extends BaseReport { | |
this.resetAssertionStatus = this.resetAssertionStatus.bind(this); | ||
this.resetReport = this.resetReport.bind(this); | ||
this.abortTestplan = this.abortTestplan.bind(this); | ||
this.runAll = this.runAll.bind(this); | ||
this.reloadCode = this.reloadCode.bind(this); | ||
this.envCtrlCallback = this.envCtrlCallback.bind(this); | ||
this.handleClick = this.handleClick.bind(this); | ||
|
@@ -72,6 +74,7 @@ class InteractiveReportComponent extends BaseReport { | |
navWidth: `${INTERACTIVE_COL_WIDTH}em`, | ||
resetting: false, | ||
reloading: false, | ||
running: false, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So I looked at this new status and wonder two things:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
We only need that for logging the state of the progress. However, we could use another variable eg.: runtime_status which could replace resetting, reloading, aborting as well, but in that case need to refactor the related functionalities.
That makes sense. I will update the code. |
||
aborting: false, | ||
assertionStatus: defaultAssertionStatus, | ||
}; | ||
|
@@ -122,9 +125,12 @@ class InteractiveReportComponent extends BaseReport { | |
response.data.runtime_status === "finished" || | ||
response.data.runtime_status === "not_run" | ||
) { | ||
if (this.state.resetting){ | ||
if (this.state.resetting) { | ||
this.setState({ resetting: false }); | ||
} | ||
if (this.state.running) { | ||
this.setState({ running: false }); | ||
} | ||
} | ||
if ( | ||
!this.state.report || | ||
|
@@ -503,11 +509,33 @@ class InteractiveReportComponent extends BaseReport { | |
return shallowEntry; | ||
} | ||
|
||
/** | ||
* Send request of start all tests to server. | ||
*/ | ||
runAll() { | ||
if ( | ||
this.state.resetting || this.state.reloading || | ||
this.state.aborting || this.state.running | ||
) { | ||
return; | ||
} else { | ||
const updatedReportEntry = { | ||
...this.shallowReportEntry(this.state.filteredReport.report), | ||
runtime_status: "running", | ||
}; | ||
this.putUpdatedReportEntry(updatedReportEntry); | ||
this.setState({ running: true }); | ||
} | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Once the fixes for the active filter issues are in, we probably need to see if it is working with a filter expression. If not, we will need to extend support, I do not think that piece of the API is handling the filtering. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, it doesn't handle filtering, it starts everything. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As mentioned offline, this will be needed. |
||
|
||
/** | ||
* Reset the report state to "resetting" and request the change to server. | ||
*/ | ||
resetReport() { | ||
if (this.state.resetting || this.state.reloading || this.state.aborting) { | ||
if ( | ||
this.state.resetting || this.state.reloading || | ||
this.state.aborting || this.state.running | ||
) { | ||
return; | ||
} else { | ||
const updatedReportEntry = { | ||
|
@@ -523,7 +551,10 @@ class InteractiveReportComponent extends BaseReport { | |
* Send request of reloading report to server. | ||
*/ | ||
reloadCode() { | ||
if (this.state.resetting || this.state.reloading || this.state.aborting) { | ||
if ( | ||
this.state.resetting || this.state.reloading || | ||
this.state.aborting || this.state.running | ||
) { | ||
return; | ||
} | ||
let currentTime = new Date(); | ||
|
@@ -670,6 +701,12 @@ class InteractiveReportComponent extends BaseReport { | |
updateEmptyDisplayFunc={noop} | ||
updateTagsDisplayFunc={noop} | ||
extraButtons={[ | ||
<RunAllButton | ||
key="runall-button" | ||
running={this.state.running} | ||
runAllCbk={this.runAll} | ||
filter={this.state.filteredReport.filter.text} | ||
/>, | ||
<ReloadButton | ||
key="reload-button" | ||
reloading={this.state.reloading} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Loglines are a welcome addition, but I do not see it for the others. Also I wonder if it is INFO level already or perhaps USER_INFO.