mirror of
https://github.com/ansible/awx.git
synced 2026-01-16 04:10:44 -03:30
Merge pull request #5104 from mabashian/4985-close-button-details
Remove close button from Project and Job Template details views Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
commit
3dc8a10e85
@ -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');
|
||||
});
|
||||
});
|
||||
|
||||
@ -335,14 +335,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