diff options
Diffstat (limited to 'server/sonar-web/src/main/js')
22 files changed, 116 insertions, 439 deletions
diff --git a/server/sonar-web/src/main/js/app/components/search/__tests__/__snapshots__/SearchShowMore-test.tsx.snap b/server/sonar-web/src/main/js/app/components/search/__tests__/__snapshots__/SearchShowMore-test.tsx.snap index 85382613b9f..e6cdc125060 100644 --- a/server/sonar-web/src/main/js/app/components/search/__tests__/__snapshots__/SearchShowMore-test.tsx.snap +++ b/server/sonar-web/src/main/js/app/components/search/__tests__/__snapshots__/SearchShowMore-test.tsx.snap @@ -10,7 +10,6 @@ exports[`should render 1`] = ` loading={false} > <a - className="" data-qualifier="TRK" href="#" onClick={[Function]} diff --git a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/__snapshots__/ComponentSourceSnippetGroupViewer-test.tsx.snap b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/__snapshots__/ComponentSourceSnippetGroupViewer-test.tsx.snap index 668109f9bab..7f4265201c2 100644 --- a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/__snapshots__/ComponentSourceSnippetGroupViewer-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/__snapshots__/ComponentSourceSnippetGroupViewer-test.tsx.snap @@ -11,7 +11,6 @@ exports[`should render correctly 1`] = ` "name": "master", } } - className="" expandable={true} loading={false} onExpand={[Function]} diff --git a/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/__snapshots__/BranchListRow-test.tsx.snap b/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/__snapshots__/BranchListRow-test.tsx.snap index 5df9d7b064a..944ad428b4f 100644 --- a/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/__snapshots__/BranchListRow-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/__snapshots__/BranchListRow-test.tsx.snap @@ -1,9 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`should render correctly: branch with number of days 1`] = ` -<tr - className="" -> +<tr> <td className="nowrap" > @@ -53,9 +51,7 @@ exports[`should render correctly: branch with number of days 1`] = ` `; exports[`should render correctly: branch with previous version 1`] = ` -<tr - className="" -> +<tr> <td className="nowrap" > @@ -104,9 +100,7 @@ exports[`should render correctly: branch with previous version 1`] = ` `; exports[`should render correctly: branch with reference branch 1`] = ` -<tr - className="" -> +<tr> <td className="nowrap" > @@ -156,9 +150,7 @@ exports[`should render correctly: branch with reference branch 1`] = ` `; exports[`should render correctly: branch with specific analysis 1`] = ` -<tr - className="" -> +<tr> <td className="nowrap" > @@ -260,9 +252,7 @@ exports[`should render correctly: faulty branch 1`] = ` `; exports[`should render correctly: main branch with default 1`] = ` -<tr - className="" -> +<tr> <td className="nowrap" > diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectsSortingSelect-test.tsx.snap b/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectsSortingSelect-test.tsx.snap index 44825139d16..864ca534348 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectsSortingSelect-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectsSortingSelect-test.tsx.snap @@ -80,9 +80,7 @@ exports[`should handle the descending sort direction 1`] = ` innerRef={[Function]} onClick={[Function]} > - <SortDescIcon - className="" - /> + <SortDescIcon /> </ButtonIcon> </Tooltip> </div> @@ -175,9 +173,7 @@ exports[`should render correctly for leak view 1`] = ` innerRef={[Function]} onClick={[Function]} > - <SortAscIcon - className="" - /> + <SortAscIcon /> </ButtonIcon> </Tooltip> </div> @@ -270,9 +266,7 @@ exports[`should render correctly for overall view 1`] = ` innerRef={[Function]} onClick={[Function]} > - <SortAscIcon - className="" - /> + <SortAscIcon /> </ButtonIcon> </Tooltip> </div> diff --git a/server/sonar-web/src/main/js/apps/projects/components/project-card/__tests__/__snapshots__/ProjectCardMeasures-test.tsx.snap b/server/sonar-web/src/main/js/apps/projects/components/project-card/__tests__/__snapshots__/ProjectCardMeasures-test.tsx.snap index 20d8cf07dd1..8d9c7eb4cb3 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/project-card/__tests__/__snapshots__/ProjectCardMeasures-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/projects/components/project-card/__tests__/__snapshots__/ProjectCardMeasures-test.tsx.snap @@ -34,7 +34,6 @@ exports[`New code measures should be rendered properly 1`] = ` className="bordered-left little-spacer" /> <ProjectCardMeasure - className="" key="new_vulnerabilities" label="metric.vulnerabilities.name" metricKey="new_vulnerabilities" @@ -57,7 +56,6 @@ exports[`New code measures should be rendered properly 1`] = ` className="bordered-left little-spacer" /> <ProjectCardMeasure - className="" iconKey="security_hotspots" key="new_security_hotspots_reviewed" label="projects.security_hotspots_reviewed" @@ -78,7 +76,6 @@ exports[`New code measures should be rendered properly 1`] = ` className="bordered-left little-spacer" /> <ProjectCardMeasure - className="" key="new_code_smells" label="metric.code_smells.name" metricKey="new_code_smells" @@ -196,7 +193,6 @@ exports[`Overall measures should be rendered properly 1`] = ` className="bordered-left little-spacer" /> <ProjectCardMeasure - className="" key="vulnerabilities" label="metric.vulnerabilities.name" metricKey="vulnerabilities" @@ -219,7 +215,6 @@ exports[`Overall measures should be rendered properly 1`] = ` className="bordered-left little-spacer" /> <ProjectCardMeasure - className="" iconKey="security_hotspots" key="security_hotspots_reviewed" label="projects.security_hotspots_reviewed" @@ -240,7 +235,6 @@ exports[`Overall measures should be rendered properly 1`] = ` className="bordered-left little-spacer" /> <ProjectCardMeasure - className="" key="code_smells" label="metric.code_smells.name" metricKey="code_smells" diff --git a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/Filter-test.tsx.snap b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/Filter-test.tsx.snap index a314e5e8921..a9b455d7bcf 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/Filter-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/Filter-test.tsx.snap @@ -9,7 +9,6 @@ exports[`highlights under 1`] = ` className="search-navigator-facet-list projects-facet-list" > <li - className="" key="1" > <button @@ -84,7 +83,6 @@ exports[`hightlights under selected 1`] = ` className="search-navigator-facet-list projects-facet-list" > <li - className="" key="1" > <button @@ -159,7 +157,6 @@ exports[`renders 1`] = ` className="search-navigator-facet-list projects-facet-list" > <li - className="" key="1" > <button @@ -180,7 +177,6 @@ exports[`renders 1`] = ` </button> </li> <li - className="" key="2" > <button @@ -201,7 +197,6 @@ exports[`renders 1`] = ` </button> </li> <li - className="" key="3" > <button @@ -234,7 +229,6 @@ exports[`renders facet bar chart 1`] = ` className="search-navigator-facet-list projects-facet-list" > <li - className="" key="a" > <button @@ -272,7 +266,6 @@ exports[`renders facet bar chart 1`] = ` </button> </li> <li - className="" key="b" > <button @@ -310,7 +303,6 @@ exports[`renders facet bar chart 1`] = ` </button> </li> <li - className="" key="c" > <button @@ -361,7 +353,6 @@ exports[`renders header and footer 1`] = ` className="search-navigator-facet-list projects-facet-list" > <li - className="" key="1" > <button @@ -382,7 +373,6 @@ exports[`renders header and footer 1`] = ` </button> </li> <li - className="" key="2" > <button @@ -403,7 +393,6 @@ exports[`renders header and footer 1`] = ` </button> </li> <li - className="" key="3" > <button @@ -479,7 +468,6 @@ exports[`renders multiple selected 1`] = ` </button> </li> <li - className="" key="3" > <button @@ -527,7 +515,6 @@ exports[`renders selected 1`] = ` className="search-navigator-facet-list projects-facet-list" > <li - className="" key="1" > <button @@ -569,7 +556,6 @@ exports[`renders selected 1`] = ` </button> </li> <li - className="" key="3" > <button diff --git a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/LanguagesFilter-test.tsx.snap b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/LanguagesFilter-test.tsx.snap index ca075b1de55..e0de880f2c5 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/LanguagesFilter-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/LanguagesFilter-test.tsx.snap @@ -144,7 +144,6 @@ exports[`should render the languages facet with the selected languages 2`] = ` </button> </li> <li - className="" key="js" > <button diff --git a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/TagsFilter-test.tsx.snap b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/TagsFilter-test.tsx.snap index 9754909b5eb..ee936ccc3b6 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/TagsFilter-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/TagsFilter-test.tsx.snap @@ -217,7 +217,6 @@ exports[`should render the tags facet with the selected tags 2`] = ` </button> </li> <li - className="" key="csharp" > <button diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/__snapshots__/ProfileActions-test.tsx.snap b/server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/__snapshots__/ProfileActions-test.tsx.snap index aa7d7f0de0d..3dfb0960ba5 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/__snapshots__/ProfileActions-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/__snapshots__/ProfileActions-test.tsx.snap @@ -3,7 +3,6 @@ exports[`renders correctly: all permissions 1`] = ` <Fragment> <ActionsDropdown - className="" label="quality_profiles.actions.name.JavaScript" > <ActionsDropdownItem @@ -78,7 +77,6 @@ exports[`renders correctly: all permissions 1`] = ` exports[`renders correctly: copy modal 1`] = ` <Fragment> <ActionsDropdown - className="" label="quality_profiles.actions.name.JavaScript" > <ActionsDropdownItem @@ -129,7 +127,6 @@ exports[`renders correctly: copy modal 1`] = ` exports[`renders correctly: delete modal 1`] = ` <Fragment> <ActionsDropdown - className="" label="quality_profiles.actions.name.JavaScript" > <ActionsDropdownItem @@ -179,7 +176,6 @@ exports[`renders correctly: delete modal 1`] = ` exports[`renders correctly: edit only 1`] = ` <Fragment> <ActionsDropdown - className="" label="quality_profiles.actions.name.JavaScript" > <ActionsDropdownItem @@ -224,7 +220,6 @@ exports[`renders correctly: edit only 1`] = ` exports[`renders correctly: extend modal 1`] = ` <Fragment> <ActionsDropdown - className="" label="quality_profiles.actions.name.JavaScript" > <ActionsDropdownItem @@ -275,7 +270,6 @@ exports[`renders correctly: extend modal 1`] = ` exports[`renders correctly: no permissions 1`] = ` <Fragment> <ActionsDropdown - className="" label="quality_profiles.actions.name.JavaScript" > <ActionsDropdownItem @@ -303,7 +297,6 @@ exports[`renders correctly: no permissions 1`] = ` exports[`renders correctly: rename modal 1`] = ` <Fragment> <ActionsDropdown - className="" label="quality_profiles.actions.name.JavaScript" > <ActionsDropdownItem @@ -354,7 +347,6 @@ exports[`renders correctly: rename modal 1`] = ` exports[`should not allow to set a profile as the default if the profile has no active rules 1`] = ` <Fragment> <ActionsDropdown - className="" label="quality_profiles.actions.name.JavaScript" > <ActionsDropdownItem diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/__snapshots__/HotspotCommentPopup-test.tsx.snap b/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/__snapshots__/HotspotCommentPopup-test.tsx.snap index 208ccf2633e..b64b02e320e 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/__snapshots__/HotspotCommentPopup-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/__snapshots__/HotspotCommentPopup-test.tsx.snap @@ -22,9 +22,7 @@ exports[`should render correclty 1`] = ` > <FormattingTips /> </div> - <div - className="" - > + <div> <Button className="little-spacer-right" onClick={[Function]} diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/status/__tests__/__snapshots__/StatusDescription-test.tsx.snap b/server/sonar-web/src/main/js/apps/security-hotspots/components/status/__tests__/__snapshots__/StatusDescription-test.tsx.snap index a2062714e3b..c939658a273 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/status/__tests__/__snapshots__/StatusDescription-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/status/__tests__/__snapshots__/StatusDescription-test.tsx.snap @@ -38,9 +38,7 @@ exports[`should render correctly: with title 1`] = ` exports[`should render correctly: without status in badge 1`] = ` <Styled(div)> <h3> - <div - className="" - > + <div> hotspots.status_option.TO_REVIEW </div> </h3> diff --git a/server/sonar-web/src/main/js/apps/users/components/__tests__/__snapshots__/TokensFormItem-test.tsx.snap b/server/sonar-web/src/main/js/apps/users/components/__tests__/__snapshots__/TokensFormItem-test.tsx.snap index 72ac5758063..9f54f8afd36 100644 --- a/server/sonar-web/src/main/js/apps/users/components/__tests__/__snapshots__/TokensFormItem-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/users/components/__tests__/__snapshots__/TokensFormItem-test.tsx.snap @@ -1,9 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`should render correctly 1`] = ` -<tr - className="" -> +<tr> <td className="hide-overflow nowrap" title="foo" @@ -59,9 +57,7 @@ exports[`should render correctly 1`] = ` `; exports[`should render correctly 2`] = ` -<tr - className="" -> +<tr> <td className="hide-overflow nowrap" title="foo" diff --git a/server/sonar-web/src/main/js/apps/web-api/components/__tests__/__snapshots__/Action-test.tsx.snap b/server/sonar-web/src/main/js/apps/web-api/components/__tests__/__snapshots__/Action-test.tsx.snap index 3bd42dc7b85..6a646251d00 100644 --- a/server/sonar-web/src/main/js/apps/web-api/components/__tests__/__snapshots__/Action-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/web-api/components/__tests__/__snapshots__/Action-test.tsx.snap @@ -132,7 +132,6 @@ exports[`should render correctly 1`] = ` > <li> <a - className="" href="#" onClick={[Function]} > @@ -141,7 +140,6 @@ exports[`should render correctly 1`] = ` </li> <li> <a - className="" href="#" onClick={[Function]} > @@ -150,7 +148,6 @@ exports[`should render correctly 1`] = ` </li> <li> <a - className="" href="#" onClick={[Function]} > diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/__snapshots__/LineCode-test.tsx.snap b/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/__snapshots__/LineCode-test.tsx.snap index 24aff0fb75d..f1aa3c446c3 100644 --- a/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/__snapshots__/LineCode-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/__snapshots__/LineCode-test.tsx.snap @@ -22,7 +22,6 @@ exports[`render code 1`] = ` t </span> <span - className="" key="2" > java.util. @@ -34,7 +33,6 @@ exports[`render code 1`] = ` ArrayList </span> <span - className="" key="4" > ; @@ -66,7 +64,6 @@ exports[`render code: with additional child 1`] = ` t </span> <span - className="" key="2" > java.util. @@ -78,7 +75,6 @@ exports[`render code: with additional child 1`] = ` ArrayList </span> <span - className="" key="4" > ; @@ -134,7 +130,6 @@ exports[`render code: with secondary location 1`] = ` t </span> <span - className="" key="2" > java.util. @@ -146,7 +141,6 @@ exports[`render code: with secondary location 1`] = ` ArrayList </span> <span - className="" key="4" > ; diff --git a/server/sonar-web/src/main/js/components/common/__tests__/__snapshots__/DisableableSelectOption-test.tsx.snap b/server/sonar-web/src/main/js/components/common/__tests__/__snapshots__/DisableableSelectOption-test.tsx.snap index ac1d9597703..5ed0c2ae05a 100644 --- a/server/sonar-web/src/main/js/components/common/__tests__/__snapshots__/DisableableSelectOption-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/common/__tests__/__snapshots__/DisableableSelectOption-test.tsx.snap @@ -1,9 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`should render correctly: default 1`] = ` -<span - className="" -> +<span> Foo </span> `; @@ -13,9 +11,7 @@ exports[`should render correctly: disabled 1`] = ` overlay="foo bar" placement="left" > - <span - className="" - > + <span> Bar </span> </Tooltip> @@ -26,9 +22,7 @@ exports[`should render correctly: disabled, with explanation 1`] = ` overlay="foo bar" placement="left" > - <span - className="" - > + <span> Bar <em className="small little-spacer-left" @@ -42,9 +36,7 @@ exports[`should render correctly: disabled, with explanation 1`] = ` `; exports[`should render correctly: no label 1`] = ` -<span - className="" -> +<span> baz </span> `; diff --git a/server/sonar-web/src/main/js/components/common/__tests__/__snapshots__/SelectListItem-test.tsx.snap b/server/sonar-web/src/main/js/components/common/__tests__/__snapshots__/SelectListItem-test.tsx.snap index bd319c9b038..7ffbbc16664 100644 --- a/server/sonar-web/src/main/js/components/common/__tests__/__snapshots__/SelectListItem-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/common/__tests__/__snapshots__/SelectListItem-test.tsx.snap @@ -8,7 +8,6 @@ exports[`should render correctly with a tooltip 1`] = ` <li> <ButtonPlain aria-selected={false} - className="" onBlur={[Function]} onClick={[Function]} onFocus={[Function]} @@ -29,7 +28,6 @@ exports[`should render correctly with children 1`] = ` <li> <ButtonPlain aria-selected={false} - className="" onBlur={[Function]} onClick={[Function]} onFocus={[Function]} @@ -55,7 +53,6 @@ exports[`should render correctly without children 1`] = ` <li> <ButtonPlain aria-selected={false} - className="" onBlur={[Function]} onClick={[Function]} onFocus={[Function]} diff --git a/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/BoxedTabs-test.tsx.snap b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/BoxedTabs-test.tsx.snap index c0396689423..804db4b4d9b 100644 --- a/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/BoxedTabs-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/BoxedTabs-test.tsx.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`should render correctly 1`] = ` -.emotion-6 { +.emotion-0 { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -29,7 +29,7 @@ exports[`should render correctly 1`] = ` border-right: 1px solid #e6e6e6; } -.emotion-0 { +.emotion-2 { display: block; background-color: #4b9fd5; height: 3px; @@ -62,7 +62,7 @@ exports[`should render correctly 1`] = ` border-right: 1px solid #e6e6e6; } -.emotion-2 { +.emotion-4 { display: none; background-color: #4b9fd5; height: 3px; @@ -126,7 +126,7 @@ exports[`should render correctly 1`] = ` data-s="" > - .emotion-6{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;} + .emotion-0{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;} </style> <style data-emotion="css" @@ -147,7 +147,7 @@ exports[`should render correctly 1`] = ` data-s="" > - .emotion-0{display:block;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} + .emotion-2{display:block;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} </style> <style data-emotion="css" @@ -175,7 +175,7 @@ exports[`should render correctly 1`] = ` data-s="" > - .emotion-2{display:none;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} + .emotion-4{display:none;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} </style> </head>, "ctr": 8, @@ -190,7 +190,7 @@ exports[`should render correctly 1`] = ` data-s="" > - .emotion-6{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;} + .emotion-0{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;} </style>, <style data-emotion="css" @@ -211,7 +211,7 @@ exports[`should render correctly 1`] = ` data-s="" > - .emotion-0{display:block;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} + .emotion-2{display:block;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} </style>, <style data-emotion="css" @@ -239,7 +239,7 @@ exports[`should render correctly 1`] = ` data-s="" > - .emotion-2{display:none;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} + .emotion-4{display:none;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} </style>, ], }, @@ -260,7 +260,7 @@ exports[`should render correctly 1`] = ` } /> <div - className="boxed-tabs emotion-6" + className="boxed-tabs emotion-0" role="tablist" > <Styled(button) @@ -296,7 +296,7 @@ exports[`should render correctly 1`] = ` data-s="" > - .emotion-6{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;} + .emotion-0{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;} </style> <style data-emotion="css" @@ -317,7 +317,7 @@ exports[`should render correctly 1`] = ` data-s="" > - .emotion-0{display:block;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} + .emotion-2{display:block;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} </style> <style data-emotion="css" @@ -345,7 +345,7 @@ exports[`should render correctly 1`] = ` data-s="" > - .emotion-2{display:none;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} + .emotion-4{display:none;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} </style> </head>, "ctr": 8, @@ -360,7 +360,7 @@ exports[`should render correctly 1`] = ` data-s="" > - .emotion-6{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;} + .emotion-0{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;} </style>, <style data-emotion="css" @@ -381,7 +381,7 @@ exports[`should render correctly 1`] = ` data-s="" > - .emotion-0{display:block;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} + .emotion-2{display:block;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} </style>, <style data-emotion="css" @@ -409,7 +409,7 @@ exports[`should render correctly 1`] = ` data-s="" > - .emotion-2{display:none;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} + .emotion-4{display:none;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} </style>, ], }, @@ -480,7 +480,7 @@ exports[`should render correctly 1`] = ` data-s="" > - .emotion-6{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;} + .emotion-0{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;} </style> <style data-emotion="css" @@ -501,7 +501,7 @@ exports[`should render correctly 1`] = ` data-s="" > - .emotion-0{display:block;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} + .emotion-2{display:block;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} </style> <style data-emotion="css" @@ -529,7 +529,7 @@ exports[`should render correctly 1`] = ` data-s="" > - .emotion-2{display:none;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} + .emotion-4{display:none;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} </style> </head>, "ctr": 8, @@ -544,7 +544,7 @@ exports[`should render correctly 1`] = ` data-s="" > - .emotion-6{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;} + .emotion-0{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;} </style>, <style data-emotion="css" @@ -565,7 +565,7 @@ exports[`should render correctly 1`] = ` data-s="" > - .emotion-0{display:block;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} + .emotion-2{display:block;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} </style>, <style data-emotion="css" @@ -593,7 +593,7 @@ exports[`should render correctly 1`] = ` data-s="" > - .emotion-2{display:none;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} + .emotion-4{display:none;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} </style>, ], }, @@ -619,7 +619,7 @@ exports[`should render correctly 1`] = ` } /> <div - className="emotion-0" + className="emotion-2" /> </Styled(div)> labela @@ -658,7 +658,7 @@ exports[`should render correctly 1`] = ` data-s="" > - .emotion-6{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;} + .emotion-0{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;} </style> <style data-emotion="css" @@ -679,7 +679,7 @@ exports[`should render correctly 1`] = ` data-s="" > - .emotion-0{display:block;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} + .emotion-2{display:block;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} </style> <style data-emotion="css" @@ -707,7 +707,7 @@ exports[`should render correctly 1`] = ` data-s="" > - .emotion-2{display:none;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} + .emotion-4{display:none;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} </style> </head>, "ctr": 8, @@ -722,7 +722,7 @@ exports[`should render correctly 1`] = ` data-s="" > - .emotion-6{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;} + .emotion-0{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;} </style>, <style data-emotion="css" @@ -743,7 +743,7 @@ exports[`should render correctly 1`] = ` data-s="" > - .emotion-0{display:block;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} + .emotion-2{display:block;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} </style>, <style data-emotion="css" @@ -771,7 +771,7 @@ exports[`should render correctly 1`] = ` data-s="" > - .emotion-2{display:none;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} + .emotion-4{display:none;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} </style>, ], }, @@ -846,7 +846,7 @@ exports[`should render correctly 1`] = ` data-s="" > - .emotion-6{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;} + .emotion-0{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;} </style> <style data-emotion="css" @@ -867,7 +867,7 @@ exports[`should render correctly 1`] = ` data-s="" > - .emotion-0{display:block;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} + .emotion-2{display:block;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} </style> <style data-emotion="css" @@ -895,7 +895,7 @@ exports[`should render correctly 1`] = ` data-s="" > - .emotion-2{display:none;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} + .emotion-4{display:none;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} </style> </head>, "ctr": 8, @@ -910,7 +910,7 @@ exports[`should render correctly 1`] = ` data-s="" > - .emotion-6{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;} + .emotion-0{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;} </style>, <style data-emotion="css" @@ -931,7 +931,7 @@ exports[`should render correctly 1`] = ` data-s="" > - .emotion-0{display:block;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} + .emotion-2{display:block;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} </style>, <style data-emotion="css" @@ -959,7 +959,7 @@ exports[`should render correctly 1`] = ` data-s="" > - .emotion-2{display:none;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} + .emotion-4{display:none;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} </style>, ], }, @@ -985,7 +985,7 @@ exports[`should render correctly 1`] = ` } /> <div - className="emotion-2" + className="emotion-4" /> </Styled(div)> labelb @@ -1024,7 +1024,7 @@ exports[`should render correctly 1`] = ` data-s="" > - .emotion-6{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;} + .emotion-0{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;} </style> <style data-emotion="css" @@ -1045,7 +1045,7 @@ exports[`should render correctly 1`] = ` data-s="" > - .emotion-0{display:block;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} + .emotion-2{display:block;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} </style> <style data-emotion="css" @@ -1073,7 +1073,7 @@ exports[`should render correctly 1`] = ` data-s="" > - .emotion-2{display:none;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} + .emotion-4{display:none;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} </style> </head>, "ctr": 8, @@ -1088,7 +1088,7 @@ exports[`should render correctly 1`] = ` data-s="" > - .emotion-6{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;} + .emotion-0{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;} </style>, <style data-emotion="css" @@ -1109,7 +1109,7 @@ exports[`should render correctly 1`] = ` data-s="" > - .emotion-0{display:block;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} + .emotion-2{display:block;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} </style>, <style data-emotion="css" @@ -1137,7 +1137,7 @@ exports[`should render correctly 1`] = ` data-s="" > - .emotion-2{display:none;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} + .emotion-4{display:none;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} </style>, ], }, @@ -1212,7 +1212,7 @@ exports[`should render correctly 1`] = ` data-s="" > - .emotion-6{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;} + .emotion-0{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;} </style> <style data-emotion="css" @@ -1233,7 +1233,7 @@ exports[`should render correctly 1`] = ` data-s="" > - .emotion-0{display:block;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} + .emotion-2{display:block;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} </style> <style data-emotion="css" @@ -1261,7 +1261,7 @@ exports[`should render correctly 1`] = ` data-s="" > - .emotion-2{display:none;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} + .emotion-4{display:none;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} </style> </head>, "ctr": 8, @@ -1276,7 +1276,7 @@ exports[`should render correctly 1`] = ` data-s="" > - .emotion-6{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;} + .emotion-0{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;} </style>, <style data-emotion="css" @@ -1297,7 +1297,7 @@ exports[`should render correctly 1`] = ` data-s="" > - .emotion-0{display:block;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} + .emotion-2{display:block;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} </style>, <style data-emotion="css" @@ -1325,7 +1325,7 @@ exports[`should render correctly 1`] = ` data-s="" > - .emotion-2{display:none;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} + .emotion-4{display:none;background-color:#4b9fd5;height:3px;width:100%;position:absolute;left:0;top:-1px;} </style>, ], }, @@ -1351,7 +1351,7 @@ exports[`should render correctly 1`] = ` } /> <div - className="emotion-2" + className="emotion-4" /> </Styled(div)> <span> diff --git a/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/ModalValidationField-test.tsx.snap b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/ModalValidationField-test.tsx.snap index 4b4e605c0ad..cc15270b4b8 100644 --- a/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/ModalValidationField-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/ModalValidationField-test.tsx.snap @@ -47,7 +47,6 @@ exports[`should display the field without any error/validation 1`] = ` Foo </label> <input - className="" type="text" /> <div @@ -66,7 +65,6 @@ exports[`should display the field without any error/validation 2`] = ` Foo </label> <input - className="" type="text" /> </div> diff --git a/server/sonar-web/src/main/js/components/facet/__tests__/__snapshots__/ListStyleFacet-test.tsx.snap b/server/sonar-web/src/main/js/components/facet/__tests__/__snapshots__/ListStyleFacet-test.tsx.snap index d2d9cf30567..1fcb716aab0 100644 --- a/server/sonar-web/src/main/js/components/facet/__tests__/__snapshots__/ListStyleFacet-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/facet/__tests__/__snapshots__/ListStyleFacet-test.tsx.snap @@ -19,7 +19,6 @@ exports[`should be disabled 1`] = ` exports[`should display all selected items 1`] = ` <FacetBox - className="" property="foo" > <FacetHeader @@ -101,7 +100,6 @@ exports[`should display all selected items 1`] = ` exports[`should render 1`] = ` <FacetBox - className="" property="foo" > <FacetHeader @@ -170,7 +168,6 @@ exports[`should render 1`] = ` exports[`should search 1`] = ` <FacetBox - className="" property="foo" > <FacetHeader @@ -230,7 +227,6 @@ exports[`should search 1`] = ` exports[`should search 2`] = ` <FacetBox - className="" property="foo" > <FacetHeader @@ -301,7 +297,6 @@ exports[`should search 2`] = ` exports[`should search 3`] = ` <FacetBox - className="" property="foo" > <FacetHeader @@ -370,7 +365,6 @@ exports[`should search 3`] = ` exports[`should search 4`] = ` <FacetBox - className="" property="foo" > <FacetHeader @@ -404,7 +398,6 @@ exports[`should search 4`] = ` exports[`should search 5`] = ` <FacetBox - className="" property="foo" > <FacetHeader diff --git a/server/sonar-web/src/main/js/components/ui/__tests__/PageShortcutsTooltip-test.tsx b/server/sonar-web/src/main/js/components/ui/__tests__/PageShortcutsTooltip-test.tsx index 34de9c12318..8cef344f439 100644 --- a/server/sonar-web/src/main/js/components/ui/__tests__/PageShortcutsTooltip-test.tsx +++ b/server/sonar-web/src/main/js/components/ui/__tests__/PageShortcutsTooltip-test.tsx @@ -17,19 +17,49 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { shallow } from 'enzyme'; +import { screen } from '@testing-library/react'; +import userEvent from '@testing-library/user-event'; import * as React from 'react'; +import { renderComponent } from '../../../helpers/testReactTestingUtils'; import PageShortcutsTooltip, { PageShortcutsTooltipProps } from '../PageShortcutsTooltip'; -it('should render correctly', () => { - expect(shallowRender()).toMatchSnapshot('default'); - expect(shallowRender({ upAndDownLabel: 'foo', leftAndRightLabel: 'bar' })).toMatchSnapshot( - 'with up/down and left/right labels' - ); - expect(shallowRender({ leftLabel: 'baz' })).toMatchSnapshot('only left label'); - expect(shallowRender({ metaModifierLabel: 'funky' })).toMatchSnapshot('with meta label'); +const leftAndRightLabel = 'left & right'; +const leftLabel = 'left'; +const upAndDownLabel = 'up & down'; +const metaModifierLabel = 'meta'; + +it('should render all the labels', async () => { + const user = userEvent.setup(); + + renderPageShortcutsTooltip({ + leftAndRightLabel, + leftLabel, + upAndDownLabel, + metaModifierLabel, + }); + + await user.hover(screen.getByText('←')); + + expect(await screen.findByText(leftAndRightLabel)).toBeInTheDocument(); + expect(screen.getByText(leftLabel)).toBeInTheDocument(); + expect(screen.getByText(upAndDownLabel)).toBeInTheDocument(); + expect(screen.getByText(metaModifierLabel)).toBeInTheDocument(); +}); + +it('should render left & right labels without up&down', async () => { + const user = userEvent.setup(); + + renderPageShortcutsTooltip({ + leftAndRightLabel, + leftLabel, + }); + + await user.hover(screen.getByText('←')); + + expect(await screen.findByText(leftAndRightLabel)).toBeInTheDocument(); + expect(screen.getByText(leftLabel)).toBeInTheDocument(); }); -function shallowRender(props: Partial<PageShortcutsTooltipProps> = {}) { - return shallow<PageShortcutsTooltipProps>(<PageShortcutsTooltip {...props} />); +function renderPageShortcutsTooltip(props: Partial<PageShortcutsTooltipProps> = {}) { + return renderComponent(<PageShortcutsTooltip {...props} />); } diff --git a/server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/Alert-test.tsx.snap b/server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/Alert-test.tsx.snap index b6b82635f51..e60826739f7 100644 --- a/server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/Alert-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/Alert-test.tsx.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`should render banner alert with correct css 1`] = ` -.emotion-3 { +.emotion-0 { border: 1px solid; border-radius: 2px; margin-bottom: 8px; @@ -11,16 +11,16 @@ exports[`should render banner alert with correct css 1`] = ` display: block; } -.emotion-3:empty { +.emotion-0:empty { display: none; } -.emotion-3 a, -.emotion-3 .button-link { +.emotion-0 a, +.emotion-0 .button-link { border-color: #236a97; } -.emotion-2 { +.emotion-1 { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -38,7 +38,7 @@ exports[`should render banner alert with correct css 1`] = ` box-sizing: border-box; } -.emotion-0 { +.emotion-2 { -webkit-flex: 0 0 auto; -ms-flex: 0 0 auto; flex: 0 0 auto; @@ -59,7 +59,7 @@ exports[`should render banner alert with correct css 1`] = ` border-color: #f4b1b0; } -.emotion-1 { +.emotion-3 { -webkit-flex: 1 1 auto; -ms-flex: 1 1 auto; flex: 1 1 auto; @@ -70,15 +70,15 @@ exports[`should render banner alert with correct css 1`] = ` <div aria-label="alert.tooltip.error" - class="alert alert-test emotion-3" + class="alert alert-test emotion-0" id="error-message" role="alert" > <div - class="emotion-2" + class="emotion-1" > <div - class="emotion-0" + class="emotion-2" > <svg height="16" @@ -96,7 +96,7 @@ exports[`should render banner alert with correct css 1`] = ` </svg> </div> <div - class="alert-content emotion-1" + class="alert-content emotion-3" > This is an error! </div> diff --git a/server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/PageShortcutsTooltip-test.tsx.snap b/server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/PageShortcutsTooltip-test.tsx.snap deleted file mode 100644 index cb4aa6e79b9..00000000000 --- a/server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/PageShortcutsTooltip-test.tsx.snap +++ /dev/null @@ -1,268 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`should render correctly: default 1`] = ` -<Tooltip - overlay={ - <div - className="small nowrap" - > - <div /> - </div> - } -> - <div - aria-label=" - shortcuts.on_page.intro - - - - - " - className="page-shortcuts-tooltip note text-center display-inline-block" - > - <div> - <span - className="shortcut-button shortcut-button-tiny" - > - ↑ - </span> - </div> - <div> - <span - className="shortcut-button shortcut-button-tiny" - > - ← - </span> - <span - className="shortcut-button shortcut-button-tiny" - > - ↓ - </span> - <span - className="shortcut-button shortcut-button-tiny" - > - → - </span> - </div> - </div> -</Tooltip> -`; - -exports[`should render correctly: only left label 1`] = ` -<Tooltip - overlay={ - <div - className="small nowrap" - > - <div> - <span - className="" - > - <span - className="shortcut-button spacer-right" - > - ← - </span> - baz - </span> - </div> - </div> - } -> - <div - aria-label=" - shortcuts.on_page.intro - - - shortcuts.on_page.left_x.baz - - " - className="page-shortcuts-tooltip note text-center display-inline-block" - > - <div> - <span - className="shortcut-button shortcut-button-tiny" - > - ↑ - </span> - </div> - <div> - <span - className="shortcut-button shortcut-button-tiny" - > - ← - </span> - <span - className="shortcut-button shortcut-button-tiny" - > - ↓ - </span> - <span - className="shortcut-button shortcut-button-tiny" - > - → - </span> - </div> - </div> -</Tooltip> -`; - -exports[`should render correctly: with meta label 1`] = ` -<Tooltip - overlay={ - <div - className="small nowrap" - > - <div /> - <div - className="big-spacer-top big-padded-top bordered-top" - > - <span - className="shortcut-button little-spacer-right" - > - alt - </span> - <span - className="little-spacer-right" - > - + - </span> - <span - className="shortcut-button little-spacer-right" - > - ↑ - </span> - <span - className="shortcut-button spacer-right" - > - ↓ - </span> - <span - className="shortcut-button little-spacer-right" - > - ← - </span> - <span - className="shortcut-button spacer-right" - > - → - </span> - funky - </div> - </div> - } -> - <div - aria-label=" - shortcuts.on_page.intro - - - - shortcuts.on_page.meta_x.funky - " - className="page-shortcuts-tooltip note text-center display-inline-block" - > - <div> - <span - className="shortcut-button shortcut-button-tiny" - > - ↑ - </span> - </div> - <div> - <span - className="shortcut-button shortcut-button-tiny" - > - ← - </span> - <span - className="shortcut-button shortcut-button-tiny" - > - ↓ - </span> - <span - className="shortcut-button shortcut-button-tiny" - > - → - </span> - </div> - </div> -</Tooltip> -`; - -exports[`should render correctly: with up/down and left/right labels 1`] = ` -<Tooltip - overlay={ - <div - className="small nowrap" - > - <div> - <span> - <span - className="shortcut-button little-spacer-right" - > - ↑ - </span> - <span - className="shortcut-button spacer-right" - > - ↓ - </span> - foo - </span> - <span - className="big-spacer-left" - > - <span - className="shortcut-button little-spacer-right" - > - ← - </span> - <span - className="shortcut-button spacer-right" - > - → - </span> - bar - </span> - </div> - </div> - } -> - <div - aria-label=" - shortcuts.on_page.intro - shortcuts.on_page.up_down_x.foo - shortcuts.on_page.left_right_x.bar - - - " - className="page-shortcuts-tooltip note text-center display-inline-block" - > - <div> - <span - className="shortcut-button shortcut-button-tiny" - > - ↑ - </span> - </div> - <div> - <span - className="shortcut-button shortcut-button-tiny" - > - ← - </span> - <span - className="shortcut-button shortcut-button-tiny" - > - ↓ - </span> - <span - className="shortcut-button shortcut-button-tiny" - > - → - </span> - </div> - </div> -</Tooltip> -`; |