diff --git a/.changeset/silly-nails-own.md b/.changeset/silly-nails-own.md deleted file mode 100644 index 14f49b0d94a..00000000000 --- a/.changeset/silly-nails-own.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@qwik.dev/core': patch ---- - -fix: wait for QRL to resolve for signal attribute diff --git a/packages/qwik/src/core/use/use-core.ts b/packages/qwik/src/core/use/use-core.ts index c6724cf302e..db13350af5d 100644 --- a/packages/qwik/src/core/use/use-core.ts +++ b/packages/qwik/src/core/use/use-core.ts @@ -11,7 +11,7 @@ import { ResourceEvent, TaskEvent, } from '../shared/utils/markers'; -import { isPromise, retryOnPromise } from '../shared/utils/promises'; +import { isPromise } from '../shared/utils/promises'; import { seal } from '../shared/utils/qdev'; import { isArray } from '../shared/utils/types'; import { setLocale } from './use-locale'; @@ -263,7 +263,7 @@ export const trackSignalAndAssignHost = ( if (value instanceof WrappedSignal && value.$hostElement$ !== host && host) { value.$hostElement$ = host; } - return retryOnPromise(() => trackSignal(() => value.value, host, property, container, data)); + return trackSignal(() => value.value, host, property, container, data); }; /** @internal */ diff --git a/starters/apps/e2e/src/components/attributes/attributes.e2e.tsx b/starters/apps/e2e/src/components/attributes/attributes.e2e.tsx new file mode 100644 index 00000000000..94202d70809 --- /dev/null +++ b/starters/apps/e2e/src/components/attributes/attributes.e2e.tsx @@ -0,0 +1,28 @@ +import { domRender, ssrRenderToDom } from "@qwik.dev/core/testing"; +import { beforeEach, describe, it } from "vitest"; +import { Attributes } from "./attributes"; + +const debug = false; //true; +Error.stackTraceLimit = 100; + +describe.each([ + { render: ssrRenderToDom }, // + { render: domRender }, // +])("$render.name: attributes.e2e", ({ render }) => { + describe("", () => { + // let document: Document; + // let vNode: VNode; + // let container: ClientContainer; + // let getStyles: () => Record; + + beforeEach(async () => { + await render(, { debug }); + // document = result.document; + // vNode = result.vNode!; + // container = result.container; + // getStyles = result.getStyles; + }); + + it("should run 'Toggle render'", async () => {}); + }); +}); diff --git a/starters/apps/e2e/src/components/attributes/attributes.tsx b/starters/apps/e2e/src/components/attributes/attributes.tsx index 4cae588c8f5..d9564caecd7 100644 --- a/starters/apps/e2e/src/components/attributes/attributes.tsx +++ b/starters/apps/e2e/src/components/attributes/attributes.tsx @@ -1,12 +1,4 @@ -import { - $, - Slot, - component$, - useComputed$, - useSignal, - useStore, - type PropsOf, -} from "@qwik.dev/core"; +import { component$, useSignal, useStore } from "@qwik.dev/core"; export const Attributes = component$(() => { const render = useSignal(0); @@ -21,7 +13,6 @@ export const Attributes = component$(() => { Rerender - ); }); @@ -223,41 +214,3 @@ export const Issue4718Null = component$(() => { ); }); - -const ProgressRoot = component$<{ min?: number } & PropsOf<"div">>((props) => { - const { ...rest } = props; - - const minSig = useComputed$(() => props.min ?? 0); - - const valueLabelSig = useComputed$(() => { - const value = minSig.value; - return `${value * 100}%`; - }); - - return ( -
- -
- ); -}); - -const ProgressParent = component$(() => { - const minGoal = useSignal(2000); - - const incrementMin = $(() => { - minGoal.value += 500; - }); - - return ( -
-
- ${minGoal.value} - -
- - Test -
- ); -}); diff --git a/starters/e2e/e2e.attributes.e2e.ts b/starters/e2e/e2e.attributes.e2e.ts index 76a91c2b7fe..ebd16341c11 100644 --- a/starters/e2e/e2e.attributes.e2e.ts +++ b/starters/e2e/e2e.attributes.e2e.ts @@ -295,15 +295,6 @@ test.describe("attributes", () => { await expect(button).not.toHaveAttribute("aria-label"); await expect(button).not.toHaveAttribute("title"); }); - - test("should update var prop QRL signal value", async ({ page }) => { - const button = page.locator("#progress-btn"); - await button.click(); - const progress = page.locator("#progress-value"); - await expect(progress).toHaveText("$2500"); - await button.click(); - await expect(progress).toHaveText("$3000"); - }); } tests();