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

Specs #36

Merged
merged 9 commits into from
Feb 22, 2017
Merged

Specs #36

merged 9 commits into from
Feb 22, 2017

Conversation

farrieta9
Copy link

Created specs for all .jsx in the applications folder

modal.props.closeModal();
expect(isShown).toBeFalsy();
});
});

Choose a reason for hiding this comment

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

Newline required at end of file but not found eol-last

});

it('modal is hidden', () => {
let modal = TestUtils.findRenderedComponentWithType(result, Modal);

Choose a reason for hiding this comment

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

'modal' is never reassigned. Use 'const' instead prefer-const

expect(modal.props.isOpen).toBeTruthy();
});

it('modal is hidden', () => {

Choose a reason for hiding this comment

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

Expected indentation of 2 spaces but found 4 indent

});

it('modal is shown', () => {
let modal = TestUtils.findRenderedComponentWithType(result, Modal);

Choose a reason for hiding this comment

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

'modal' is never reassigned. Use 'const' instead prefer-const

);
});

it('modal is shown', () => {

Choose a reason for hiding this comment

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

Expected indentation of 2 spaces but found 4 indent

expect(element.childNodes.length).toBeGreaterThan(0);
});

});

Choose a reason for hiding this comment

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

Newline required at end of file but not found eol-last

});

fit('render application', () => {
let element = TestUtils.findRenderedDOMComponentWithTag(result, 'tbody');

Choose a reason for hiding this comment

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

'element' is never reassigned. Use 'const' instead prefer-const

expect(element).toBeDefined();
});

fit('render application', () => {

Choose a reason for hiding this comment

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

'fit' is not defined no-undef

});

fit('render the application rows', () => {
let element = TestUtils.findRenderedDOMComponentWithClass(result, 'o-contain o-contain--full');

Choose a reason for hiding this comment

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

'element' is never reassigned. Use 'const' instead prefer-const

);
});

fit('render the application rows', () => {

Choose a reason for hiding this comment

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

'fit' is not defined no-undef

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.3%) to 99.62% when pulling 5906cc6 on specs into a381eef on master.

applications: {
Spiderman: {
Power1: "Wall Crawling",
Power2: "Spidey Sense"

Choose a reason for hiding this comment

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

Strings must use singlequote quotes

saveApplication: () => {},
applications: {
Spiderman: {
Power1: "Wall Crawling",

Choose a reason for hiding this comment

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

Strings must use singlequote quotes

const childDivs = element.childNodes;
const inputTag = childDivs[0].firstChild.childNodes[1];
expect(inputTag.value).toContain('SPEC_DESCRIPTION');
})

Choose a reason for hiding this comment

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

Missing semicolon semi

onChange : () => {},
closeModal : () => { action = true; },
save : () => { action = true; },
description : "SPEC_DESCRIPTION"

Choose a reason for hiding this comment

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

Strings must use singlequote quotes

props = {
application: {
id : 314159,
name : "SPECNAME",

Choose a reason for hiding this comment

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

Strings must use singlequote quotes

@coveralls
Copy link

Coverage Status

Coverage increased (+0.001%) to 99.873% when pulling 808f4b6 on specs into a381eef on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.001%) to 99.873% when pulling 808f4b6 on specs into a381eef on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.001%) to 99.873% when pulling ebf4c70 on specs into 15377d8 on master.

it('button is clicked', () => {
const button = TestUtils.findRenderedDOMComponentWithClass(result, 'i-settings');
TestUtils.Simulate.click(button);
expect(button);
Copy link
Contributor

Choose a reason for hiding this comment

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

Write a test for the button.

});

it('renders application link', () => {
const link = TestUtils.findRenderedDOMComponentWithClass(result, 'test-link');
Copy link
Contributor

Choose a reason for hiding this comment

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

Try not to modify the code with test specific changes.

props = {
onChange : () => {},
closeModal : () => { action = true; },
save : () => { action = true; },
Copy link
Contributor

Choose a reason for hiding this comment

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

Make each action different.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.001%) to 99.875% when pulling 9e1b2c0 on specs into 6a4f851 on master.

@@ -34,7 +34,7 @@ export default class ApplicationRow extends React.Component {
const styles = ApplicationRow.getStyles();
return (
<tr>
<td>
<td className="test-link">
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't change the code for tests

expect(span.textContent).toContain('123');
});

fit('renders application link', () => {

Choose a reason for hiding this comment

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

'fit' is not defined no-undef


fit('button is clicked', () => {
const button = TestUtils.findRenderedDOMComponentWithClass(result, 'i-settings');
debugger;

Choose a reason for hiding this comment

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

Unexpected 'debugger' statement no-debugger


});

fit('button is clicked', () => {

Choose a reason for hiding this comment

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

'fit' is not defined no-undef

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.4%) to 99.501% when pulling bb1b441 on specs into 6a4f851 on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.001%) to 99.875% when pulling dc1372c on specs into 15543ba on master.

Copy link
Contributor

@jbasdf jbasdf left a comment

Choose a reason for hiding this comment

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

LGTM

@jbasdf jbasdf merged commit 7cc9a2f into master Feb 22, 2017
@jbasdf jbasdf deleted the specs branch February 22, 2017 02:29
jbasdf pushed a commit that referenced this pull request Oct 27, 2017
* spec updates to include shallow from enzym and snapshots

* spec script update

* test dependencies updates
jbasdf added a commit that referenced this pull request Nov 29, 2017
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.

None yet

4 participants