Repository navigation
tech-story: [M3-8784] - Tanstack routing for Domains #11418
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
aac13fd
save progress
abailly-akamai 2d71ba1
SURGERY
abailly-akamai bc4c53f
Implement basic routing
abailly-akamai 44032ee
Wrap up routing
abailly-akamai 1d472e3
fix unit
abailly-akamai 8b6fa6a
routes test update
abailly-akamai a0c578b
better handling in test
abailly-akamai 3086e5f
fix smoke test
abailly-akamai 9467f2d
Added changeset: Refactor Domains Feature Routing
abailly-akamai 77f673c
MSW fix
abailly-akamai 474e217
edit changeset
abailly-akamai eab0a6f
mock path consistency
abailly-akamai 644da0d
feedback @dwiley-akamai
abailly-akamai 808364b
feedback @mjac0bs
abailly-akamai 5dc1760
fix e2e
abailly-akamai File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
packages/manager/.changeset/pr-11418-tech-stories-1734276290091.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@linode/manager": Tech Stories | ||
| --- | ||
|
|
||
| Refactor Domains Routing (Tanstack Router) ([#11418](https://github.com/linode/manager/pull/11418)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 19 additions & 3 deletions
22
packages/manager/src/features/Domains/DomainsLanding.test.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,28 @@ | ||
| import * as React from 'react'; | ||
|
|
||
| import { renderWithTheme } from 'src/utilities/testHelpers'; | ||
| import { migrationRouteTree } from 'src/routes'; | ||
| import { renderWithThemeAndRouter } from 'src/utilities/testHelpers'; | ||
|
|
||
| import { DomainsLanding } from './DomainsLanding'; | ||
|
|
||
| vi.mock('src/queries/domains', async () => { | ||
| const actual = await vi.importActual('src/queries/domains'); | ||
| return { | ||
| ...actual, | ||
| useDomainsQuery: vi.fn().mockReturnValue({ | ||
| data: undefined, | ||
| error: null, | ||
| isLoading: true, | ||
| }), | ||
| }; | ||
| }); | ||
|
|
||
| describe('Domains Landing', () => { | ||
| it('should initially render a loading state', () => { | ||
| const { getByTestId } = renderWithTheme(<DomainsLanding />); | ||
| it('should initially render a loading state', async () => { | ||
| const { getByTestId } = await renderWithThemeAndRouter(<DomainsLanding />, { | ||
| initialRoute: '/domains', | ||
| routeTree: migrationRouteTree, | ||
| }); | ||
| expect(getByTestId('circle-progress')).toBeInTheDocument(); | ||
| }); | ||
| }); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was caught by my route test once I made it more resilient. It caught two
H1headers on the page πThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, solid test!