From d0fc0911fcb2991b7cf0c564c79eb545175d12c6 Mon Sep 17 00:00:00 2001 From: Serhii Marchenko Date: Thu, 18 Jul 2024 14:36:45 +0300 Subject: [PATCH 1/2] fix(FEC-13988): download title fix --- src/components/doc-overlay/doc-overlay.tsx | 4 ++-- translations/en.i18n.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/doc-overlay/doc-overlay.tsx b/src/components/doc-overlay/doc-overlay.tsx index 36f5945..378e24a 100644 --- a/src/components/doc-overlay/doc-overlay.tsx +++ b/src/components/doc-overlay/doc-overlay.tsx @@ -10,7 +10,7 @@ const { withText, Text } = ui.preacti18n; const translates = { previewText: Click to view, previewButtonText: View document, - downloadText: is unavailable, download to view., + downloadText: Click to download, downloadButtonText: Download document, contentUnavailableText: is unavailable to view. }; @@ -36,7 +36,7 @@ export const DocumentOverlay = withText(translates)((props: DocumentOverlayProps }; } else if (props.onDownload) { return { - text: `${props.sourceName} ${props.downloadText!}`, + text: `${props.downloadText!} ${props.sourceName}`, buttonText: props.downloadButtonText!, onClick: props.onDownload }; diff --git a/translations/en.i18n.json b/translations/en.i18n.json index 8ca6acb..30c3309 100644 --- a/translations/en.i18n.json +++ b/translations/en.i18n.json @@ -3,7 +3,7 @@ "docPlayer": { "previewText": "Click to view", "previewButtonText": "View document", - "downloadText": "is unavailable, download to view.", + "downloadText": "Click to download", "downloadButtonText": "Download document", "contentUnavailableText": "is unavailable to view." } From 02a620fda5f4d2a2262a56857c5ddb1ca2d206d1 Mon Sep 17 00:00:00 2001 From: Serhii Marchenko Date: Thu, 18 Jul 2024 14:40:06 +0300 Subject: [PATCH 2/2] fix(FEC-13988): upd tests --- cypress/e2e/document-player.cy.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress/e2e/document-player.cy.ts b/cypress/e2e/document-player.cy.ts index ccf9eb3..8865464 100644 --- a/cypress/e2e/document-player.cy.ts +++ b/cypress/e2e/document-player.cy.ts @@ -59,7 +59,7 @@ describe('Document player', () => { cy.intercept('GET', 'https://mock-download-document/1', { statusCode: 200 }).as('downloadUrl'); cy.get('[data-testid="doc-player-text-wrapper"]').should( 'have.text', - 'Accessibility Deck - latest presentation is unavailable, download to view.' + 'Click to download Accessibility Deck - latest presentation' ); cy.get('[data-testid="doc-player-button"]').should('exist'); cy.get('[data-testid="doc-player-button"]').should('have.text', 'Download document');