-
Type: Bug
-
Status: Open
-
Priority: Major
-
Resolution: Unresolved
-
Affects Version/s: 3.0.0-SNAPSHOT
-
Component/s: UI
-
Tags:
-
Team:UI
-
Story Points:3
Take into account the following test (applicable to nuxeo-layout.test.js:
test('Broken importHref', async () => { // first run let layout = await fixture( html` <nuxeo-layout href="notfound.html"></nuxeo-layout> `, ); await flush(); let nuxeoError = layout.$.error; if (!isElementVisible(nuxeoError)) { await waitForAttrMutation(nuxeoError, 'hidden', null); } expect(isElementVisible(layout.$.container)).to.be.false; expect(isElementVisible(nuxeoError)).to.be.true; // second run layout = await fixture( html` <nuxeo-layout href="notfound.html"></nuxeo-layout> `, ); await flush(); nuxeoError = layout.$.error; if (!isElementVisible(nuxeoError)) { await waitForAttrMutation(nuxeoError, 'hidden', null); } expect(isElementVisible(layout.$.container)).to.be.false; expect(isElementVisible(nuxeoError)).to.be.true; });
The second run will fail, because the error will never be visible and no layout was stamped. This seems to be resulting from neither the resolve nor the reject of importHref being called. Surprisingly, changing the layout href to "notfound2.html" will fix the issue, which seems to suggest that there might be an issue with multiple elements having the same href resulting in a 404?
This is also reproducible on storybook, which stops displaying document layouts after the "Not Found Story" is selected more than once. This story was added under ELEMENTS-1098.
- is related to
-
ELEMENTS-1297 Create Nuxeo document picker
- Resolved
-
ELEMENTS-1148 Fix missing layouts on nuxeo-document-layout stories
- Open
-
ELEMENTS-1098 Migrate nuxeo-document-layout to the Elements library
- Resolved
-
ELEMENTS-1094 Reenable nuxeo-layout.test.js
- Resolved
-
NXP-28767 Can icons define their own <style>?
- Open