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:
softwarefactory-project-zuul[bot] 2019-10-25 14:43:07 +00:00 committed by GitHub
commit 3dc8a10e85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 0 additions and 28 deletions

View File

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

View File

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

View File

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