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

Editor commands tests #17

Merged
merged 4 commits into from
Jul 13, 2015
Merged

Editor commands tests #17

merged 4 commits into from
Jul 13, 2015

Conversation

bantic
Copy link
Collaborator

@bantic bantic commented Jul 13, 2015

@mixonic for you

  • fixed many jshint failures
  • test for displaying toolbar, clicking the b, i, link, heading, subheading and blockquote buttons
  • misc tests for editor#destroy cleanup of views (specifically, removing the toolbar)
  • qunit hasElement and hasNoElement assertions
  • test helpers for dom interaction: selectText(text, containingElement), triggerEvent, triggerKeyEvent
  • bring in KeyboardEvent polyfill for tests
  • skip 1 link test when running via phantom — I could not find a solid way to simulate a keyboard event in phantomjs

These tests now pass in all mac browsers and phantomjs.
There is an existing failing test in Firefox that is not from this PR.

 * add `Helpers.dom.triggerKeyEvent` for simulating key events
 * add `Helpers.dom.triggerEvent` for simulating mouse events
 * Add View#destroy, destroy all views when destroying editor
@bantic
Copy link
Collaborator Author

bantic commented Jul 13, 2015

@mixonic this is finally ready to go — travis is happy, the acceptance tests are running.


selectedText = 'IS A';
Helpers.dom.selectText(selectedText, editorElement);
Helpers.dom.triggerEvent(document, 'mouseup');
Copy link
Contributor

Choose a reason for hiding this comment

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

You could just add the async control here:

window.QUnit.stop();
setTimeout(window.QUnit.start, 10);

mixonic added a commit that referenced this pull request Jul 13, 2015
@mixonic mixonic merged commit d2f147c into summertime Jul 13, 2015
@mixonic mixonic deleted the editor-commands-tests branch July 13, 2015 22:15
@mixonic mixonic mentioned this pull request Jul 13, 2015
30 tasks
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

2 participants