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

How to test usage of addon? #34

Closed
GCheung55 opened this issue Aug 24, 2017 · 6 comments
Closed

How to test usage of addon? #34

GCheung55 opened this issue Aug 24, 2017 · 6 comments

Comments

@GCheung55
Copy link
Contributor

Can instructions be added to the README on how to test usage of this addon?

Test helpers would also be useful.

@GCheung55 GCheung55 changed the title How to test usage addon? How to test usage of addon? Aug 24, 2017
@kybishop
Copy link
Collaborator

Hey @GCheung55, @rwwagner90 wrote some tests for the addon itself: https://github.com/kybishop/ember-attacher/blob/master/tests/integration/components/ember-attacher-test.js

Are there more specific things you're hoping to test that aren't illustrated in the tests for the addon?

@GCheung55
Copy link
Contributor Author

GCheung55 commented Aug 24, 2017

@kybishop the tests are todo so I'm assuming they are passing due to a failing assert, but I could be misunderstanding Qunit's documentation.

I'm looking to test that the popper opened and closed when expected. It would be helpful to provide instructions on how to test for someone unfamiliar with Popper.js and the markup used in the addon.

@RobbieTheWagner
Copy link
Collaborator

@GCheung55 they are not todo anymore. They should be passing as actual tests. I would be happy to help write tests, if you let me know what you would like to test.

@GCheung55
Copy link
Contributor Author

GCheung55 commented Aug 24, 2017

@rwwagner90, the tests are todo no more indeed! That's great!

tl;dr: Whoever is more familiar with the addon's code, and perhaps Popper.js, can that person add examples of how to test the usage of this addon in the README?

As a user, how do I test my usage of ember-attacher? ember-tooltips has a "Testing" section which describes the tools and examples.

Test helpers would be nice, but not necessary as long as there are examples on how to check that the popper has opened/closed, at least for me.

@kybishop
Copy link
Collaborator

@GCheung55 I'll add a section to the README with examples on testing visible/not visible.

If someone wants to add similar test helpers to those in ember-tooltips, I'm happy to accept a PR ;)

@kybishop
Copy link
Collaborator

The tests are slowly being flushed out. Progress can be tracked in #40.

I've added a task to update the README once we've tested at least the default behavior.

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

No branches or pull requests

3 participants