From 3792d102dd834258533199dae98e2c16835ed9e1 Mon Sep 17 00:00:00 2001 From: doubleface Date: Fri, 15 Oct 2021 09:26:25 +0200 Subject: [PATCH] fix: Display shortcut letter as upper case in SquareAppIcon --- react/SquareAppIcon/SquareAppIcon.spec.js | 5 +++ .../__snapshots__/SquareAppIcon.spec.js.snap | 44 +++++++++++++++++++ react/SquareAppIcon/index.jsx | 2 +- 3 files changed, 50 insertions(+), 1 deletion(-) diff --git a/react/SquareAppIcon/SquareAppIcon.spec.js b/react/SquareAppIcon/SquareAppIcon.spec.js index 37c070f5d6..bc841f982f 100644 --- a/react/SquareAppIcon/SquareAppIcon.spec.js +++ b/react/SquareAppIcon/SquareAppIcon.spec.js @@ -61,4 +61,9 @@ describe('SquareAppIcon component', () => { const root = render() expect(root.getByTestId('square-app-icon')).toMatchSnapshot() }) + + it('should render correctly an app in shortcut state', () => { + const root = render() + expect(root.getByTestId('square-app-icon')).toMatchSnapshot() + }) }) diff --git a/react/SquareAppIcon/__snapshots__/SquareAppIcon.spec.js.snap b/react/SquareAppIcon/__snapshots__/SquareAppIcon.spec.js.snap index 652973bcd9..11e41567ac 100644 --- a/react/SquareAppIcon/__snapshots__/SquareAppIcon.spec.js.snap +++ b/react/SquareAppIcon/__snapshots__/SquareAppIcon.spec.js.snap @@ -293,3 +293,47 @@ exports[`SquareAppIcon component should render correctly an app in maintenance s `; + +exports[`SquareAppIcon component should render correctly an app in shortcut state 1`] = ` +
+ + +

+ S +

+ + + + + + + +
+
+ shortcut +
+
+`; diff --git a/react/SquareAppIcon/index.jsx b/react/SquareAppIcon/index.jsx index d98c636537..44f465d2d1 100644 --- a/react/SquareAppIcon/index.jsx +++ b/react/SquareAppIcon/index.jsx @@ -73,7 +73,7 @@ export const SquareAppIcon = ({ app, name, variant }) => { > {variant === 'shortcut' ? ( - {letter} + {letter.toUpperCase()} ) : (