mirror of
https://github.com/ansible/awx.git
synced 2026-01-15 11:50:42 -03:30
Remove close button from Project and Job Template details views
This commit is contained in:
parent
f57cf03f4b
commit
583d1390d2
@ -137,14 +137,6 @@ function ProjectDetail({ project, i18n }) {
|
||||
{i18n._(t`Edit`)}
|
||||
</Button>
|
||||
)}
|
||||
<Button
|
||||
variant="secondary"
|
||||
aria-label={i18n._(t`close`)}
|
||||
component={Link}
|
||||
to="/projects"
|
||||
>
|
||||
{i18n._(t`Close`)}
|
||||
</Button>
|
||||
</ActionButtonWrapper>
|
||||
</CardBody>
|
||||
);
|
||||
|
||||
@ -186,16 +186,4 @@ describe('<ProjectDetail />', () => {
|
||||
.simulate('click', { button: 0 });
|
||||
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>
|
||||
)}
|
||||
<Button
|
||||
variant="secondary"
|
||||
component={Link}
|
||||
to="/templates"
|
||||
aria-label={i18n._(t`Close`)}
|
||||
>
|
||||
{i18n._(t`Close`)}
|
||||
</Button>
|
||||
</ButtonGroup>
|
||||
</CardBody>
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user