mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-09 21:55:49 +00:00
Merge pull request #9011 from overleaf/jpa-better-render-error-message
[web] provide helpful error message when pdf rendering fails GitOrigin-RevId: abbe6f362fa362fadee197527463ee675760e581
This commit is contained in:
parent
6485731c98
commit
315414de1b
2 changed files with 16 additions and 2 deletions
|
@ -16,6 +16,14 @@ function PdfPreviewError({ error }) {
|
|||
return (
|
||||
<ErrorLogEntry title={t('pdf_rendering_error')}>
|
||||
{t('something_went_wrong_rendering_pdf')}
|
||||
|
||||
<Trans
|
||||
i18nKey="try_recompile_project_or_troubleshoot"
|
||||
components={[
|
||||
// eslint-disable-next-line react/jsx-key, jsx-a11y/anchor-has-content
|
||||
<a href="/learn/how-to/Resolving_access%2C_loading%2C_and_display_problems" />,
|
||||
]}
|
||||
/>
|
||||
</ErrorLogEntry>
|
||||
)
|
||||
|
||||
|
|
|
@ -557,7 +557,10 @@ describe('<PdfPreview/>', function () {
|
|||
|
||||
cy.wait('@compile-pdf-error')
|
||||
|
||||
cy.findByText('Something went wrong while rendering this PDF.')
|
||||
cy.contains('Something went wrong while rendering this PDF.')
|
||||
cy.contains(
|
||||
'Please try recompiling the project from scratch, and if that doesn’t help, follow our troubleshooting guide.'
|
||||
)
|
||||
cy.findByLabelText('Page 1').should('not.exist')
|
||||
})
|
||||
|
||||
|
@ -578,7 +581,10 @@ describe('<PdfPreview/>', function () {
|
|||
|
||||
cy.wait('@compile-pdf-corrupt')
|
||||
|
||||
cy.findByText('Something went wrong while rendering this PDF.')
|
||||
cy.contains('Something went wrong while rendering this PDF.')
|
||||
cy.contains(
|
||||
'Please try recompiling the project from scratch, and if that doesn’t help, follow our troubleshooting guide.'
|
||||
)
|
||||
cy.findByLabelText('Page 1').should('not.exist')
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Reference in a new issue