mirror of
https://github.com/ansible/awx.git
synced 2026-02-02 01:58:09 -03:30
add more tests for header toolbar
This commit is contained in:
@@ -18,7 +18,6 @@ import {
|
||||
} from '@patternfly/react-icons';
|
||||
|
||||
const DOCLINK = 'https://docs.ansible.com/ansible-tower/latest/html/userguide/index.html';
|
||||
const KEY_ENTER = 13;
|
||||
|
||||
class PageHeaderToolbar extends Component {
|
||||
constructor (props) {
|
||||
@@ -27,19 +26,10 @@ class PageHeaderToolbar extends Component {
|
||||
|
||||
this.onHelpSelect = this.onHelpSelect.bind(this);
|
||||
this.onHelpToggle = this.onHelpToggle.bind(this);
|
||||
this.onLogoutKeyDown = this.onLogoutKeyDown.bind(this);
|
||||
this.onUserSelect = this.onUserSelect.bind(this);
|
||||
this.onUserToggle = this.onUserToggle.bind(this);
|
||||
}
|
||||
|
||||
onLogoutKeyDown ({ keyCode }) {
|
||||
const { onLogoutClick } = this.props;
|
||||
|
||||
if (keyCode === KEY_ENTER) {
|
||||
onLogoutClick();
|
||||
}
|
||||
}
|
||||
|
||||
onHelpSelect () {
|
||||
const { isHelpOpen } = this.state;
|
||||
|
||||
@@ -122,7 +112,6 @@ class PageHeaderToolbar extends Component {
|
||||
key="logout"
|
||||
component="button"
|
||||
onClick={onLogoutClick}
|
||||
onKeyDown={this.onLogoutKeyDown}
|
||||
>
|
||||
{i18n._(t`Logout`)}
|
||||
</DropdownItem>
|
||||
|
||||
Reference in New Issue
Block a user