mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 08:21:15 +03:00
Merge pull request #6429 from marshmalien/5992-wf-doc-btn
Hookup WF documentation button to visualizer toolbar Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
commit
ca82f48c18
@ -46,6 +46,9 @@ const ActionButton = styled(Button)`
|
||||
`;
|
||||
ActionButton.displayName = 'ActionButton';
|
||||
|
||||
const DOCLINK =
|
||||
'https://docs.ansible.com/ansible-tower/latest/html/userguide/workflow_templates.html#ug-wf-editor';
|
||||
|
||||
function VisualizerToolbar({
|
||||
i18n,
|
||||
onClose,
|
||||
@ -95,9 +98,12 @@ function VisualizerToolbar({
|
||||
</ActionButton>
|
||||
</Tooltip>
|
||||
<ActionButton
|
||||
aria-label={i18n._(t`Workflow Documentation`)}
|
||||
id="visualizer-documentation"
|
||||
variant="plain"
|
||||
isDisabled
|
||||
component="a"
|
||||
target="_blank"
|
||||
href={DOCLINK}
|
||||
>
|
||||
<BookIcon />
|
||||
</ActionButton>
|
||||
|
@ -62,6 +62,14 @@ describe('VisualizerToolbar', () => {
|
||||
expect(wrapper.find('Badge').text()).toBe('1');
|
||||
});
|
||||
|
||||
test('Should display action buttons', () => {
|
||||
expect(wrapper.find('CompassIcon')).toHaveLength(1);
|
||||
expect(wrapper.find('WrenchIcon')).toHaveLength(1);
|
||||
expect(wrapper.find('BookIcon')).toHaveLength(1);
|
||||
expect(wrapper.find('RocketIcon')).toHaveLength(1);
|
||||
expect(wrapper.find('TrashAltIcon')).toHaveLength(1);
|
||||
});
|
||||
|
||||
test('Toggle Legend button dispatches as expected', () => {
|
||||
wrapper.find('CompassIcon').simulate('click');
|
||||
expect(dispatch).toHaveBeenCalledWith({ type: 'TOGGLE_LEGEND' });
|
||||
|
Loading…
Reference in New Issue
Block a user