You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by robertkowalski <gi...@git.apache.org> on 2016/02/01 05:02:30 UTC

[GitHub] couchdb-fauxton pull request: Fix for Beautify function within Cod...

Github user robertkowalski commented on a diff in the pull request:

    https://github.com/apache/couchdb-fauxton/pull/634#discussion_r51377483
  
    --- Diff: app/addons/components/tests/codeEditorPanelSpec.react.jsx ---
    @@ -61,6 +62,26 @@ define([
           });
         });
     
    +    describe('Beautify', function () {
    +      it('confirm clicking beautify actually works within context of component', function () {
    +        var container = document.createElement('div');
    +        var codeEditorEl = TestUtils.renderIntoDocument(
    +          <ReactComponents.CodeEditorPanel
    +            defaultCode={codeNoNewlines}
    +          />,
    +          container
    +        );
    +
    +        // confirm there are no newlines in the code at this point
    +        assert.equal(codeEditorEl.getValue().match(/\n/g), null);
    +
    +        TestUtils.Simulate.click($(React.findDOMNode(codeEditorEl)).find('.beautify')[0]);
    +
    +        // now confirm newlines are found
    +        assert.equal(codeEditorEl.getValue().match(/\n/g).length, 2);
    +      });
    +    });
    --- End diff --
    
    :heart_eyes: i really like the integration test, good work!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---