-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Testbench: New UI and Refactor #2366
Conversation
gr455
commented
Jul 30, 2021
•
edited
Loading
edited
- Implemented new UI
- Detailed Results UI
- Creator Integration with simulator
- Serving simulator view through rails and webpack
- Implemented new UI - Prototype Detailed Results UI
- Test is loaded when circuit is loaded - UI Fixes - Escaping user input before appending to DOM
- Testbench UI on simulator changes with theme
- Update TB on new circuit - Fix Testbench JSON dialog font color - Remove TB creator extra whitespace in identifiers - Hide TB UI from layoutMode
Testbench
ContributorsCommit-Lint commandsYou can trigger Commit-Lint actions by commenting on this PR:
|
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.
There are accessibility issues in these changes.
app/views/simulator/edit.html.erb
Outdated
<div style="overflow: auto; margin-bottom: 10px;"> | ||
<div class="tb-manual-test-buttons tb-group-buttons"> | ||
<span style="line-height: 24px; margin-right: 5px;"><b>Group: </b></span> | ||
<button class="custom-btn--primary panel-button tb-case-button-left tb-case-button" id="prev-group-btn"><i class="tb-case-arrow tb-case-arrow-left"></i></button> |
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.
Looks like this element is missing an accessible name or label. That makes it hard for people using screen readers or voice control to use the control.
app/views/simulator/edit.html.erb
Outdated
<span style="line-height: 24px; margin-right: 5px;"><b>Group: </b></span> | ||
<button class="custom-btn--primary panel-button tb-case-button-left tb-case-button" id="prev-group-btn"><i class="tb-case-arrow tb-case-arrow-left"></i></button> | ||
<span class="tb-test-label group-label"></span> | ||
<button class="custom-btn--primary panel-button tb-case-button-right tb-case-button" id="next-group-btn"><i class="tb-case-arrow tb-case-arrow-right"></i></button> |
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.
Looks like this element is missing an accessible name or label. That makes it hard for people using screen readers or voice control to use the control.
app/views/simulator/edit.html.erb
Outdated
</div> | ||
<div class="tb-manual-test-buttons tb-case-buttons"> | ||
<span style="line-height: 24px; margin-right: 5px;"><b>Case: </b></span> | ||
<button class="custom-btn--primary panel-button tb-case-button-left tb-case-button" id="prev-case-btn"><i class="tb-case-arrow tb-case-arrow-left"></i></button> |
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.
Looks like this element is missing an accessible name or label. That makes it hard for people using screen readers or voice control to use the control.
app/views/simulator/edit.html.erb
Outdated
<span style="line-height: 24px; margin-right: 5px;"><b>Case: </b></span> | ||
<button class="custom-btn--primary panel-button tb-case-button-left tb-case-button" id="prev-case-btn"><i class="tb-case-arrow tb-case-arrow-left"></i></button> | ||
<span class="tb-test-label case-label"></span> | ||
<button class="custom-btn--primary panel-button tb-case-button-right tb-case-button" id="next-case-btn"><i class="tb-case-arrow tb-case-arrow-right"></i></button> |
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.
Looks like this element is missing an accessible name or label. That makes it hard for people using screen readers or voice control to use the control.
- refactor: Use TestbenchData class to store testbench related data - feat: UI Buttons run validation everytime - fix: Copy pasting removes testbench data from scope - fix: Showing validation error causes circuit to block
oldTestbenchData.currentCase | ||
); | ||
} | ||
|
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.
Note this hack
* @param {number} caseIndex - Case index to set | ||
*/ | ||
setCase(groupIndex, caseIndex) { | ||
const newCase = new TestbenchData(this.testData, groupIndex, caseIndex); |
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.
Creating a new object here seems odd?
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.
That object is used to do temporary operations on to check if the case and group are valid, if they are valid then those changes are made to the real object
This commit adds popup to access creator from simulator. Also removes outdated code Signed-off-by: Ruturaj Mohite <mohite.ruturaj15@gmail.com>
style="display: none;" | ||
title="TestBench" | ||
title="Create Test" |
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.
Extra space detected where there should be no space.
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.
There are accessibility issues in these changes.
<div style="overflow: auto; margin-bottom: 10px;"> | ||
<div class="tb-manual-test-buttons tb-group-buttons"> | ||
<span style="line-height: 24px; margin-right: 5px;"><b>Group: </b></span> | ||
<button class="custom-btn--basic panel-button tb-case-button-left tb-case-button" id="prev-group-btn"><i class="tb-case-arrow tb-case-arrow-left"></i></button> |
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.
Looks like this element is missing an accessible name or label. That makes it hard for people using screen readers or voice control to use the control.
<span style="line-height: 24px; margin-right: 5px;"><b>Group: </b></span> | ||
<button class="custom-btn--basic panel-button tb-case-button-left tb-case-button" id="prev-group-btn"><i class="tb-case-arrow tb-case-arrow-left"></i></button> | ||
<span class="tb-test-label group-label"></span> | ||
<button class="custom-btn--basic panel-button tb-case-button-right tb-case-button" id="next-group-btn"><i class="tb-case-arrow tb-case-arrow-right"></i></button> |
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.
Looks like this element is missing an accessible name or label. That makes it hard for people using screen readers or voice control to use the control.
</div> | ||
<div class="tb-manual-test-buttons tb-case-buttons"> | ||
<span style="line-height: 24px; margin-right: 5px;"><b>Case: </b></span> | ||
<button class="custom-btn--basic panel-button tb-case-button-left tb-case-button" id="prev-case-btn"><i class="tb-case-arrow tb-case-arrow-left"></i></button> |
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.
Looks like this element is missing an accessible name or label. That makes it hard for people using screen readers or voice control to use the control.
<span style="line-height: 24px; margin-right: 5px;"><b>Case: </b></span> | ||
<button class="custom-btn--basic panel-button tb-case-button-left tb-case-button" id="prev-case-btn"><i class="tb-case-arrow tb-case-arrow-left"></i></button> | ||
<span class="tb-test-label case-label"></span> | ||
<button class="custom-btn--basic panel-button tb-case-button-right tb-case-button" id="next-case-btn"><i class="tb-case-arrow tb-case-arrow-right"></i></button> |
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.
Looks like this element is missing an accessible name or label. That makes it hard for people using screen readers or voice control to use the control.
- Validation UI shows list of validation errors - Auto fix to fix bitwidth errors Signed-off-by: Ruturaj Mohite <mohite.ruturaj15@gmail.com>
style="display: none;" | ||
title="TestBench" | ||
title="Testbench Validation" |
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.
Extra space detected where there should be no space.
Signed-off-by: Ruturaj Mohite <mohite.ruturaj15@gmail.com>
Signed-off-by: Ruturaj Mohite <mohite.ruturaj15@gmail.com>
</div> | ||
</div> | ||
|
||
</body> |
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.
Missing a trailing newline at the end of the file.
* Testbench/Engine: Add Engine support for combinational tests - UI for creating tests (for now served as a static html file) - Implemented testbench engine for Combinational Tests - Validation for I/O, Clock and Reset pins - Runs tests as fast as possible without rendering(to increase speed) on Simulator - Currently uses Labels for identification of I/O. To be deprecated in favour of identifiers * Testbench engine stops the clock and runs tests by controlling the clock itself. This is required so that tests are not throttled by clock time. * Testbench engine returns test results with observed output next to expected output * Testbench engine returns with failure message on validation failure * Testbench/Engine: Support Sequential Tests for RUNALL - Engine now supports sequential tests - Clock ticks full cycle when inputs are propagated - Reset is triggered at the end of each Set * Testbench/Engine: Add Manual Mode and UI Added Manual Mode that lets user step through tests and run a single test at a time. Manual Mode can be accessed in Tools > Use TestBench > Run Manually on the simulator. Change log: - Added Manual Mode UI - Added styles for Manual Mode UI - Added Engine functions for Manual Mode - Improved ESLint compliance * Testbench: Fix UI and Creator Fixes - Fixed Manual Mode allignment - Fixed Creator Labels getting extra whitespace * TestBench/Creator: Creator UI Additions - Added interface to delete inputs/outputs and cases - Added showError to testbench on simulator to display validation errors * Redo undone i18n * Validate proper JSON input * Testbench: New UI and Refactor (#2366) * Testbench/UI: New UI for Testbench on Simulator - Implemented new UI - Prototype Detailed Results UI * Testbench/Data: Persist test in Circuit's backupData - Test is loaded when circuit is loaded - UI Fixes - Escaping user input before appending to DOM * Testbench/Creator: Add case reordering for Test Creator * Testbench/UI: Themes Compatibility - Testbench UI on simulator changes with theme * Testbench/UI: Fix Multiple UI Issues - Update TB on new circuit - Fix Testbench JSON dialog font color - Remove TB creator extra whitespace in identifiers - Hide TB UI from layoutMode * Testbench: Refactor data and fix many bugs - refactor: Use TestbenchData class to store testbench related data - feat: UI Buttons run validation every time - fix: Copy pasting removes testbench data from scope - fix: Showing validation error causes circuit to block * Testbench/Creator: Add popUp for creator from simulator This commit adds popup to access creator from simulator. Also removes outdated code Signed-off-by: Ruturaj Mohite <mohite.ruturaj15@gmail.com> * Testbench/UI: Add Validation UI - Validation UI shows list of validation errors - Auto fix to fix bitwidth errors Signed-off-by: Ruturaj Mohite <mohite.ruturaj15@gmail.com> * Testbench/Creator: Improve result UI Signed-off-by: Ruturaj Mohite <mohite.ruturaj15@gmail.com> * Testbench/Creator: Server Creator through rails and webpack Signed-off-by: Ruturaj Mohite <mohite.ruturaj15@gmail.com> * Fix: Creator table helper fix * Feat: Import and export tests using CSV files Signed-off-by: Ruturaj Mohite <mohite.ruturaj15@gmail.com> Co-authored-by: Aboobacker MK <aboobackervyd@gmail.com>