-
Notifications
You must be signed in to change notification settings - Fork 352
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: [M3-8080] - Linode Create Refactor - Add API/CLI Modal (#10442
) * initial work to add modal and button * initial work to add modal and button * add unit testing * fix VPC issues * fix console error * fix form values being modified by resolvers --------- Co-authored-by: Banks Nussman <banks@nussman.us>
- Loading branch information
1 parent
e1e0bd8
commit 013dc2b
Showing
8 changed files
with
70 additions
and
18 deletions.
There are no files selected for viewing
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
29 changes: 29 additions & 0 deletions
29
packages/manager/src/features/Linodes/LinodeCreatev2/Actions.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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import React from 'react'; | ||
|
||
import { renderWithThemeAndHookFormContext } from 'src/utilities/testHelpers'; | ||
|
||
import { Actions } from './Actions'; | ||
|
||
describe('Actions', () => { | ||
it('should render a create button', () => { | ||
const { getByText } = renderWithThemeAndHookFormContext({ | ||
component: <Actions />, | ||
}); | ||
|
||
const button = getByText('Create Linode').closest('button'); | ||
|
||
expect(button).toBeVisible(); | ||
expect(button).toHaveAttribute('type', 'submit'); | ||
expect(button).toBeEnabled(); | ||
}); | ||
it("should render a 'Create using command line' button", () => { | ||
const { getByText } = renderWithThemeAndHookFormContext({ | ||
component: <Actions />, | ||
}); | ||
|
||
const button = getByText('Create Using Command Line').closest('button'); | ||
|
||
expect(button).toBeVisible(); | ||
expect(button).toBeEnabled(); | ||
}); | ||
}); |
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