mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-06 06:48:21 +00:00
Add data-cy for error page component (#8152)
This commit is contained in:
parent
74e06878b5
commit
0291ac0882
1 changed files with 8 additions and 2 deletions
|
|
@ -45,8 +45,12 @@ export const ErrorModal = ({ errorMsg, ...props }) => {
|
|||
fill="#E54D2E"
|
||||
/>
|
||||
</svg>
|
||||
<span className="header-text">{t('globals.static-error-modal.title', errorMsg?.title)}</span>
|
||||
<p className="description">{t('globals.static-error-modal.description', errorMsg?.message)}</p>
|
||||
<span className="header-text" data-cy="modal-header">
|
||||
{t('globals.static-error-modal.title', errorMsg?.title)}
|
||||
</span>
|
||||
<p className="description" data-cy="modal-description">
|
||||
{t('globals.static-error-modal.description', errorMsg?.message)}
|
||||
</p>
|
||||
</Modal.Header>
|
||||
<Modal.Footer>
|
||||
{errorMsg?.retry && (
|
||||
|
|
@ -62,6 +66,7 @@ export const ErrorModal = ({ errorMsg, ...props }) => {
|
|||
alignItems: 'center',
|
||||
}}
|
||||
onClick={() => window.history.back()}
|
||||
data-cy="retry-button"
|
||||
>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
|
|
@ -84,6 +89,7 @@ export const ErrorModal = ({ errorMsg, ...props }) => {
|
|||
<button
|
||||
className={errorMsg?.retry ? 'btn btn-primary' : 'btn btn-primary action-btn'}
|
||||
onClick={() => redirectToDashboard()}
|
||||
data-cy="back-to-home-button"
|
||||
>
|
||||
{t('globals.workspace-modal.continue-btn', errorMsg?.cta)}
|
||||
</button>
|
||||
|
|
|
|||
Loading…
Reference in a new issue