mirror of
https://github.com/ansible/awx.git
synced 2026-02-25 23:16:01 -03:30
Remove close button from Project and Job Template details views
This commit is contained in:
@@ -137,14 +137,6 @@ function ProjectDetail({ project, i18n }) {
|
|||||||
{i18n._(t`Edit`)}
|
{i18n._(t`Edit`)}
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
<Button
|
|
||||||
variant="secondary"
|
|
||||||
aria-label={i18n._(t`close`)}
|
|
||||||
component={Link}
|
|
||||||
to="/projects"
|
|
||||||
>
|
|
||||||
{i18n._(t`Close`)}
|
|
||||||
</Button>
|
|
||||||
</ActionButtonWrapper>
|
</ActionButtonWrapper>
|
||||||
</CardBody>
|
</CardBody>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -186,16 +186,4 @@ describe('<ProjectDetail />', () => {
|
|||||||
.simulate('click', { button: 0 });
|
.simulate('click', { button: 0 });
|
||||||
expect(history.location.pathname).toEqual('/projects/1/edit');
|
expect(history.location.pathname).toEqual('/projects/1/edit');
|
||||||
});
|
});
|
||||||
|
|
||||||
test('close button should navigate to projects list', () => {
|
|
||||||
const history = createMemoryHistory();
|
|
||||||
const wrapper = mountWithContexts(<ProjectDetail project={mockProject} />, {
|
|
||||||
context: { router: { history } },
|
|
||||||
});
|
|
||||||
expect(wrapper.find('Button[aria-label="close"]').length).toBe(1);
|
|
||||||
wrapper
|
|
||||||
.find('Button[aria-label="close"] Link')
|
|
||||||
.simulate('click', { button: 0 });
|
|
||||||
expect(history.location.pathname).toEqual('/projects');
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -321,14 +321,6 @@ class JobTemplateDetail extends Component {
|
|||||||
)}
|
)}
|
||||||
</LaunchButton>
|
</LaunchButton>
|
||||||
)}
|
)}
|
||||||
<Button
|
|
||||||
variant="secondary"
|
|
||||||
component={Link}
|
|
||||||
to="/templates"
|
|
||||||
aria-label={i18n._(t`Close`)}
|
|
||||||
>
|
|
||||||
{i18n._(t`Close`)}
|
|
||||||
</Button>
|
|
||||||
</ButtonGroup>
|
</ButtonGroup>
|
||||||
</CardBody>
|
</CardBody>
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user