forked from linode/manager
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tech-story: [M3-8784] - Tanstack routing for Domains (linode#11418)
* save progress * SURGERY * Implement basic routing * Wrap up routing * fix unit * routes test update * better handling in test * fix smoke test * Added changeset: Refactor Domains Feature Routing * MSW fix * edit changeset * mock path consistency * feedback @dwiley-akamai * feedback @mjac0bs * fix e2e
- Loading branch information
1 parent
f429949
commit 5f0f915
Showing
25 changed files
with
325 additions
and
212 deletions.
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 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 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 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 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 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 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 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 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 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 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 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 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 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.