Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions test/e2e/freestyle.spec.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -355,11 +355,15 @@ for (const change of ["a new app", "the control destroyed"]) {
componentCreated: () => state.created++,
});
// the moment the component is asked for - Component.create
// has not resolved yet; whoever creates it goes through here
// has not resolved yet; whoever creates it goes through here.
// The frontend is z2ui5, or the second name a newer bundle
// gives it (componentName of z2ui5/embed) - the control's
// release after 0.1.1 creates it under that one
const names = ["z2ui5", "z2ui5.embed.frontend"];
const create = Component.create;
Component.create = function (options) {
const creating = create.apply(this, arguments);
if (options.name !== "z2ui5") return creating;
if (!names.includes(options.name)) return creating;
Component.create = create;
queueMicrotask(() => {
const acted = state.created === 0;
Expand Down
Loading