Skip to content

Support dispatching pointer events in click tests#4154

Merged
moniika merged 4 commits intoRaspberryPiFoundation:developfrom
moniika:click-event-tests
Aug 11, 2020
Merged

Support dispatching pointer events in click tests#4154
moniika merged 4 commits intoRaspberryPiFoundation:developfrom
moniika:click-event-tests

Conversation

@moniika
Copy link
Copy Markdown
Contributor

@moniika moniika commented Aug 11, 2020

The basics

  • I branched from develop
  • My pull request is against develop
  • My code follows the style guide

The details

Resolves

Part of #4065

Proposed Changes

  • Adds helper for simulating pointer events.
  • Refactors gesture tests to use helper.

Reason for Changes

Simulating click lets us test event propogation. Gesture tests were refactored to test that helper works.

Test Coverage

Ran mocha tests.

Tested on:

  • Desktop Chrome

Additional Information

Testing event firing in gesture test will be in a separate PR.

@moniika moniika requested a review from alschmiedt August 11, 2020 01:10
@moniika moniika changed the title Click event tests Support dispatching pointer events in click tests Aug 11, 2020
var flyout = this.workspace.flyout_;
chai.assert.exists(this.workspace.flyout_,
'Precondition: missing flyout');
flyout.autoClose = true;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is flyout.autoClose = false in the original. Was this meant to be changed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, in the original the flyout autclose and always open tests were the same due to copy paste error. This fixes that.

@moniika moniika merged commit b0b3c67 into RaspberryPiFoundation:develop Aug 11, 2020
@moniika moniika deleted the click-event-tests branch August 11, 2020 21:37
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