Fail
View in Storybookexpect(element).toHaveFocus()
1200x576
Linux Ubuntu 24.04.4
8767f4 on FEC-1184-1187-batch13-and-16
Caught exception in
play functionThis story threw an error after it finished rendering which means interactions may not have been executed fully.
Error: expect(element).toHaveFocus()
Expected element with focus:
<div
aria-controls="_r_0_"
aria-label="Resize panes"
aria-orientation="horizontal"
aria-valuemax="100"
aria-valuemin="0"
aria-valuenow="30"
aria-valuetext="30%"
class="nimbus-splitter__handle css-1d6ynr6"
role="separator"
style="left: 30%;"
tabindex="0"
/>
Received element with focus:
<body
class="sb-main-fullscreen sb-show-main"
spellcheck="false"
>········
<div
class="sb-preparing-story sb-wrapper"
>········
<div … />······
</div>·····
<div
class="sb-preparing-docs sb-wrapper"
>········
<div … />········
<table … />······
</div>·····
<div
class="sb-nopreview sb-wrapper"
>········
<div … />······
</div>·····
<div
class="sb-errordisplay sb-wrapper"
>········
<div … />······
</div>·········
<div
id="storybook-root"
>
<script … />
<div … />
</div>········
<div
hidden="true"
id="storybook-docs"
/>········
<script>·····
function __onViteAppLoadingError(event) {
const hostname = globalThis.location.hostname;
if (hostname !== 'localhost' && globalThis.CONFIG_TYPE === 'DEVELOPMENT') {
const message = `Failed to load the Storybook preview file 'vite-app.js':·
It looks like you're visiting the Storybook development server on another hostname than localhost: '${hostname}', but you haven't configured the necessary security features to support this.
Please re-run your Storybook development server with the '--host ${hostname}' flag, or manually configure your Vite allowedHosts configuration with viteFinal.·
See:`;
const docs = [
'https://storybook.js.org/docs/api/cli-options#dev',
'https://storybook.js.org/docs/api/main-config/main-config-vite-final',
'https://vite.dev/config/server-options.html#server-allowedhosts',
];
console.error(`${message}\n${docs.map((doc) => `- ${doc}`).join('\n')}`);·
document.getElementById('storybook-root').innerHTML =
`<p style="color: red; max-width: 70ch">${message.replaceAll(
'\n',
'<br/>'
)}<ul>${docs.map((doc) => `<li><a href='${doc}' target='_blank'>${doc}</a></li>`).join('')}</ul></p>`;
return;
}
}·····
</script>········
<div
id="storybook-highlights-root"
>
<div … />
<style … />
</div>
</body>
at Proxy.a (https://6a28137478d14a3a27f4772a-stnuddhxtz.capture-loopback.chromatic.com/assets/iframe-BcVp2yaQ.js:115:675)
at Proxy.<anonymous> (https://6a28137478d14a3a27f4772a-stnuddhxtz.capture-loopback.chromatic.com/assets/iframe-BcVp2yaQ.js:89:404)
at Proxy.methodWrapper (https://6a28137478d14a3a27f4772a-stnuddhxtz.capture-loopback.chromatic.com/assets/iframe-BcVp2yaQ.js:53:8459)
at $ce.invoke (https://6a28137478d14a3a27f4772a-stnuddhxtz.capture-loopback.chromatic.com/assets/iframe-BcVp2yaQ.js:713:9448)
at $ce.track (https://6a28137478d14a3a27f4772a-stnuddhxtz.capture-loopback.chromatic.com/assets/iframe-BcVp2yaQ.js:713:6678)
at Proxy.toHaveFocus (https://6a28137478d14a3a27f4772a-stnuddhxtz.capture-loopback.chromatic.com/assets/iframe-BcVp2yaQ.js:713:5996)
at https://6a28137478d14a3a27f4772a-stnuddhxtz.capture-loopback.chromatic.com/assets/splitter.stories-Bl51wQwu.js:1:27985
at async https://6a28137478d14a3a27f4772a-stnuddhxtz.capture-loopback.chromatic.com/assets/iframe-BcVp2yaQ.js:537:8630
at async https://6a28137478d14a3a27f4772a-stnuddhxtz.capture-loopback.chromatic.com/assets/iframe-BcVp2yaQ.js:537:8630
at async play (https://6a28137478d14a3a27f4772a-stnuddhxtz.capture-loopback.chromatic.com/assets/splitter.stories-Bl51wQwu.js:1:27896)