Remove close button from Project and Job Template details views

This commit is contained in:
mabashian
2019-10-24 16:17:37 -04:00
parent f57cf03f4b
commit 583d1390d2
3 changed files with 0 additions and 28 deletions

View File

@@ -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>
); );

View File

@@ -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');
});
}); });

View File

@@ -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>
) )