]> source.dussan.org Git - sonarqube.git/commitdiff
[NO JIRA] Upgrade jest-emotion --> @emotion/jest
authorJeremy Davis <jeremy.davis@sonarsource.com>
Wed, 21 Dec 2022 11:29:07 +0000 (12:29 +0100)
committersonartech <sonartech@sonarsource.com>
Thu, 22 Dec 2022 20:03:06 +0000 (20:03 +0000)
25 files changed:
server/sonar-web/jest.config.js
server/sonar-web/package.json
server/sonar-web/src/main/js/app/components/search/__tests__/__snapshots__/SearchShowMore-test.tsx.snap
server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/__snapshots__/ComponentSourceSnippetGroupViewer-test.tsx.snap
server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/__snapshots__/BranchListRow-test.tsx.snap
server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectsSortingSelect-test.tsx.snap
server/sonar-web/src/main/js/apps/projects/components/project-card/__tests__/__snapshots__/ProjectCardMeasures-test.tsx.snap
server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/Filter-test.tsx.snap
server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/LanguagesFilter-test.tsx.snap
server/sonar-web/src/main/js/apps/projects/filters/__tests__/__snapshots__/TagsFilter-test.tsx.snap
server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/__snapshots__/ProfileActions-test.tsx.snap
server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/__snapshots__/HotspotCommentPopup-test.tsx.snap
server/sonar-web/src/main/js/apps/security-hotspots/components/status/__tests__/__snapshots__/StatusDescription-test.tsx.snap
server/sonar-web/src/main/js/apps/users/components/__tests__/__snapshots__/TokensFormItem-test.tsx.snap
server/sonar-web/src/main/js/apps/web-api/components/__tests__/__snapshots__/Action-test.tsx.snap
server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/__snapshots__/LineCode-test.tsx.snap
server/sonar-web/src/main/js/components/common/__tests__/__snapshots__/DisableableSelectOption-test.tsx.snap
server/sonar-web/src/main/js/components/common/__tests__/__snapshots__/SelectListItem-test.tsx.snap
server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/BoxedTabs-test.tsx.snap
server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/ModalValidationField-test.tsx.snap
server/sonar-web/src/main/js/components/facet/__tests__/__snapshots__/ListStyleFacet-test.tsx.snap
server/sonar-web/src/main/js/components/ui/__tests__/PageShortcutsTooltip-test.tsx
server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/Alert-test.tsx.snap
server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/PageShortcutsTooltip-test.tsx.snap [deleted file]
server/sonar-web/yarn.lock

index dfe11fab60d246330efb962d1dc82f4eb9b474a8..38e2b543ac4afb804ef53cdd251fba5d1d88ea38 100644 (file)
@@ -4,22 +4,22 @@ module.exports = {
   coverageReporters: ['lcovonly', 'text'],
   globals: {
     'ts-jest': {
-      diagnostics: false
-    }
+      diagnostics: false,
+    },
   },
   moduleFileExtensions: ['ts', 'tsx', 'js', 'json'],
   moduleNameMapper: {
     '^.+\\.(md|jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
       '<rootDir>/config/jest/FileStub.js',
-    '^.+\\.css$': '<rootDir>/config/jest/CSSStub.js'
+    '^.+\\.css$': '<rootDir>/config/jest/CSSStub.js',
   },
   setupFiles: [
     '<rootDir>/config/polyfills.ts',
     '<rootDir>/config/jest/SetupEnzyme.ts',
-    '<rootDir>/config/jest/SetupTestEnvironment.ts'
+    '<rootDir>/config/jest/SetupTestEnvironment.ts',
   ],
   setupFilesAfterEnv: ['<rootDir>/config/jest/SetupReactTestingLibrary.ts'],
