Skip to content
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

Add Testing Library setup and some boilerplate tests for current comp… #29

Merged
merged 1 commit into from
Feb 19, 2020

Conversation

adamjarling
Copy link
Contributor

…onents

This more or less should wrap up the intent of #24 . The tests are stubbed out mainly verifying the presence of layout elements. Once I or anyone connects to a back end to see this running in action, it'll be easier to add more behavioral tests to each component.

Any questions on Testing Library, let me know. Everything should follow the packages doc's fairly closely.

expect(getByTestId('expand-collapse-button')).toBeInTheDocument()
})

// Not really sure yet how to test <StyledChildResourceTree /> and
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 I can create an issue for this.

...render(<Provider store={store}>{ui}</Provider>),
// adding `store` to the returned utilities to allow us
// to reference it in our tests (just try to avoid using
// this to test implementation details).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

</Select>
</FormControl>
);
const useStyles = makeStyles({
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for adding this, I know that the usage of the Material UI should be adjusted, I can create an issue for this as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. We can only use the Material UI Hooks way of applying styles to functional components. So in the more involved, class components I left the current Material UI style.

If you wanted to create an issue for converting class components to Hooks, I'd be happy to help out with that if you want? And for that work, does a dev environment exist to run the front end working off the back-end to see it in action?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've proposed some documentation with #35, and I've updated #32 to be scoped for functional components with Hooks. Thank you very much for suggesting this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants