Make notifications unit testable in behaviours

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
Janne Savolainen committed 2022-05-20 14:10:42 +03:00
1 parent 7623dc7bad
commit 1b46ccd18b
31 files changed
+403 -83

No files matched your search

@@ -1,11 +1,20 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`extension special characters in page registrations renders 1`] = `<div />`;
exports[`extension special characters in page registrations renders 1`] = `
<div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
exports[`extension special characters in page registrations when navigating to route with ID having special characters renders 1`] = `
<div>
<div>
Some page
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -1,12 +1,21 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`navigate to extension page renders 1`] = `<div />`;
exports[`navigate to extension page renders 1`] = `
<div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
exports[`navigate to extension page when extension navigates to child route renders 1`] = `
<div>
<div>
Child page
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -31,6 +40,9 @@ exports[`navigate to extension page when extension navigates to route with param
Some button
</button>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -55,6 +67,9 @@ exports[`navigate to extension page when extension navigates to route without pa
Some button
</button>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -79,5 +94,8 @@ exports[`navigate to extension page when extension navigates to route without pa
Some button
</button>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -8,6 +8,9 @@ exports[`navigating between routes given route with optional path parameters whe
"someOtherParameter": "some-other-value"
}
</pre>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -16,5 +19,8 @@ exports[`navigating between routes given route without path parameters when navi
<div>
Some component
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -1,6 +1,12 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`add-cluster - navigation using application menu renders 1`] = `<div />`;
exports[`add-cluster - navigation using application menu renders 1`] = `
<div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
exports[`add-cluster - navigation using application menu when navigating to add cluster using application menu renders 1`] = `
<div>
@@ -85,5 +91,8 @@ exports[`add-cluster - navigation using application menu when navigating to add
</div>
</div>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -328,6 +328,9 @@ exports[`cluster - order of sidebar items when rendered renders 1`] = `
</div>
</div>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -723,5 +726,8 @@ exports[`cluster - order of sidebar items when rendered when parent is expanded
</div>
</div>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -293,6 +293,9 @@ exports[`cluster - sidebar and tab navigation for core given core registrations
</div>
</div>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -589,6 +592,9 @@ exports[`cluster - sidebar and tab navigation for core given core registrations
</div>
</div>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -909,6 +915,9 @@ exports[`cluster - sidebar and tab navigation for core given core registrations
</div>
</div>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -1234,6 +1243,9 @@ exports[`cluster - sidebar and tab navigation for core given core registrations
<div
data-testid="some-child-page"
/>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -1534,6 +1546,9 @@ exports[`cluster - sidebar and tab navigation for core given core registrations
<div
data-testid="some-child-page"
/>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -1854,6 +1869,9 @@ exports[`cluster - sidebar and tab navigation for core given core registrations
</div>
</div>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -2150,5 +2168,8 @@ exports[`cluster - sidebar and tab navigation for core given core registrations
</div>
</div>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -293,6 +293,9 @@ exports[`cluster - sidebar and tab navigation for extensions given extension wit
</div>
</div>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -589,6 +592,9 @@ exports[`cluster - sidebar and tab navigation for extensions given extension wit
</div>
</div>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -929,6 +935,9 @@ exports[`cluster - sidebar and tab navigation for extensions given extension wit
</div>
</div>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -1313,6 +1322,9 @@ exports[`cluster - sidebar and tab navigation for extensions given extension wit
</div>
</main>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -1697,6 +1709,9 @@ exports[`cluster - sidebar and tab navigation for extensions given extension wit
</div>
</main>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -2036,6 +2051,9 @@ exports[`cluster - sidebar and tab navigation for extensions given extension wit
</div>
</main>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -2376,6 +2394,9 @@ exports[`cluster - sidebar and tab navigation for extensions given extension wit
</div>
</div>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -2672,5 +2693,8 @@ exports[`cluster - sidebar and tab navigation for extensions given extension wit
</div>
</div>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -261,6 +261,9 @@ exports[`cluster - visibility of sidebar items given kube resource for route is
</div>
</div>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -573,5 +576,8 @@ exports[`cluster - visibility of sidebar items given kube resource for route is
</div>
</div>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -1,6 +1,12 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`extensions - navigation using application menu renders 1`] = `<div />`;
exports[`extensions - navigation using application menu renders 1`] = `
<div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
exports[`extensions - navigation using application menu when navigating to extensions using application menu renders 1`] = `
<div>
@@ -118,5 +124,8 @@ exports[`extensions - navigation using application menu when navigating to exten
</div>
</div>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -454,5 +454,8 @@ exports[`helm-charts - navigation to Helm charts when navigating to Helm charts
</div>
</main>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -537,6 +537,9 @@ exports[`preferences - closing-preferences given accessing preferences directly
</div>
</div>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -679,6 +682,9 @@ exports[`preferences - closing-preferences given accessing preferences directly
</div>
</div>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -687,6 +693,9 @@ exports[`preferences - closing-preferences given accessing preferences directly
<div>
Some front page
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -695,6 +704,9 @@ exports[`preferences - closing-preferences given accessing preferences directly
<div>
Some front page
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -1235,6 +1247,9 @@ exports[`preferences - closing-preferences given already in a page and then navi
</div>
</div>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -1377,6 +1392,9 @@ exports[`preferences - closing-preferences given already in a page and then navi
</div>
</div>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -1519,6 +1537,9 @@ exports[`preferences - closing-preferences given already in a page and then navi
</div>
</div>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -1661,5 +1682,8 @@ exports[`preferences - closing-preferences given already in a page and then navi
</div>
</div>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -199,6 +199,9 @@ exports[`preferences - navigation to application preferences given in some child
</div>
</div>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -727,5 +730,8 @@ exports[`preferences - navigation to application preferences given in some child
</div>
</div>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -525,6 +525,9 @@ exports[`preferences - navigation to editor preferences given in preferences, wh
</div>
</div>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -935,5 +938,8 @@ exports[`preferences - navigation to editor preferences given in preferences, wh
</div>
</div>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -525,6 +525,9 @@ exports[`preferences - navigation to extension specific preferences given in pre
</div>
</div>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -1065,6 +1068,9 @@ exports[`preferences - navigation to extension specific preferences given in pre
</div>
</div>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -1239,5 +1245,8 @@ exports[`preferences - navigation to extension specific preferences given in pre
</div>
</div>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -525,6 +525,9 @@ exports[`preferences - navigation to kubernetes preferences given in preferences
</div>
</div>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -836,7 +839,7 @@ exports[`preferences - navigation to kubernetes preferences given in preferences
class="flex gaps"
>
<div
class="Select theme-lens box grow css-b62m3t-container"
class="Select theme-lens box grow Select--is-disabled css-3iigni-container"
>
<span
class="css-1f43avz-a11yText-A11yText"
@@ -849,7 +852,7 @@ exports[`preferences - navigation to kubernetes preferences given in preferences
class="css-1f43avz-a11yText-A11yText"
/>
<div
class="Select__control css-1s2u09g-control"
class="Select__control Select__control--is-disabled css-1insrsq-control"
>
<div
class="Select__value-container css-319lph-ValueContainer"
@@ -861,7 +864,7 @@ exports[`preferences - navigation to kubernetes preferences given in preferences
Repositories
</div>
<div
class="Select__input-container css-6j8wv5-Input"
class="Select__input-container css-jzldcf-Input"
data-value=""
>
<input
@@ -873,6 +876,7 @@ exports[`preferences - navigation to kubernetes preferences given in preferences
autocomplete="off"
autocorrect="off"
class="Select__input"
disabled=""
id="HelmRepoSelect"
role="combobox"
spellcheck="false"
@@ -886,8 +890,22 @@ exports[`preferences - navigation to kubernetes preferences given in preferences
<div
class="Select__indicators css-1hb7zxy-IndicatorsContainer"
>
<div
aria-hidden="true"
class="Select__indicator Select__loading-indicator css-at12u2-loadingIndicator"
>
<span
class="css-1xtdfmb-LoadingDot"
/>
<span
class="css-zoievk-LoadingDot"
/>
<span
class="css-x748d8-LoadingDot"
/>
</div>
<span
class="Select__indicator-separator css-1okebmr-indicatorSeparator"
class="Select__indicator-separator css-109onse-indicatorSeparator"
/>
<div
aria-hidden="true"
@@ -920,13 +938,11 @@ exports[`preferences - navigation to kubernetes preferences given in preferences
class="repos"
>
<div
class="notice"
class="pt-5 relative"
>
<div
class="flex-grow text-center"
>
The repositories have not been added yet
</div>
class="Spinner singleColor center"
/>
</div>
</div>
</div>
@@ -969,5 +985,8 @@ exports[`preferences - navigation to kubernetes preferences given in preferences
</div>
</div>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -525,6 +525,9 @@ exports[`preferences - navigation to proxy preferences given in preferences, whe
</div>
</div>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -727,5 +730,8 @@ exports[`preferences - navigation to proxy preferences given in preferences, whe
</div>
</div>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -185,6 +185,9 @@ exports[`preferences - navigation to telemetry preferences given URL for Sentry
</div>
</div>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -713,6 +716,9 @@ exports[`preferences - navigation to telemetry preferences given in preferences,
</div>
</div>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -1253,6 +1259,9 @@ exports[`preferences - navigation to telemetry preferences given in preferences,
</div>
</div>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -1429,6 +1438,9 @@ exports[`preferences - navigation to telemetry preferences given in preferences,
</div>
</div>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -1568,5 +1580,8 @@ exports[`preferences - navigation to telemetry preferences given no URL for Sent
</div>
</div>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -525,6 +525,9 @@ exports[`preferences - navigation to terminal preferences given in preferences,
</div>
</div>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -845,5 +848,8 @@ exports[`preferences - navigation to terminal preferences given in preferences,
</div>
</div>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -1,6 +1,12 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`preferences - navigation using application menu renders 1`] = `<div />`;
exports[`preferences - navigation using application menu renders 1`] = `
<div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
exports[`preferences - navigation using application menu when navigating to preferences using application menu renders 1`] = `
<div>
@@ -527,5 +533,8 @@ exports[`preferences - navigation using application menu when navigating to pref
</div>
</div>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
@@ -2,7 +2,11 @@
exports[`show-about-using-tray renders 1`] = `
<body>
<div />
<div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
</body>
`;
@@ -532,6 +536,9 @@ exports[`show-about-using-tray when navigating using tray renders 1`] = `
</div>
</div>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
</body>
`;
@@ -2,54 +2,90 @@
exports[`installing update using tray given no update is already downloaded, and "latest" update channel is selected, when started renders 1`] = `
<body>
<div />
<div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
</body>
`;
exports[`installing update using tray given no update is already downloaded, and "latest" update channel is selected, when started when user checks for updates using tray renders 1`] = `
<body>
<div />
<div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
</body>
`;
exports[`installing update using tray given no update is already downloaded, and "latest" update channel is selected, when started when user checks for updates using tray when new update is discovered renders 1`] = `
<body>
<div />
<div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
</body>
`;
exports[`installing update using tray given no update is already downloaded, and "latest" update channel is selected, when started when user checks for updates using tray when new update is discovered when download fails renders 1`] = `
<body>
<div />
<div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
</body>
`;
exports[`installing update using tray given no update is already downloaded, and "latest" update channel is selected, when started when user checks for updates using tray when new update is discovered when download succeeds renders 1`] = `
<body>
<div />
<div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
</body>
`;
exports[`installing update using tray given no update is already downloaded, and "latest" update channel is selected, when started when user checks for updates using tray when new update is discovered when download succeeds when user answers not to install the update renders 1`] = `
<body>
<div />
<div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
</body>
`;
exports[`installing update using tray given no update is already downloaded, and "latest" update channel is selected, when started when user checks for updates using tray when new update is discovered when download succeeds when user answers to install the update renders 1`] = `
<body>
<div />
<div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
</body>
`;
exports[`installing update using tray given no update is already downloaded, and "latest" update channel is selected, when started when user checks for updates using tray when new update is discovered when download succeeds when user disregards the question and installs the update using tray renders 1`] = `
<body>
<div />
<div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
</body>
`;
exports[`installing update using tray given no update is already downloaded, and "latest" update channel is selected, when started when user checks for updates using tray when no new update is discovered renders 1`] = `
<body>
<div />
<div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
</body>
`;
@@ -1,6 +1,12 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`welcome - navigation using application menu renders 1`] = `<div />`;
exports[`welcome - navigation using application menu renders 1`] = `
<div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;
exports[`welcome - navigation using application menu when navigating to welcome using application menu renders 1`] = `
<div>
@@ -87,5 +93,8 @@ exports[`welcome - navigation using application menu when navigating to welcome
</div>
</div>
</div>
<div
class="Notifications flex column align-flex-end"
/>
</div>
`;