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

Make global mock for MonacoEditor textarea to make linebreaks appear correctly

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
Janne Savolainen 2022-07-26 13:25:45 +03:00
parent bc51b453b5
commit 27684ade67
No known key found for this signature in database
GPG Key ID: 8C6CFB2FFFE8F68A
4 changed files with 81 additions and 61 deletions

View File

@ -2644,10 +2644,11 @@ exports[`installing helm chart from new tab given tab for installing chart was n
Install
</button>
</div>
<input
<textarea
data-testid="monaco-editor-for-some-first-tab-id"
value="some-default-configuration"
/>
>
some-default-configuration
</textarea>
</div>
</div>
</div>
@ -3651,10 +3652,11 @@ exports[`installing helm chart from new tab given tab for installing chart was n
class="Spinner singleColor center"
data-testid="install-chart-configuration-spinner"
/>
<input
<textarea
data-testid="monaco-editor-for-some-first-tab-id"
value="some-default-configuration"
/>
>
some-default-configuration
</textarea>
</div>
</div>
</div>
@ -4624,10 +4626,11 @@ exports[`installing helm chart from new tab given tab for installing chart was n
Install
</button>
</div>
<input
<textarea
data-testid="monaco-editor-for-some-first-tab-id"
value="some-default-configuration-for-other-version"
/>
>
some-default-configuration-for-other-version
</textarea>
</div>
</div>
</div>
@ -5597,10 +5600,11 @@ exports[`installing helm chart from new tab given tab for installing chart was n
Install
</button>
</div>
<input
<textarea
data-testid="monaco-editor-for-some-first-tab-id"
value="some-default-configuration"
/>
>
some-default-configuration
</textarea>
</div>
</div>
</div>
@ -6590,10 +6594,11 @@ exports[`installing helm chart from new tab given tab for installing chart was n
Install
</button>
</div>
<input
<textarea
data-testid="monaco-editor-for-some-first-tab-id"
value="@some-invalid-configuration@"
/>
>
@some-invalid-configuration@
</textarea>
</div>
</div>
</div>
@ -7565,10 +7570,11 @@ exports[`installing helm chart from new tab given tab for installing chart was n
Install
</button>
</div>
<input
<textarea
data-testid="monaco-editor-for-some-first-tab-id"
value="some-default-configuration"
/>
>
some-default-configuration
</textarea>
</div>
</div>
</div>
@ -8567,10 +8573,11 @@ exports[`installing helm chart from new tab given tab for installing chart was n
Install
</button>
</div>
<input
<textarea
data-testid="monaco-editor-for-some-first-tab-id"
value="some-default-configuration"
/>
>
some-default-configuration
</textarea>
</div>
</div>
</div>
@ -9548,10 +9555,11 @@ exports[`installing helm chart from new tab given tab for installing chart was n
Install
</button>
</div>
<input
<textarea
data-testid="monaco-editor-for-some-first-tab-id"
value="some-default-configuration"
/>
>
some-default-configuration
</textarea>
</div>
</div>
</div>
@ -13030,10 +13038,11 @@ exports[`installing helm chart from new tab given tab for installing chart was n
Install
</button>
</div>
<input
<textarea
data-testid="monaco-editor-for-some-first-tab-id"
value="some-default-configuration"
/>
>
some-default-configuration
</textarea>
</div>
</div>
</div>
@ -15102,10 +15111,11 @@ exports[`installing helm chart from new tab given tab for installing chart was n
Install
</button>
</div>
<input
<textarea
data-testid="monaco-editor-for-some-second-tab-id"
value="some-other-default-configuration"
/>
>
some-other-default-configuration
</textarea>
</div>
</div>
</div>
@ -16122,10 +16132,11 @@ exports[`installing helm chart from new tab given tab for installing chart was n
Install
</button>
</div>
<input
<textarea
data-testid="monaco-editor-for-some-first-tab-id"
value="some-default-configuration"
/>
>
some-default-configuration
</textarea>
</div>
</div>
</div>
@ -17095,10 +17106,11 @@ exports[`installing helm chart from new tab given tab for installing chart was n
Install
</button>
</div>
<input
<textarea
data-testid="monaco-editor-for-some-first-tab-id"
value="some-valid-configuration"
/>
>
some-valid-configuration
</textarea>
</div>
</div>
</div>
@ -18068,10 +18080,11 @@ exports[`installing helm chart from new tab given tab for installing chart was n
Install
</button>
</div>
<input
<textarea
data-testid="monaco-editor-for-some-first-tab-id"
value="some-default-configuration"
/>
>
some-default-configuration
</textarea>
</div>
</div>
</div>

View File

@ -1243,10 +1243,11 @@ exports[`installing helm chart from previously opened tab given tab for installi
Install
</button>
</div>
<input
<textarea
data-testid="monaco-editor-for-some-first-tab-id"
value="some-stored-configuration"
/>
>
some-stored-configuration
</textarea>
</div>
</div>
</div>

View File

@ -7336,10 +7336,11 @@ exports[`showing details for helm release given application is started when navi
User-supplied values only
</span>
</label>
<input
<textarea
data-testid="monaco-editor-for-helm-release-configuration"
value="some-configuration"
/>
>
some-configuration
</textarea>
<button
class="Button primary"
data-testid="helm-release-configuration-save-button"
@ -8555,10 +8556,11 @@ exports[`showing details for helm release given application is started when navi
User-supplied values only
</span>
</label>
<input
<textarea
data-testid="monaco-editor-for-helm-release-configuration"
value="some-new-configuration"
/>
>
some-new-configuration
</textarea>
<button
class="Button primary"
data-testid="helm-release-configuration-save-button"
@ -9774,10 +9776,11 @@ exports[`showing details for helm release given application is started when navi
User-supplied values only
</span>
</label>
<input
<textarea
data-testid="monaco-editor-for-helm-release-configuration"
value="some-new-configuration"
/>
>
some-new-configuration
</textarea>
<button
class="Button waiting primary"
data-testid="helm-release-configuration-save-button"
@ -10820,10 +10823,11 @@ exports[`showing details for helm release given application is started when navi
User-supplied values only
</span>
</label>
<input
<textarea
data-testid="monaco-editor-for-helm-release-configuration"
value="some-new-configuration"
/>
>
some-new-configuration
</textarea>
<button
class="Button primary"
data-testid="helm-release-configuration-save-button"
@ -11867,10 +11871,11 @@ exports[`showing details for helm release given application is started when navi
User-supplied values only
</span>
</label>
<input
<textarea
data-testid="monaco-editor-for-helm-release-configuration"
value="some-new-configuration"
/>
>
some-new-configuration
</textarea>
<button
class="Button primary"
data-testid="helm-release-configuration-save-button"
@ -13087,10 +13092,11 @@ exports[`showing details for helm release given application is started when navi
User-supplied values only
</span>
</label>
<input
<textarea
data-testid="monaco-editor-for-helm-release-configuration"
value="some-other-configuration"
/>
>
some-other-configuration
</textarea>
<button
class="Button primary"
data-testid="helm-release-configuration-save-button"

View File

@ -12,7 +12,7 @@ class FakeMonacoEditor extends React.Component<MonacoEditorProps> {
const { id, value, onChange, onError, language = "yaml" } = this.props;
return (
<input
<textarea
data-testid={`monaco-editor-for-${id}`}
onChange={(event) => {