We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8c80943 commit a7e2214Copy full SHA for a7e2214
1 file changed
tests/e2e/components/rancher-ui.ts
@@ -145,10 +145,10 @@ export class RancherUI {
145
// Load yaml from code editor
146
await expect(this.codeMirror).toBeVisible()
147
const lines = await this.codeMirror.locator('pre.CodeMirror-line').allTextContents()
148
- const cmYaml = jsyaml.load(lines.join('\n')
+ const cmText = lines.join('\n')
149
.replace(/\u00A0/g, ' ') // replace with space
150
.replace(/\u200B/g, '') // remove ZERO WIDTH SPACE last line
151
- ) || {}
+ const cmYaml = cmText.trim() ? (jsyaml.load(cmText) || {}) : {}
152
153
// Edit yaml
154
if (typeof patch === 'function') {
0 commit comments