1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Make some tests more deterministic by mocking tooltips

Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
Janne Savolainen 2022-06-06 15:59:27 +03:00
parent b78d3d5034
commit 467698bb83
No known key found for this signature in database
GPG Key ID: 8C6CFB2FFFE8F68A
6 changed files with 865 additions and 196 deletions

View File

@ -397,12 +397,6 @@ exports[`activate helm repository from list in preferences when navigating to pr
</div> </div>
</div> </div>
</div> </div>
<button
class="Button primary"
type="button"
>
Add Custom Helm Repo
</button>
</div> </div>
<div <div
class="repos" class="repos"
@ -511,11 +505,19 @@ exports[`activate helm repository from list in preferences when navigating to pr
</div> </div>
</div> </div>
</div> </div>
<button
class="Button primary"
data-testid="add-custom-helm-repo-button"
type="button"
>
Add Custom Helm Repo
</button>
</div> </div>
<div <div
class="Spinner singleColor" class="Spinner singleColor"
data-testid="helm-repositories-are-loading" data-testid="helm-repositories-are-loading"
/> />
<div />
</div> </div>
</section> </section>
</section> </section>
@ -960,12 +962,6 @@ exports[`activate helm repository from list in preferences when navigating to pr
</div> </div>
</div> </div>
</div> </div>
<button
class="Button primary"
type="button"
>
Add Custom Helm Repo
</button>
</div> </div>
<div <div
class="repos" class="repos"
@ -1059,6 +1055,13 @@ exports[`activate helm repository from list in preferences when navigating to pr
</div> </div>
</div> </div>
</div> </div>
<button
class="Button primary"
data-testid="add-custom-helm-repo-button"
type="button"
>
Add Custom Helm Repo
</button>
</div> </div>
<div <div
class="repos" class="repos"
@ -1080,8 +1083,8 @@ exports[`activate helm repository from list in preferences when navigating to pr
<i <i
class="Icon material interactive focusable" class="Icon material interactive focusable"
data-testid="deactivate-helm-repository-Some already active repository" data-testid="deactivate-helm-repository-Some already active repository"
id="tooltip_target_25"
tabindex="0" tabindex="0"
tooltip="Remove"
> >
<span <span
class="icon" class="icon"
@ -1089,10 +1092,10 @@ exports[`activate helm repository from list in preferences when navigating to pr
> >
delete delete
</span> </span>
<div />
</i> </i>
</div> </div>
</div> </div>
<div />
</div> </div>
</section> </section>
</section> </section>
@ -1537,12 +1540,6 @@ exports[`activate helm repository from list in preferences when navigating to pr
</div> </div>
</div> </div>
</div> </div>
<button
class="Button primary"
type="button"
>
Add Custom Helm Repo
</button>
</div> </div>
<div <div
class="repos" class="repos"
@ -1638,6 +1635,13 @@ exports[`activate helm repository from list in preferences when navigating to pr
</div> </div>
</div> </div>
</div> </div>
<button
class="Button primary"
data-testid="add-custom-helm-repo-button"
type="button"
>
Add Custom Helm Repo
</button>
</div> </div>
<div <div
class="repos" class="repos"
@ -1659,8 +1663,8 @@ exports[`activate helm repository from list in preferences when navigating to pr
<i <i
class="Icon material interactive focusable" class="Icon material interactive focusable"
data-testid="deactivate-helm-repository-Some already active repository" data-testid="deactivate-helm-repository-Some already active repository"
id="tooltip_target_32"
tabindex="0" tabindex="0"
tooltip="Remove"
> >
<span <span
class="icon" class="icon"
@ -1668,10 +1672,10 @@ exports[`activate helm repository from list in preferences when navigating to pr
> >
delete delete
</span> </span>
<div />
</i> </i>
</div> </div>
</div> </div>
<div />
</div> </div>
</section> </section>
</section> </section>
@ -2167,12 +2171,6 @@ exports[`activate helm repository from list in preferences when navigating to pr
</div> </div>
</div> </div>
</div> </div>
<button
class="Button primary"
type="button"
>
Add Custom Helm Repo
</button>
</div> </div>
<div <div
class="repos" class="repos"
@ -2266,6 +2264,13 @@ exports[`activate helm repository from list in preferences when navigating to pr
</div> </div>
</div> </div>
</div> </div>
<button
class="Button primary"
data-testid="add-custom-helm-repo-button"
type="button"
>
Add Custom Helm Repo
</button>
</div> </div>
<div <div
class="repos" class="repos"
@ -2287,8 +2292,8 @@ exports[`activate helm repository from list in preferences when navigating to pr
<i <i
class="Icon material interactive focusable" class="Icon material interactive focusable"
data-testid="deactivate-helm-repository-Some already active repository" data-testid="deactivate-helm-repository-Some already active repository"
id="tooltip_target_40"
tabindex="0" tabindex="0"
tooltip="Remove"
> >
<span <span
class="icon" class="icon"
@ -2296,10 +2301,10 @@ exports[`activate helm repository from list in preferences when navigating to pr
> >
delete delete
</span> </span>
<div />
</i> </i>
</div> </div>
</div> </div>
<div />
</div> </div>
</section> </section>
</section> </section>
@ -2744,12 +2749,6 @@ exports[`activate helm repository from list in preferences when navigating to pr
</div> </div>
</div> </div>
</div> </div>
<button
class="Button primary"
type="button"
>
Add Custom Helm Repo
</button>
</div> </div>
<div <div
class="repos" class="repos"
@ -2858,11 +2857,19 @@ exports[`activate helm repository from list in preferences when navigating to pr
</div> </div>
</div> </div>
</div> </div>
<button
class="Button primary"
data-testid="add-custom-helm-repo-button"
type="button"
>
Add Custom Helm Repo
</button>
</div> </div>
<div <div
class="Spinner singleColor" class="Spinner singleColor"
data-testid="helm-repositories-are-loading" data-testid="helm-repositories-are-loading"
/> />
<div />
</div> </div>
</section> </section>
</section> </section>
@ -3307,12 +3314,6 @@ exports[`activate helm repository from list in preferences when navigating to pr
</div> </div>
</div> </div>
</div> </div>
<button
class="Button primary"
type="button"
>
Add Custom Helm Repo
</button>
</div> </div>
<div <div
class="repos" class="repos"
@ -3406,6 +3407,13 @@ exports[`activate helm repository from list in preferences when navigating to pr
</div> </div>
</div> </div>
</div> </div>
<button
class="Button primary"
data-testid="add-custom-helm-repo-button"
type="button"
>
Add Custom Helm Repo
</button>
</div> </div>
<div <div
class="repos" class="repos"
@ -3427,8 +3435,8 @@ exports[`activate helm repository from list in preferences when navigating to pr
<i <i
class="Icon material interactive focusable" class="Icon material interactive focusable"
data-testid="deactivate-helm-repository-Some already active repository" data-testid="deactivate-helm-repository-Some already active repository"
id="tooltip_target_88"
tabindex="0" tabindex="0"
tooltip="Remove"
> >
<span <span
class="icon" class="icon"
@ -3436,7 +3444,6 @@ exports[`activate helm repository from list in preferences when navigating to pr
> >
delete delete
</span> </span>
<div />
</i> </i>
</div> </div>
<div <div
@ -3456,8 +3463,8 @@ exports[`activate helm repository from list in preferences when navigating to pr
<i <i
class="Icon material interactive focusable" class="Icon material interactive focusable"
data-testid="deactivate-helm-repository-Some to be activated repository" data-testid="deactivate-helm-repository-Some to be activated repository"
id="tooltip_target_89"
tabindex="0" tabindex="0"
tooltip="Remove"
> >
<span <span
class="icon" class="icon"
@ -3465,10 +3472,10 @@ exports[`activate helm repository from list in preferences when navigating to pr
> >
delete delete
</span> </span>
<div />
</i> </i>
</div> </div>
</div> </div>
<div />
</div> </div>
</section> </section>
</section> </section>
@ -3913,12 +3920,6 @@ exports[`activate helm repository from list in preferences when navigating to pr
</div> </div>
</div> </div>
</div> </div>
<button
class="Button primary"
type="button"
>
Add Custom Helm Repo
</button>
</div> </div>
<div <div
class="repos" class="repos"
@ -4014,6 +4015,13 @@ exports[`activate helm repository from list in preferences when navigating to pr
</div> </div>
</div> </div>
</div> </div>
<button
class="Button primary"
data-testid="add-custom-helm-repo-button"
type="button"
>
Add Custom Helm Repo
</button>
</div> </div>
<div <div
class="repos" class="repos"
@ -4035,8 +4043,8 @@ exports[`activate helm repository from list in preferences when navigating to pr
<i <i
class="Icon material interactive focusable" class="Icon material interactive focusable"
data-testid="deactivate-helm-repository-Some already active repository" data-testid="deactivate-helm-repository-Some already active repository"
id="tooltip_target_99"
tabindex="0" tabindex="0"
tooltip="Remove"
> >
<span <span
class="icon" class="icon"
@ -4044,7 +4052,6 @@ exports[`activate helm repository from list in preferences when navigating to pr
> >
delete delete
</span> </span>
<div />
</i> </i>
</div> </div>
<div <div
@ -4064,8 +4071,8 @@ exports[`activate helm repository from list in preferences when navigating to pr
<i <i
class="Icon material interactive focusable" class="Icon material interactive focusable"
data-testid="deactivate-helm-repository-Some to be activated repository" data-testid="deactivate-helm-repository-Some to be activated repository"
id="tooltip_target_100"
tabindex="0" tabindex="0"
tooltip="Remove"
> >
<span <span
class="icon" class="icon"
@ -4073,10 +4080,10 @@ exports[`activate helm repository from list in preferences when navigating to pr
> >
delete delete
</span> </span>
<div />
</i> </i>
</div> </div>
</div> </div>
<div />
</div> </div>
</section> </section>
</section> </section>
@ -4582,12 +4589,6 @@ exports[`activate helm repository from list in preferences when navigating to pr
</div> </div>
</div> </div>
</div> </div>
<button
class="Button primary"
type="button"
>
Add Custom Helm Repo
</button>
</div> </div>
<div <div
class="repos" class="repos"
@ -4681,6 +4682,13 @@ exports[`activate helm repository from list in preferences when navigating to pr
</div> </div>
</div> </div>
</div> </div>
<button
class="Button primary"
data-testid="add-custom-helm-repo-button"
type="button"
>
Add Custom Helm Repo
</button>
</div> </div>
<div <div
class="repos" class="repos"
@ -4702,8 +4710,8 @@ exports[`activate helm repository from list in preferences when navigating to pr
<i <i
class="Icon material interactive focusable" class="Icon material interactive focusable"
data-testid="deactivate-helm-repository-Some already active repository" data-testid="deactivate-helm-repository-Some already active repository"
id="tooltip_target_112"
tabindex="0" tabindex="0"
tooltip="Remove"
> >
<span <span
class="icon" class="icon"
@ -4711,7 +4719,6 @@ exports[`activate helm repository from list in preferences when navigating to pr
> >
delete delete
</span> </span>
<div />
</i> </i>
</div> </div>
<div <div
@ -4731,8 +4738,8 @@ exports[`activate helm repository from list in preferences when navigating to pr
<i <i
class="Icon material interactive focusable" class="Icon material interactive focusable"
data-testid="deactivate-helm-repository-Some to be activated repository" data-testid="deactivate-helm-repository-Some to be activated repository"
id="tooltip_target_113"
tabindex="0" tabindex="0"
tooltip="Remove"
> >
<span <span
class="icon" class="icon"
@ -4740,10 +4747,10 @@ exports[`activate helm repository from list in preferences when navigating to pr
> >
delete delete
</span> </span>
<div />
</i> </i>
</div> </div>
</div> </div>
<div />
</div> </div>
</section> </section>
</section> </section>
@ -5188,12 +5195,6 @@ exports[`activate helm repository from list in preferences when navigating to pr
</div> </div>
</div> </div>
</div> </div>
<button
class="Button primary"
type="button"
>
Add Custom Helm Repo
</button>
</div> </div>
<div <div
class="repos" class="repos"
@ -5302,11 +5303,19 @@ exports[`activate helm repository from list in preferences when navigating to pr
</div> </div>
</div> </div>
</div> </div>
<button
class="Button primary"
data-testid="add-custom-helm-repo-button"
type="button"
>
Add Custom Helm Repo
</button>
</div> </div>
<div <div
class="Spinner singleColor" class="Spinner singleColor"
data-testid="helm-repositories-are-loading" data-testid="helm-repositories-are-loading"
/> />
<div />
</div> </div>
</section> </section>
</section> </section>

View File

@ -397,12 +397,6 @@ exports[`deactivate helm repository from list of active repositories in preferen
</div> </div>
</div> </div>
</div> </div>
<button
class="Button primary"
type="button"
>
Add Custom Helm Repo
</button>
</div> </div>
<div <div
class="repos" class="repos"
@ -511,11 +505,19 @@ exports[`deactivate helm repository from list of active repositories in preferen
</div> </div>
</div> </div>
</div> </div>
<button
class="Button primary"
data-testid="add-custom-helm-repo-button"
type="button"
>
Add Custom Helm Repo
</button>
</div> </div>
<div <div
class="Spinner singleColor" class="Spinner singleColor"
data-testid="helm-repositories-are-loading" data-testid="helm-repositories-are-loading"
/> />
<div />
</div> </div>
</section> </section>
</section> </section>
@ -960,12 +962,6 @@ exports[`deactivate helm repository from list of active repositories in preferen
</div> </div>
</div> </div>
</div> </div>
<button
class="Button primary"
type="button"
>
Add Custom Helm Repo
</button>
</div> </div>
<div <div
class="repos" class="repos"
@ -1059,6 +1055,13 @@ exports[`deactivate helm repository from list of active repositories in preferen
</div> </div>
</div> </div>
</div> </div>
<button
class="Button primary"
data-testid="add-custom-helm-repo-button"
type="button"
>
Add Custom Helm Repo
</button>
</div> </div>
<div <div
class="repos" class="repos"
@ -1080,8 +1083,8 @@ exports[`deactivate helm repository from list of active repositories in preferen
<i <i
class="Icon material interactive focusable" class="Icon material interactive focusable"
data-testid="deactivate-helm-repository-some-active-repository" data-testid="deactivate-helm-repository-some-active-repository"
id="tooltip_target_13"
tabindex="0" tabindex="0"
tooltip="Remove"
> >
<span <span
class="icon" class="icon"
@ -1089,10 +1092,10 @@ exports[`deactivate helm repository from list of active repositories in preferen
> >
delete delete
</span> </span>
<div />
</i> </i>
</div> </div>
</div> </div>
<div />
</div> </div>
</section> </section>
</section> </section>
@ -1537,12 +1540,6 @@ exports[`deactivate helm repository from list of active repositories in preferen
</div> </div>
</div> </div>
</div> </div>
<button
class="Button primary"
type="button"
>
Add Custom Helm Repo
</button>
</div> </div>
<div <div
class="repos" class="repos"
@ -1636,6 +1633,13 @@ exports[`deactivate helm repository from list of active repositories in preferen
</div> </div>
</div> </div>
</div> </div>
<button
class="Button primary"
data-testid="add-custom-helm-repo-button"
type="button"
>
Add Custom Helm Repo
</button>
</div> </div>
<div <div
class="repos" class="repos"
@ -1657,8 +1661,8 @@ exports[`deactivate helm repository from list of active repositories in preferen
<i <i
class="Icon material interactive focusable" class="Icon material interactive focusable"
data-testid="deactivate-helm-repository-some-active-repository" data-testid="deactivate-helm-repository-some-active-repository"
id="tooltip_target_20"
tabindex="0" tabindex="0"
tooltip="Remove"
> >
<span <span
class="icon" class="icon"
@ -1666,10 +1670,10 @@ exports[`deactivate helm repository from list of active repositories in preferen
> >
delete delete
</span> </span>
<div />
</i> </i>
</div> </div>
</div> </div>
<div />
</div> </div>
</section> </section>
</section> </section>
@ -2114,12 +2118,6 @@ exports[`deactivate helm repository from list of active repositories in preferen
</div> </div>
</div> </div>
</div> </div>
<button
class="Button primary"
type="button"
>
Add Custom Helm Repo
</button>
</div> </div>
<div <div
class="repos" class="repos"
@ -2228,11 +2226,19 @@ exports[`deactivate helm repository from list of active repositories in preferen
</div> </div>
</div> </div>
</div> </div>
<button
class="Button primary"
data-testid="add-custom-helm-repo-button"
type="button"
>
Add Custom Helm Repo
</button>
</div> </div>
<div <div
class="Spinner singleColor" class="Spinner singleColor"
data-testid="helm-repositories-are-loading" data-testid="helm-repositories-are-loading"
/> />
<div />
</div> </div>
</section> </section>
</section> </section>

View File

@ -397,12 +397,6 @@ exports[`listing active helm repositories in preferences when navigating to pref
</div> </div>
</div> </div>
</div> </div>
<button
class="Button primary"
type="button"
>
Add Custom Helm Repo
</button>
</div> </div>
<div <div
class="repos" class="repos"
@ -420,11 +414,110 @@ exports[`listing active helm repositories in preferences when navigating to pref
<div <div
class="flex gaps" class="flex gaps"
> >
<div>
<div
class="Select theme-lens box grow Select--is-disabled css-3iigni-container"
>
<span
class="css-1f43avz-a11yText-A11yText"
id="react-select-selection-of-active-public-helm-repository-live-region"
/>
<span
aria-atomic="false"
aria-live="polite"
aria-relevant="additions text"
class="css-1f43avz-a11yText-A11yText"
/>
<div
class="Select__control Select__control--is-disabled css-1insrsq-control"
>
<div
class="Select__value-container css-319lph-ValueContainer"
>
<div
class="Select__placeholder css-14el2xx-placeholder"
id="react-select-selection-of-active-public-helm-repository-placeholder"
>
Repositories
</div>
<div
class="Select__input-container css-jzldcf-Input"
data-value=""
>
<input
aria-autocomplete="list"
aria-describedby="react-select-selection-of-active-public-helm-repository-placeholder"
aria-expanded="false"
aria-haspopup="true"
autocapitalize="none"
autocomplete="off"
autocorrect="off"
class="Select__input"
disabled=""
id="selection-of-active-public-helm-repository"
role="combobox"
spellcheck="false"
style="opacity: 1; width: 100%; grid-area: 1 / 2; min-width: 2px; border: 0px; margin: 0px; outline: 0; padding: 0px;"
tabindex="0"
type="text"
value=""
/>
</div>
</div>
<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-109onse-indicatorSeparator"
/>
<div
aria-hidden="true"
class="Select__indicator Select__dropdown-indicator css-tlfecz-indicatorContainer"
>
<svg
aria-hidden="true"
class="css-tj5bde-Svg"
focusable="false"
height="20"
viewBox="0 0 20 20"
width="20"
>
<path
d="M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"
/>
</svg>
</div>
</div>
</div>
</div>
</div>
<button
class="Button primary"
data-testid="add-custom-helm-repo-button"
type="button"
>
Add Custom Helm Repo
</button>
</div>
<div <div
class="Spinner singleColor" class="Spinner singleColor"
data-testid="helm-repositories-are-loading" data-testid="helm-repositories-are-loading"
/> />
</div> <div />
</div> </div>
</section> </section>
</section> </section>
@ -869,12 +962,6 @@ exports[`listing active helm repositories in preferences when navigating to pref
</div> </div>
</div> </div>
</div> </div>
<button
class="Button primary"
type="button"
>
Add Custom Helm Repo
</button>
</div> </div>
<div <div
class="repos" class="repos"
@ -892,11 +979,110 @@ exports[`listing active helm repositories in preferences when navigating to pref
<div <div
class="flex gaps" class="flex gaps"
> >
<div>
<div
class="Select theme-lens box grow Select--is-disabled css-3iigni-container"
>
<span
class="css-1f43avz-a11yText-A11yText"
id="react-select-selection-of-active-public-helm-repository-live-region"
/>
<span
aria-atomic="false"
aria-live="polite"
aria-relevant="additions text"
class="css-1f43avz-a11yText-A11yText"
/>
<div
class="Select__control Select__control--is-disabled css-1insrsq-control"
>
<div
class="Select__value-container css-319lph-ValueContainer"
>
<div
class="Select__placeholder css-14el2xx-placeholder"
id="react-select-selection-of-active-public-helm-repository-placeholder"
>
Repositories
</div>
<div
class="Select__input-container css-jzldcf-Input"
data-value=""
>
<input
aria-autocomplete="list"
aria-describedby="react-select-selection-of-active-public-helm-repository-placeholder"
aria-expanded="false"
aria-haspopup="true"
autocapitalize="none"
autocomplete="off"
autocorrect="off"
class="Select__input"
disabled=""
id="selection-of-active-public-helm-repository"
role="combobox"
spellcheck="false"
style="opacity: 1; width: 100%; grid-area: 1 / 2; min-width: 2px; border: 0px; margin: 0px; outline: 0; padding: 0px;"
tabindex="0"
type="text"
value=""
/>
</div>
</div>
<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-109onse-indicatorSeparator"
/>
<div
aria-hidden="true"
class="Select__indicator Select__dropdown-indicator css-tlfecz-indicatorContainer"
>
<svg
aria-hidden="true"
class="css-tj5bde-Svg"
focusable="false"
height="20"
viewBox="0 0 20 20"
width="20"
>
<path
d="M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"
/>
</svg>
</div>
</div>
</div>
</div>
</div>
<button
class="Button primary"
data-testid="add-custom-helm-repo-button"
type="button"
>
Add Custom Helm Repo
</button>
</div>
<div <div
class="Spinner singleColor" class="Spinner singleColor"
data-testid="helm-repositories-are-loading" data-testid="helm-repositories-are-loading"
/> />
</div> <div />
</div> </div>
</section> </section>
</section> </section>
@ -1341,12 +1527,6 @@ exports[`listing active helm repositories in preferences when navigating to pref
</div> </div>
</div> </div>
</div> </div>
<button
class="Button primary"
type="button"
>
Add Custom Helm Repo
</button>
</div> </div>
<div <div
class="repos" class="repos"
@ -1364,10 +1544,96 @@ exports[`listing active helm repositories in preferences when navigating to pref
<div <div
class="flex gaps" class="flex gaps"
> >
<div>
<div
class="Select theme-lens box grow css-b62m3t-container"
>
<span
class="css-1f43avz-a11yText-A11yText"
id="react-select-selection-of-active-public-helm-repository-live-region"
/>
<span
aria-atomic="false"
aria-live="polite"
aria-relevant="additions text"
class="css-1f43avz-a11yText-A11yText"
/>
<div
class="Select__control css-1s2u09g-control"
>
<div
class="Select__value-container css-319lph-ValueContainer"
>
<div
class="Select__placeholder css-14el2xx-placeholder"
id="react-select-selection-of-active-public-helm-repository-placeholder"
>
Repositories
</div>
<div
class="Select__input-container css-6j8wv5-Input"
data-value=""
>
<input
aria-autocomplete="list"
aria-describedby="react-select-selection-of-active-public-helm-repository-placeholder"
aria-expanded="false"
aria-haspopup="true"
autocapitalize="none"
autocomplete="off"
autocorrect="off"
class="Select__input"
id="selection-of-active-public-helm-repository"
role="combobox"
spellcheck="false"
style="opacity: 1; width: 100%; grid-area: 1 / 2; min-width: 2px; border: 0px; margin: 0px; outline: 0; padding: 0px;"
tabindex="0"
type="text"
value=""
/>
</div>
</div>
<div
class="Select__indicators css-1hb7zxy-IndicatorsContainer"
>
<span
class="Select__indicator-separator css-1okebmr-indicatorSeparator"
/>
<div
aria-hidden="true"
class="Select__indicator Select__dropdown-indicator css-tlfecz-indicatorContainer"
>
<svg
aria-hidden="true"
class="css-tj5bde-Svg"
focusable="false"
height="20"
viewBox="0 0 20 20"
width="20"
>
<path
d="M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"
/>
</svg>
</div>
</div>
</div>
</div>
</div>
<button
class="Button primary"
data-testid="add-custom-helm-repo-button"
type="button"
>
Add Custom Helm Repo
</button>
</div>
<div <div
class="repos" class="repos"
> >
<div> <div
class="item flex gaps align-center justify-space-between mt-3"
>
<div <div
class="repoName" class="repoName"
data-testid="helm-repository-some-repository" data-testid="helm-repository-some-repository"
@ -1379,8 +1645,23 @@ exports[`listing active helm repositories in preferences when navigating to pref
> >
some-repository-url some-repository-url
</div> </div>
<i
class="Icon material interactive focusable"
data-testid="deactivate-helm-repository-some-repository"
tabindex="0"
tooltip="Remove"
>
<span
class="icon"
data-icon-name="delete"
>
delete
</span>
</i>
</div> </div>
<div> <div
class="item flex gaps align-center justify-space-between mt-3"
>
<div <div
class="repoName" class="repoName"
data-testid="helm-repository-some-other-repository" data-testid="helm-repository-some-other-repository"
@ -1392,9 +1673,22 @@ exports[`listing active helm repositories in preferences when navigating to pref
> >
some-other-repository-url some-other-repository-url
</div> </div>
<i
class="Icon material interactive focusable"
data-testid="deactivate-helm-repository-some-other-repository"
tabindex="0"
tooltip="Remove"
>
<span
class="icon"
data-icon-name="delete"
>
delete
</span>
</i>
</div> </div>
</div> </div>
</div> <div />
</div> </div>
</section> </section>
</section> </section>
@ -1839,12 +2133,6 @@ exports[`listing active helm repositories in preferences when navigating to pref
</div> </div>
</div> </div>
</div> </div>
<button
class="Button primary"
type="button"
>
Add Custom Helm Repo
</button>
</div> </div>
<div <div
class="repos" class="repos"
@ -1862,11 +2150,110 @@ exports[`listing active helm repositories in preferences when navigating to pref
<div <div
class="flex gaps" class="flex gaps"
> >
<div>
<div
class="Select theme-lens box grow Select--is-disabled css-3iigni-container"
>
<span
class="css-1f43avz-a11yText-A11yText"
id="react-select-selection-of-active-public-helm-repository-live-region"
/>
<span
aria-atomic="false"
aria-live="polite"
aria-relevant="additions text"
class="css-1f43avz-a11yText-A11yText"
/>
<div
class="Select__control Select__control--is-disabled css-1insrsq-control"
>
<div
class="Select__value-container css-319lph-ValueContainer"
>
<div
class="Select__placeholder css-14el2xx-placeholder"
id="react-select-selection-of-active-public-helm-repository-placeholder"
>
Repositories
</div>
<div
class="Select__input-container css-jzldcf-Input"
data-value=""
>
<input
aria-autocomplete="list"
aria-describedby="react-select-selection-of-active-public-helm-repository-placeholder"
aria-expanded="false"
aria-haspopup="true"
autocapitalize="none"
autocomplete="off"
autocorrect="off"
class="Select__input"
disabled=""
id="selection-of-active-public-helm-repository"
role="combobox"
spellcheck="false"
style="opacity: 1; width: 100%; grid-area: 1 / 2; min-width: 2px; border: 0px; margin: 0px; outline: 0; padding: 0px;"
tabindex="0"
type="text"
value=""
/>
</div>
</div>
<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-109onse-indicatorSeparator"
/>
<div
aria-hidden="true"
class="Select__indicator Select__dropdown-indicator css-tlfecz-indicatorContainer"
>
<svg
aria-hidden="true"
class="css-tj5bde-Svg"
focusable="false"
height="20"
viewBox="0 0 20 20"
width="20"
>
<path
d="M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"
/>
</svg>
</div>
</div>
</div>
</div>
</div>
<button
class="Button primary"
data-testid="add-custom-helm-repo-button"
type="button"
>
Add Custom Helm Repo
</button>
</div>
<div <div
class="Spinner singleColor" class="Spinner singleColor"
data-testid="helm-repositories-are-loading" data-testid="helm-repositories-are-loading"
/> />
</div> <div />
</div> </div>
</section> </section>
</section> </section>
@ -2311,12 +2698,6 @@ exports[`listing active helm repositories in preferences when navigating to pref
</div> </div>
</div> </div>
</div> </div>
<button
class="Button primary"
type="button"
>
Add Custom Helm Repo
</button>
</div> </div>
<div <div
class="repos" class="repos"
@ -2334,11 +2715,110 @@ exports[`listing active helm repositories in preferences when navigating to pref
<div <div
class="flex gaps" class="flex gaps"
> >
<div>
<div
class="Select theme-lens box grow Select--is-disabled css-3iigni-container"
>
<span
class="css-1f43avz-a11yText-A11yText"
id="react-select-selection-of-active-public-helm-repository-live-region"
/>
<span
aria-atomic="false"
aria-live="polite"
aria-relevant="additions text"
class="css-1f43avz-a11yText-A11yText"
/>
<div
class="Select__control Select__control--is-disabled css-1insrsq-control"
>
<div
class="Select__value-container css-319lph-ValueContainer"
>
<div
class="Select__placeholder css-14el2xx-placeholder"
id="react-select-selection-of-active-public-helm-repository-placeholder"
>
Repositories
</div>
<div
class="Select__input-container css-jzldcf-Input"
data-value=""
>
<input
aria-autocomplete="list"
aria-describedby="react-select-selection-of-active-public-helm-repository-placeholder"
aria-expanded="false"
aria-haspopup="true"
autocapitalize="none"
autocomplete="off"
autocorrect="off"
class="Select__input"
disabled=""
id="selection-of-active-public-helm-repository"
role="combobox"
spellcheck="false"
style="opacity: 1; width: 100%; grid-area: 1 / 2; min-width: 2px; border: 0px; margin: 0px; outline: 0; padding: 0px;"
tabindex="0"
type="text"
value=""
/>
</div>
</div>
<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-109onse-indicatorSeparator"
/>
<div
aria-hidden="true"
class="Select__indicator Select__dropdown-indicator css-tlfecz-indicatorContainer"
>
<svg
aria-hidden="true"
class="css-tj5bde-Svg"
focusable="false"
height="20"
viewBox="0 0 20 20"
width="20"
>
<path
d="M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"
/>
</svg>
</div>
</div>
</div>
</div>
</div>
<button
class="Button primary"
data-testid="add-custom-helm-repo-button"
type="button"
>
Add Custom Helm Repo
</button>
</div>
<div <div
class="Spinner singleColor" class="Spinner singleColor"
data-testid="helm-repositories-are-loading" data-testid="helm-repositories-are-loading"
/> />
</div> <div />
</div> </div>
</section> </section>
</section> </section>
@ -2783,12 +3263,6 @@ exports[`listing active helm repositories in preferences when navigating to pref
</div> </div>
</div> </div>
</div> </div>
<button
class="Button primary"
type="button"
>
Add Custom Helm Repo
</button>
</div> </div>
<div <div
class="repos" class="repos"
@ -2806,6 +3280,90 @@ exports[`listing active helm repositories in preferences when navigating to pref
<div <div
class="flex gaps" class="flex gaps"
> >
<div>
<div
class="Select theme-lens box grow css-b62m3t-container"
>
<span
class="css-1f43avz-a11yText-A11yText"
id="react-select-selection-of-active-public-helm-repository-live-region"
/>
<span
aria-atomic="false"
aria-live="polite"
aria-relevant="additions text"
class="css-1f43avz-a11yText-A11yText"
/>
<div
class="Select__control css-1s2u09g-control"
>
<div
class="Select__value-container css-319lph-ValueContainer"
>
<div
class="Select__placeholder css-14el2xx-placeholder"
id="react-select-selection-of-active-public-helm-repository-placeholder"
>
Repositories
</div>
<div
class="Select__input-container css-6j8wv5-Input"
data-value=""
>
<input
aria-autocomplete="list"
aria-describedby="react-select-selection-of-active-public-helm-repository-placeholder"
aria-expanded="false"
aria-haspopup="true"
autocapitalize="none"
autocomplete="off"
autocorrect="off"
class="Select__input"
id="selection-of-active-public-helm-repository"
role="combobox"
spellcheck="false"
style="opacity: 1; width: 100%; grid-area: 1 / 2; min-width: 2px; border: 0px; margin: 0px; outline: 0; padding: 0px;"
tabindex="0"
type="text"
value=""
/>
</div>
</div>
<div
class="Select__indicators css-1hb7zxy-IndicatorsContainer"
>
<span
class="Select__indicator-separator css-1okebmr-indicatorSeparator"
/>
<div
aria-hidden="true"
class="Select__indicator Select__dropdown-indicator css-tlfecz-indicatorContainer"
>
<svg
aria-hidden="true"
class="css-tj5bde-Svg"
focusable="false"
height="20"
viewBox="0 0 20 20"
width="20"
>
<path
d="M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"
/>
</svg>
</div>
</div>
</div>
</div>
</div>
<button
class="Button primary"
data-testid="add-custom-helm-repo-button"
type="button"
>
Add Custom Helm Repo
</button>
</div>
<div <div
class="notice" class="notice"
> >
@ -2816,7 +3374,7 @@ exports[`listing active helm repositories in preferences when navigating to pref
The repositories have not been added yet The repositories have not been added yet
</div> </div>
</div> </div>
</div> <div />
</div> </div>
</section> </section>
</section> </section>
@ -3261,12 +3819,6 @@ exports[`listing active helm repositories in preferences when navigating to pref
</div> </div>
</div> </div>
</div> </div>
<button
class="Button primary"
type="button"
>
Add Custom Helm Repo
</button>
</div> </div>
<div <div
class="repos" class="repos"
@ -3284,6 +3836,90 @@ exports[`listing active helm repositories in preferences when navigating to pref
<div <div
class="flex gaps" class="flex gaps"
> >
<div>
<div
class="Select theme-lens box grow css-b62m3t-container"
>
<span
class="css-1f43avz-a11yText-A11yText"
id="react-select-selection-of-active-public-helm-repository-live-region"
/>
<span
aria-atomic="false"
aria-live="polite"
aria-relevant="additions text"
class="css-1f43avz-a11yText-A11yText"
/>
<div
class="Select__control css-1s2u09g-control"
>
<div
class="Select__value-container css-319lph-ValueContainer"
>
<div
class="Select__placeholder css-14el2xx-placeholder"
id="react-select-selection-of-active-public-helm-repository-placeholder"
>
Repositories
</div>
<div
class="Select__input-container css-6j8wv5-Input"
data-value=""
>
<input
aria-autocomplete="list"
aria-describedby="react-select-selection-of-active-public-helm-repository-placeholder"
aria-expanded="false"
aria-haspopup="true"
autocapitalize="none"
autocomplete="off"
autocorrect="off"
class="Select__input"
id="selection-of-active-public-helm-repository"
role="combobox"
spellcheck="false"
style="opacity: 1; width: 100%; grid-area: 1 / 2; min-width: 2px; border: 0px; margin: 0px; outline: 0; padding: 0px;"
tabindex="0"
type="text"
value=""
/>
</div>
</div>
<div
class="Select__indicators css-1hb7zxy-IndicatorsContainer"
>
<span
class="Select__indicator-separator css-1okebmr-indicatorSeparator"
/>
<div
aria-hidden="true"
class="Select__indicator Select__dropdown-indicator css-tlfecz-indicatorContainer"
>
<svg
aria-hidden="true"
class="css-tj5bde-Svg"
focusable="false"
height="20"
viewBox="0 0 20 20"
width="20"
>
<path
d="M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"
/>
</svg>
</div>
</div>
</div>
</div>
</div>
<button
class="Button primary"
data-testid="add-custom-helm-repo-button"
type="button"
>
Add Custom Helm Repo
</button>
</div>
<div <div
class="notice" class="notice"
> >
@ -3294,7 +3930,7 @@ exports[`listing active helm repositories in preferences when navigating to pref
The repositories have not been added yet The repositories have not been added yet
</div> </div>
</div> </div>
</div> <div />
</div> </div>
</section> </section>
</section> </section>

View File

@ -13,6 +13,12 @@ import getActiveHelmRepositoriesInjectable from "../../main/helm/repositories/ge
import type { HelmRepo } from "../../common/helm-repo"; import type { HelmRepo } from "../../common/helm-repo";
import callForPublicHelmRepositoriesInjectable from "../../renderer/components/+preferences/kubernetes/helm-charts/activation-of-public-helm-repository/public-helm-repositories/call-for-public-helm-repositories.injectable"; import callForPublicHelmRepositoriesInjectable from "../../renderer/components/+preferences/kubernetes/helm-charts/activation-of-public-helm-repository/public-helm-repositories/call-for-public-helm-repositories.injectable";
// TODO: Make tooltips free of side effects by making it deterministic
jest.mock("../../renderer/components/tooltip/withTooltip", () => ({
withTooltip: (target: any) => target,
}));
describe("activate helm repository from list in preferences", () => { describe("activate helm repository from list in preferences", () => {
let applicationBuilder: ApplicationBuilder; let applicationBuilder: ApplicationBuilder;
let rendered: RenderResult; let rendered: RenderResult;

View File

@ -14,6 +14,11 @@ import getActiveHelmRepositoriesInjectable from "../../main/helm/repositories/ge
import type { HelmRepo } from "../../common/helm-repo"; import type { HelmRepo } from "../../common/helm-repo";
import callForPublicHelmRepositoriesInjectable from "../../renderer/components/+preferences/kubernetes/helm-charts/activation-of-public-helm-repository/public-helm-repositories/call-for-public-helm-repositories.injectable"; import callForPublicHelmRepositoriesInjectable from "../../renderer/components/+preferences/kubernetes/helm-charts/activation-of-public-helm-repository/public-helm-repositories/call-for-public-helm-repositories.injectable";
// TODO: Make tooltips free of side effects by making it deterministic
jest.mock("../../renderer/components/tooltip/withTooltip", () => ({
withTooltip: (target: any) => target,
}));
describe("deactivate helm repository from list of active repositories in preferences", () => { describe("deactivate helm repository from list of active repositories in preferences", () => {
let applicationBuilder: ApplicationBuilder; let applicationBuilder: ApplicationBuilder;
let rendered: RenderResult; let rendered: RenderResult;

View File

@ -14,6 +14,12 @@ import execFileInjectable from "../../common/fs/exec-file.injectable";
import helmBinaryPathInjectable from "../../main/helm/helm-binary-path.injectable"; import helmBinaryPathInjectable from "../../main/helm/helm-binary-path.injectable";
import loggerInjectable from "../../common/logger.injectable"; import loggerInjectable from "../../common/logger.injectable";
import type { Logger } from "../../common/logger"; import type { Logger } from "../../common/logger";
import callForPublicHelmRepositoriesInjectable from "../../renderer/components/+preferences/kubernetes/helm-charts/activation-of-public-helm-repository/public-helm-repositories/call-for-public-helm-repositories.injectable";
// TODO: Make tooltips free of side effects by making it deterministic
jest.mock("../../renderer/components/tooltip/withTooltip", () => ({
withTooltip: (target: any) => target,
}));
describe("listing active helm repositories in preferences", () => { describe("listing active helm repositories in preferences", () => {
let applicationBuilder: ApplicationBuilder; let applicationBuilder: ApplicationBuilder;
@ -30,7 +36,8 @@ describe("listing active helm repositories in preferences", () => {
loggerStub = { warn: jest.fn() } as unknown as Logger; loggerStub = { warn: jest.fn() } as unknown as Logger;
applicationBuilder.beforeApplicationStart(({ mainDi }) => { applicationBuilder.beforeApplicationStart(({ mainDi, rendererDi }) => {
rendererDi.override(callForPublicHelmRepositoriesInjectable, () => async () => []);
mainDi.override(readYamlFileInjectable, () => readYamlFileMock); mainDi.override(readYamlFileInjectable, () => readYamlFileMock);
mainDi.override(execFileInjectable, () => execFileMock); mainDi.override(execFileInjectable, () => execFileMock);
mainDi.override(helmBinaryPathInjectable, () => "some-helm-binary-path"); mainDi.override(helmBinaryPathInjectable, () => "some-helm-binary-path");