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 test coverage for ResultSet component #2972

Merged
merged 3 commits into from
Jun 15, 2017

Conversation

graceguo-supercat
Copy link

@graceguo-supercat graceguo-supercat commented Jun 15, 2017

fixes #2859

it('is valid', () => {
expect(React.isValidElement(<ResultSet {...mockedProps} />)).to.equal(true);
});
it('renders a Table', () => {
const wrapper = shallow(<ResultSet {...mockedProps} />);
expect(wrapper.find(FilterableTable)).to.have.length(1);
});
describe('getControls', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

this could be an it block rather than describe. typically describe would wrap multiple it blocks.

might be more clear as it('sets correct class name given props', () => {});

Copy link
Author

Choose a reason for hiding this comment

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

i added another it block, so we test both controls view and noControls view.

Copy link
Contributor

Choose a reason for hiding this comment

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

💯

@ascott
Copy link
Contributor

ascott commented Jun 15, 2017

1 small comment, but otherwise LGTM!

@graceguo-supercat graceguo-supercat merged commit fb6ef26 into apache:master Jun 15, 2017
@graceguo-supercat graceguo-supercat deleted the gg-ResultSet branch June 15, 2017 20:51
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.18.5 labels Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.18.5
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[js-testing] write more tests for javascripts/SqlLab/components/ResultSet.jsx
3 participants