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

Keyboard shortcuts for 'Accept/Revert url/test' buttons #360

Merged

Conversation

sp2mbn
Copy link

@sp2mbn sp2mbn commented Sep 18, 2018

Description

  • Added shortcuts for Accept/Revert buttons and Shitf key as a modifier for Accept/Revert only selected test case
  • Fixed problem of executing shortcuts when cursor is in search input

Motivation and Context

#317

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

I hereby agree to the terms of the AET Contributor License Agreement.

@@ -60,14 +62,16 @@ define(['angularAMD', 'userSettingsService'], function (angularAMD) {
},
'221': function () {
scope.traverseTree('down');
}
},
'65': accept,
Copy link
Contributor

Choose a reason for hiding this comment

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

Great job!
What do you think, maybe we could remember ASCII codes in variables instead of add comment?

Copy link
Author

Choose a reason for hiding this comment

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

Actually we don't need to use ASCII codes at all and we can use event.key property instead of event.keyCode which is returning single character that identify keyboard buttons. I added new shortcuts using existing convention. If it is necessarily I can quick refactor it.

@@ -3410,6 +3410,9 @@ It is possible to search tests and URLs by the query. Searched fields are the UR
* use **[** / **]** to navigate between test's urls
* press **m** to show/hide layout mask (when available)
* press **←** / **→** to navigate between url's tabs
* press **a** for accepting suite/test/url
Copy link
Contributor

Choose a reason for hiding this comment

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

Please update only SuiteReportFeatures.md. I think that it isn't a good idea to update historical documentation ;)

}

function accept(event) {
clickButton('.button-blue', event);
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure that this is correct assumption, that element with class button-blue should be clicked on the accept event (the same for the button-red). More buttons also have those classes, e.g.:
2018-09-20_09h46_37

Maybe buttons for accepting/reverting should have their own identifiers?

Copy link
Author

@sp2mbn sp2mbn Sep 20, 2018

Choose a reason for hiding this comment

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

Assumption is that only buttons inside toolbar-bottom or tab-content-toolbar will be clicked (function clickButton is looking for those classes first and then looking in their child nodes proper buttons for click). "Save all changes" button is inside sidepanel so it will not be clicked.

@tkaik tkaik added the QA Required Requires manual tests, possible regression or impact on existing features. label Nov 16, 2018
@Asia95
Copy link

Asia95 commented Jan 22, 2019

tested, working well ✔️

@tkaik tkaik merged commit 3b85fa4 into wttech:master Jan 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
QA Required Requires manual tests, possible regression or impact on existing features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants