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

Create an integration tests for voting component - Closes #290 #476

Merged
merged 14 commits into from
Feb 27, 2018

Conversation

yasharAyari
Copy link
Contributor

@yasharAyari yasharAyari commented Feb 22, 2018

What was the problem?

There wasn't any integration tests for voting component
-this PR also covers issue #484

Review checklist

Copy link
Contributor

@slaweet slaweet left a comment

Choose a reason for hiding this comment

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

I see the PR is still in progress, which is why I want to make two suggestions before there are more tests that they need to be applied to:

step('I\'m logged in as "genesis"', () => { loginProcess(); });

step('And next button should be disabled', () => {
expect(wrapper.find('button.next').props().disabled).to.be.equal(true);
Copy link
Contributor

Choose a reason for hiding this comment

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

This would be better as
expect(wrapper.find('button.next')).to.have.prop('disabled', true);
https://github.com/producthunt/chai-enzyme#propkey-val

});

step('Then I must be able to go to next step', () => {
expect(wrapper.find('button.confirm').exists()).to.be.equal(false);
Copy link
Contributor

Choose a reason for hiding this comment

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

This would be better as
expect(wrapper.find('button.confirm')).to.be.not.present();
For the same reason as above.
https://github.com/producthunt/chai-enzyme#present

account,
});
wrapper.find('button.confirm').simulate('click');
expect(wrapper.find('h2.result-box-header').text()).to.be.equal(expectedValue);
Copy link
Contributor

Choose a reason for hiding this comment

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

step('I\'m logged in as "genesis"', () => { loginProcess([delegates[0]]); });

step('And I should see 3 rows', () => {
expect(wrapper.find('ul.delegate-row')).to.have.lengthOf(3);
Copy link
Contributor

Choose a reason for hiding this comment

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

@slaweet slaweet changed the title Create an integration file for voting component - Closes #290 Create an integration tests for voting component - Closes #290 Feb 27, 2018
@yasharAyari yasharAyari merged commit bfc94e4 into 0.2.0 Feb 27, 2018
@yasharAyari yasharAyari deleted the 290-implement-integration-test-for-voting-component branch February 27, 2018 15:27
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