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

Add more test helpers #128

Closed
3 tasks done
sir-dunxalot opened this issue Dec 13, 2016 · 7 comments
Closed
3 tasks done

Add more test helpers #128

sir-dunxalot opened this issue Dec 13, 2016 · 7 comments

Comments

@sir-dunxalot
Copy link
Owner

sir-dunxalot commented Dec 13, 2016

#114 introduces public test helpers for asserting that a tooltip is shown and hidden.

We should also provide test helpers for:

@sir-dunxalot sir-dunxalot mentioned this issue Dec 13, 2016
2 tasks
@ryanlabouve
Copy link
Contributor

ryanlabouve commented Dec 15, 2016

Great work on the test helpers! Started using them today in a large app.

I'd be happy to help with "Asserting tooltip content matches a string". Or if you already have it in the works, no big deal! Great addon. Just trying to give back.

I do this right now (via page objects) by grabbing the tooltip selector from the target, and then checking the content with the selector. I could change this to be a vanilla test helper and PR if it would be useful?

// just example of how we are grabbing the selector
tooltipSelector() {
  let parentScope = this.__parentTreeNode.scope;
  let localScope = this.scope;
  let tooltipTargetSelector = [parentScope, localScope].join(' ');
  let tooltipId = $(tooltipTargetSelector).attr('aria-describedby');
  let tooltipSelector = `#${tooltipId}[role='tooltip']`;
  return tooltipSelector;
}

@a15n
Copy link
Contributor

a15n commented Dec 15, 2016

that would be amazing Ryan. Thank you! As far as I know no one has started working on "Asserting tooltip content matches a string".

@sir-dunxalot
Copy link
Owner Author

I am working on the position test helper on this branch but I am not working on the content test helper.

@sir-dunxalot
Copy link
Owner Author

@ryanlabouve Let me know if you're not planning on working on the content assertion helper - I can pick it up.

@ryanlabouve
Copy link
Contributor

I'll get a branch up tonight! Sorry for the delay.

ryanlabouve added a commit to ryanlabouve/ember-tooltips that referenced this issue Dec 23, 2016
@sir-dunxalot
Copy link
Owner Author

sir-dunxalot commented Dec 23, 2016

No sweat! Just checking :)

ryanlabouve added a commit to ryanlabouve/ember-tooltips that referenced this issue Jan 6, 2017
@sir-dunxalot
Copy link
Owner Author

All test helpers have been added. Great work everyone who contributed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants