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

Testbench: New UI and Refactor #2366

Merged
merged 11 commits into from
Aug 27, 2021
Merged

Conversation

gr455
Copy link
Member

@gr455 gr455 commented Jul 30, 2021

  • Implemented new UI
  • Detailed Results UI
  • Creator Integration with simulator
  • Serving simulator view through rails and webpack

New UI

Creator reordering

 - 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
@commit-lint
Copy link

commit-lint bot commented Jul 30, 2021

Testbench

  • Refactor data and fix many bugs (6fbc41c)

Contributors

gr455

Commit-Lint commands

You can trigger Commit-Lint actions by commenting on this PR:

  • @Commit-Lint merge patch will merge dependabot PR on "patch" versions (X.X.Y - Y change)
  • @Commit-Lint merge minor will merge dependabot PR on "minor" versions (X.Y.Y - Y change)
  • @Commit-Lint merge major will merge dependabot PR on "major" versions (Y.Y.Y - Y change)
  • @Commit-Lint merge disable will desactivate merge dependabot PR
  • @Commit-Lint review will approve dependabot PR
  • @Commit-Lint stop review will stop approve dependabot PR

Copy link

@accesslint accesslint bot left a 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--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>
Copy link

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--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>
Copy link

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--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>
Copy link

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--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>
Copy link

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.

@coveralls
Copy link

coveralls commented Jul 30, 2021

Coverage Status

Coverage decreased (-0.1%) to 84.602% when pulling 23d2880 on gr455:tb-ui-2 into 373bdb9 on CircuitVerse:testbench.

 - 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
@gr455 gr455 changed the title Testbench/UI: New UI for Testbench on Simulator and Creator Testbench: New UI and Refactor Jul 31, 2021
@gr455 gr455 requested a review from satu0king July 31, 2021 12:10
oldTestbenchData.currentCase
);
}

Copy link
Member

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);
Copy link
Member

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?

Copy link
Member Author

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"
Copy link

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.

Copy link

@accesslint accesslint bot left a 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>
Copy link

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>
Copy link

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>
Copy link

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>
Copy link

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"
Copy link

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>
Copy link

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.

@satu0king satu0king merged commit f055222 into CircuitVerse:testbench Aug 27, 2021
tachyons added a commit that referenced this pull request Jan 25, 2022
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants