Describe the bug
Incorrect updates (since Oct) and hydration bugs (since Nov) with component-erasure + islands-router (ie. mark-branches, etc?). I've extended the test in example islands_router to mount and increment Counter, and added a second variant showing how hydration kinda works between the Oct-Nov commits if we push through the distinct nav/update bug.
Leptos Dependencies
See examples/islands_router
To Reproduce
- Clone, pull, or save patched
islands_router test
- Checkout or apply it
cd examples/island_router
- (here i rebased onto alt commits to bisect)
- See errors / behavior
errors
Since 61571ed, Nov 19 - present, the happy & redundant paths both fail:
1) [chromium] › tests/navigation.spec.ts:16:5 › navigates from Home to About, increments Counter ─
Error: expect(locator).not.toBeVisible() failed
Locator: getByText('Enter a search to begin viewing contacts.')
Expected: not visible
Received: visible
Timeout: 5000ms
Call log:
- Expect "not toBeVisible" with timeout 5000ms
- waiting for getByText('Enter a search to begin viewing contacts.')
14 × locator resolved to <p class="note">…</p>
- unexpected value "visible"
27 | await expect(page.locator("input[type=search]")).not.toBeAttached();
28 |
> 29 | await expect(page.getByText("Enter a search to begin viewing contacts.")).not.toBeVisible();
| ^
30 | await expect(page.locator("button[class=counter]")).toHaveText("Click Me: 0");
31 | await page.click('button[class=counter]');
32 | await expect(page.locator("button[class=counter]")).toHaveText("Click Me: 1");
[...]
2) [chromium] › tests/navigation.spec.ts:37:5 › navigates from Home to About (redundantly), increments Counter
Error: expect(locator).toHaveText(expected) failed
Locator: locator('button[class=counter]')
Expected: "Click Me: 1"
Received: "Click Me: 0"
Timeout: 5000ms
Call log:
- Expect "toHaveText" with timeout 5000ms
- waiting for locator('button[class=counter]')
14 × locator resolved to <button class="counter">…</button>
- unexpected value "Click Me: 0"
59 | await expect(page.locator("button[class=counter]")).toHaveText("Click Me: 0");
60 | await page.click('button[class=counter]');
> 61 | await expect(page.locator("button[class=counter]")).toHaveText("Click Me: 1");
| ^
62 |
63 | expect(errors).toEqual([]);
64 | });
Since b20903a, Oct 11, the happy-path fails and the redundant path succeeds:
1) [chromium] › tests/navigation.spec.ts:16:5 › navigates from Home to About, increments Counter
Error: expect(locator).not.toBeVisible() failed
Locator: getByText('Enter a search to begin viewing contacts.')
Expected: not visible
Received: visible
Timeout: 5000ms
Call log:
- Expect "not toBeVisible" with timeout 5000ms
- waiting for getByText('Enter a search to begin viewing contacts.')
14 × locator resolved to <p class="note">…</p>
- unexpected value "visible"
27 | await expect(page.locator("input[type=search]")).not.toBeAttached();
28 |
> 29 | await expect(page.getByText("Enter a search to begin viewing contacts.")).not.toBeVisible();
| ^
30 | await expect(page.locator("button[class=counter]")).toHaveText("Click Me: 0");
31 | await page.click('button[class=counter]');
32 | await expect(page.locator("button[class=counter]")).toHaveText("Click Me: 1");
[...]
✓ 2 …vigates from Home to About (redundantly), increments Counter (1.9s)
Before then, the results I would expect:
✓ 1 …c.ts:16:5 › navigates from Home to About, increments Counter (1.2s)
✘ 2 …vigates from Home to About (redundantly), increments Counter (5.3s)
Next Steps
Additional context
i continue teasing thru related code, but this appears to predate many otherwise related leads and i have not re-oriented 😅
Describe the bug
Incorrect updates (since Oct) and hydration bugs (since Nov) with
component-erasure+islands-router(ie. mark-branches, etc?). I've extended the test in exampleislands_routerto mount and incrementCounter, and added a second variant showing how hydration kinda works between the Oct-Nov commits if we push through the distinct nav/update bug.Leptos Dependencies
See
examples/islands_routerTo Reproduce
islands_routertestcd examples/island_routererrors
Since 61571ed, Nov 19 - present, the happy & redundant paths both fail:Since b20903a, Oct 11, the happy-path fails and the redundant path succeeds:
Before then, the results I would expect:
Next Steps
Additional context
i continue teasing thru related code, but this appears to predate many otherwise related leads and i have not re-oriented 😅