-
Notifications
You must be signed in to change notification settings - Fork 3
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
chore: add missing unit tests for Coder plugin #83
Conversation
@@ -138,76 +141,6 @@ export const CoderProviderWithMockAuth = ({ | |||
); | |||
}; | |||
|
|||
type ChildProps = EntityProviderProps; |
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.
You can ignore this entire red section – these were bad test helpers that didn't do what they were supposed to. They're just deleted and aren't moved anywhere – I added a new test helper towards the bottom of the file
</TestApiProvider> | ||
); | ||
|
||
return wrapInTestApp(mainMarkup) as unknown as typeof mainMarkup; |
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.
There are some strange type mismatches in Backstage. wrapInTestApp
is supposed to give you back a React component, which you should be able to plug into RTL's functions
But the type is slightly off, so even though things won't break at runtime, the compiler will complain
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.
Wunderbar!
expect(unlinkCoderAccount).toHaveBeenCalled(); | ||
}); | ||
|
||
it('Lets users trigger actions entirely through the keyboard', async () => { |
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.
😍
Resolves one of the to-do items in #8
Changes made
CoderAuthWrapper
CoderWorkspacesCard
sub-componentsCoderAuthWrapper
more user-friendlyCoderAuthInputForm
Notes