-  snapshotSerializers: ['enzyme-to-json/serializer', 'jest-emotion'],
+  snapshotSerializers: ['enzyme-to-json/serializer', '@emotion/jest/serializer'],
   testEnvironment: 'jsdom',
   testPathIgnorePatterns: ['<rootDir>/config', '<rootDir>/node_modules', '<rootDir>/scripts'],
   testRegex: '(/__tests__/.*|\\-test)\\.(ts|tsx|js)$',
@@ -28,10 +28,10 @@ module.exports = {
       '@swc/jest',
       {
         jsc: {
-          target: 'es2018'
-        }
-      }
-    ]
+          target: 'es2018',
+        },
+      },
+    ],
   },
   transformIgnorePatterns: ['/node_modules/(?!(d3-.+))/'],
   reporters: [
@@ -44,15 +44,15 @@ module.exports = {
         ancestorSeparator: ' > ',
         suiteNameTemplate: '{filename}',
         classNameTemplate: '{classname}',
-        titleTemplate: '{title}'
-      }
+        titleTemplate: '{title}',
+      },
     ],
     [
       './config/jest/ElasticSearchReporter.js',
       {
-        outputFilepath: '/tmp/ut-ts-web-monitoring.log'
-      }
-    ]
+        outputFilepath: '/tmp/ut-ts-web-monitoring.log',
+      },
+    ],
   ],
-  testTimeout: 30000
+  testTimeout: 30000,
 };
index 52c98cae9eff77f761f7b2391dd9ca548cdd7df8..abfbddd7bdacbc9d10db03fe1b0492d8c99a68cc 100644 (file)
@@ -86,7 +86,6 @@
     "fs-extra": "11.1.0",
     "http-proxy": "1.18.1",
     "jest": "29.3.1",
-    "jest-emotion": "10.0.32",
     "jest-environment-jsdom": "29.3.1",
     "jest-junit": "13.0.0",
     "jsdom": "20.0.3",
index 85382613b9f14b1827c895b3bfa6b5c646c0fa77..e6cdc1250600e499e9a141d4afd2fd1fa044c9fa 100644 (file)
@@ -10,7 +10,6 @@ exports[`should render 1`] = `
     loading={false}
   >
     <a
-      className=""
       data-qualifier="TRK"
       href="#"
       onClick={[Function]}
index 5df9d7b064a562c626cf137c3218033d2dfc08fb..944ad428b4f1bc2e002da3f84b1fb063f22711d1 100644 (file)
@@ -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"
   >
index 44825139d16fc6e83bd5860db5c4f58535fc514c..864ca5343482f7e5d8ad6b915d6d4f2430518c07 100644 (file)
@@ -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>
index 20d8cf07dd10d8dd51ae57bc0ee705dd96217b62..8d9c7eb4cb3a4af2e966148523740d3710c02bc0 100644 (file)
@@ -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"
index a314e5e89211f4685be86cb2951e6f8cb16bbf9b..a9b455d7bcfa88e352509392283a029c371de9cd 100644 (file)
@@ -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
index ca075b1de558d98d9b5ad8dcba482c608234823c..e0de880f2c589c70fa748e1fdc507dc013eca337 100644 (file)
@@ -144,7 +144,6 @@ exports[`should render the languages facet with the selected languages 2`] = `
       </button>
     </li>
     <li
-      className=""
       key="js"
     >
       <button
index 9754909b5eba8f734641bcd99f99a6bbb29051f5..ee936ccc3b6013e532279e39458a3b5f62141d02 100644 (file)
@@ -217,7 +217,6 @@ exports[`should render the tags facet with the selected tags 2`] = `
       </button>
     </li>
     <li
-      className=""
       key="csharp"
     >
       <button
index aa7d7f0de0d6b1787354eb84690c62459bdf9d04..3dfb0960ba508c01ef30db007441a669e6cf9157 100644 (file)
@@ -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
index 208ccf2633e5bfe86ef89a0a3d2baf7f8ebd44d7..b64b02e320e1d2249fb0dfb817247743bdb97b45 100644 (file)
@@ -22,9 +22,7 @@ exports[`should render correclty 1`] = `
     >
       <FormattingTips />
     </div>
