question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Possible API improvement

See original GitHub issue

The current testSelector API feels a little repetitive since it repeats the word selector twice.

find(testSelector('selector', 'post-title')) // => find('[data-test-selector="post-title"]')

It would be nice if testSelector('post-title') would return [data-test-selector="post-title"], but I know that would introduce a breaking change. I’m wondering if there’s another more concise helper we can use… maybe one of the following would be suitable?

testElement('post-title') // => [data-test-selector="post-title"]
testData('post-title') // => [data-test-selector="post-title"]
testAttribute('post-title') // => [data-test-selector="post-title"]

Let me know what you think and if you like any of the above. I’ll PR if you’re ok with it.

PS Thanks for the amazing addon!

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:13 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
ryantocommented, Jul 18, 2016

Oh nice find @pdud. This works perfectly. I’ll close this issue.

Thanks for the feedback and advice @marcoow

1reaction
ryantocommented, Jul 7, 2016

Ah makes sense.

I’ll PR this sometime in the next few days.

Read more comments on GitHub >

github_iconTop Results From Across the Web

5 tips for a well-prepared API
In this article, we present 5 good API preparation practices that will ... identify places that need optimization, repair and improvement.
Read more >
Understanding Google's API Improvement Proposals System
When an organization uses more than one Application Programming Interface (API), API governance and management becomes far more important.
Read more >
5 Tips to Optimize Your API's Performance - LoadNinja
#1. Cache Requests. Caching is one of the best ways to improve API performance. If you have requests that frequently produce the same...
Read more >
API Improvement Proposals
API Improvement Proposals. Focused design documents for flexible API development ... AIPs are design documents that summarize Google's API design decisions.
Read more >
API Improvement Proposals: Google's Take on the API Style ...
Google's API Improvement Proposals are a unique take on the style guide, leveraging GitHub to enable collaborativeness and iterative ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found