-    <div
-      className=""
-    >
+    <div>
       <Button
         className="little-spacer-right"
         onClick={[Function]}
index a2062714e3bc9b8996afac4ce0c0f5ee75e16206..c939658a2738fad697c1e24d98551ac275579fd0 100644 (file)
@@ -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>
index 72ac5758063b81b86c776392b92e6b4a29f2f6b9..9f54f8afd366b9d5ceb56971f7e4ec19f17ab723 100644 (file)
@@ -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"
index 3bd42dc7b851ca7dad093340f6ea8f1c5ca5cc24..6a646251d00926c0c9262b6e3d1edc35cd373c30 100644 (file)
@@ -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]}
         >
index 24aff0fb75d2e9988b900a7174db1e1708fa72c9..f1aa3c446c3d737fa42e441c587cfafccb662940 100644 (file)
@@ -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"
       >
         ;
index ac1d95977037f54dc1624f67ed39964276c65afd..5ed0c2ae05a188dae9ca8368431f1ed37e178a4f 100644 (file)
@@ -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>
 `;
index bd319c9b038f7b31c2b392b3ef81d1ecf99e556d..7ffbbc16664099a85d6a042519999c6443bb1a13 100644 (file)
@@ -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]}
index c0396689423951561766e61430cf8e61f12b7979..804db4b4d9b7929d2f77c1230d7c73c01b35d3be 100644 (file)
@@ -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>
index 4b4e605c0adfeab30f3f607af8c0730c6c902ed6..cc15270b4b803d1e3604b4e53e1dba856ae4fdd5 100644 (file)
@@ -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>
index d2d9cf30567d9ddf42752c34a79a786119abd17b..1fcb716aab0cf8124113687f59a1a646a8faf5ef 100644 (file)
@@ -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
index 34de9c12318a0be7f9f06ebad4de25f151bad416..8cef344f439e3a10309fb1666e1fb2a467881529 100644 (file)
  * 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} />);
 }
index b6b82635f5166cfc36caadec2088cc2baf08b350..e60826739f76ea571513b6e0097b3995c5115fe1 100644 (file)
@@ -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 (file)
index cb4aa6e..0000000
+++ /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>
-`;
index c38eee7e38c9823aedcb865daa5aee53735a7d7e..c0af7d26fdff78be38bfb95f6baf78c0cdc7026f 100644 (file)
@@ -2370,13 +2370,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@types/jest@npm:^23.0.2":
-  version: 23.3.14
-  resolution: "@types/jest@npm:23.3.14"
-  checksum: 0f8ec7c7ef16c35afb17bb1c83167bb847b2a577e0298caf3d828c43026f7544eb831d63fe71bb0eee28c8724389cbf57402e5b9fe87a22b255bd79ece2c3152
-  languageName: node
-  linkType: hard
-
 "@types/jsdom@npm:^20.0.0":
   version: 20.0.1
   resolution: "@types/jsdom@npm:20.0.1"
@@ -2902,7 +2895,6 @@ __metadata:
     fs-extra: 11.1.0
     http-proxy: 1.18.1
     jest: 29.3.1
-    jest-emotion: 10.0.32
     jest-environment-jsdom: 29.3.1
     jest-junit: 13.0.0
     jsdom: 20.0.3
@@ -3687,7 +3679,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"chalk@npm:^2.0.0, chalk@npm:^2.4.1":
+"chalk@npm:^2.0.0":
   version: 2.4.2
   resolution: "chalk@npm:2.4.2"
   dependencies:
@@ -4024,18 +4016,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"css@npm:^2.2.1":
-  version: 2.2.4
-  resolution: "css@npm:2.2.4"
-  dependencies:
-    inherits: ^2.0.3
-    source-map: ^0.6.1
-    source-map-resolve: ^0.5.2
-    urix: ^0.1.0
-  checksum: a35d483c5ccc04bcde3b1e7393d58ad3eee1dd6956df0f152de38e46a17c0ee193c30eec6b1e59831ad0e74599385732000e95987fcc9cb2b16c6d951bae49e1
-  languageName: node
-  linkType: hard
-
 "css@npm:^3.0.0":
   version: 3.0.0
   resolution: "css@npm:3.0.0"
@@ -7030,18 +7010,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"jest-emotion@npm:10.0.32":
-  version: 10.0.32
-  resolution: "jest-emotion@npm:10.0.32"
-  dependencies:
-    "@babel/runtime": ^7.5.5
-    "@types/jest": ^23.0.2
-    chalk: ^2.4.1
-    css: ^2.2.1
-  checksum: 9e7cb48bd71c24059d4d6575901ce23f7200d2b6b4b7ea5fe27818fb52bac2adfbe60398be12dc80d51cc5ca8d6d42933a33d118d651acea6793a60ed0b25c94
-  languageName: node
-  linkType: hard
-
 "jest-environment-jsdom@npm:29.3.1":
   version: 29.3.1
   resolution: "jest-environment-jsdom@npm:29.3.1"
@@ -9425,13 +9393,6 @@ __metadata:
   languageName: node
   linkType: hard
 
-"resolve-url@npm:^0.2.1":
-  version: 0.2.1
-  resolution: "resolve-url@npm:0.2.1"
-  checksum: 7b7035b9ed6e7bc7d289e90aef1eab5a43834539695dac6416ca6e91f1a94132ae4796bbd173cdacfdc2ade90b5f38a3fb6186bebc1b221cd157777a23b9ad14
-  languageName: node
-  linkType: hard
-
 "resolve.exports@npm:^1.1.0":
   version: 1.1.0
   resolution: "resolve.exports@npm:1.1.0"
@@ -9837,19 +9798,6 @@ resolve@^1.2.0:
   languageName: node
   linkType: hard
 
-"source-map-resolve@npm:^0.5.2":
-  version: 0.5.3
-  resolution: "source-map-resolve@npm:0.5.3"
-  dependencies:
-    atob: ^2.1.2
-    decode-uri-component: ^0.2.0
-    resolve-url: ^0.2.1
-    source-map-url: ^0.4.0
-    urix: ^0.1.0
-  checksum: c73fa44ac00783f025f6ad9e038ab1a2e007cd6a6b86f47fe717c3d0765b4a08d264f6966f3bd7cd9dbcd69e4832783d5472e43247775b2a550d6f2155d24bae
-  languageName: node
-  linkType: hard
-
 "source-map-resolve@npm:^0.6.0":
   version: 0.6.0
   resolution: "source-map-resolve@npm:0.6.0"
@@ -9870,13 +9818,6 @@ resolve@^1.2.0:
   languageName: node
   linkType: hard
 
-"source-map-url@npm:^0.4.0":
-  version: 0.4.0
-  resolution: "source-map-url@npm:0.4.0"
-  checksum: 63ed54045fcd7b4ec7ca17513f48fdc23b573eef679326ecf1a31333e1aaecc0a9c085adaa7d118283b160e65b71cc72da9e1385f2de4ac5ed68294e3920d719
-  languageName: node
-  linkType: hard
-
 "source-map@npm:^0.5.0, source-map@npm:^0.5.7":
   version: 0.5.7
   resolution: "source-map@npm:0.5.7"
@@ -10593,13 +10534,6 @@ resolve@^1.2.0:
   languageName: node
   linkType: hard
 
-"urix@npm:^0.1.0":
-  version: 0.1.0
-  resolution: "urix@npm:0.1.0"
-  checksum: 4c076ecfbf3411e888547fe844e52378ab5ada2d2f27625139011eada79925e77f7fbf0e4016d45e6a9e9adb6b7e64981bd49b22700c7c401c5fc15f423303b3
-  languageName: node
-  linkType: hard
-
 "url-parse@npm:^1.5.3":
   version: 1.5.10
   resolution: "url-parse@npm:1.5.10"