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.

Let’s agree on a basic API and make an RFC so everyone can express their thoughts.

Proposed Wrapper API

method status notes
attributes keep
classes keep
exists keep
contains keep
destroy keep
emitted keep
find keep
findAll keep
html keep
name keep
trigger keep now returns nextTick. So you can do await wrapper.find('#button').trigger('click'). Nice!
setChecked keep see trigger
setSelected keep see trigger
setValue keep see trigger
vm keep
element keep

Wrapper API - Deprecations

method status explanation
emittedByOrder deprecate emitted serves this purpose
get deprecate This was added recently. similar to find - can we combine them?
is deprecate just use native tagName property
isEmpty deprecate Available via custom matcher, difficult to get 100% right
isVisible deprecate Available via custom matcher, difficult to get 100% right
isVueInstance deprecate
props deprecate Anti-pattern. Test what a prop does, not its presence or value.
setData deprecate Anti-pattern. Use data mounting option to set a specific state.
setMethods deprecate Anti-pattern. Vue does not support arbitrarily changing methods, nor should VTU
setProps deprecate See setData, setMethods
text deprecate use toContain

Mounting Options - Proposed API

method status explanation
data keep
slots keep
scopedSlots deprecate Slots are scoped by default in Vue 3. Use slots.
context deprecate No longer needed
stubs keep
provide keep
mixins new attach mixins by app.mixin, since you no longer attach these to Vue.prototype
plugins new attach mixins by app.mixin, since you no longer attach these to Vue.prototype

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
lmiller1990commented, Mar 26, 2020

That should be easy to implement - we just have setValue check the element type, then call setSelected, setChecked etc under the hood. Not sure is there is some complexity I’m missing.

I think this should be a (separate) RFC to the deprecation ones. A smaller, more simple API is definitely attractive to me.

0reactions
lmiller1990commented, Apr 9, 2020

Sounds good

Read more comments on GitHub >

github_iconTop Results From Across the Web

Object (Java Platform SE 7 ) - Oracle Help Center
The finalize method of class Object performs no special action; it simply returns normally. Subclasses of Object may override this definition. The Java ......
Read more >
Finalize an invoice – curl - Stripe API reference
Controls whether Stripe will perform automatic collection of the invoice. When false , the invoice's state will not automatically advance without an explicit ......
Read more >
finalize - RxJS
Returns an Observable that mirrors the source Observable, but will call a specified function when the source terminates on complete or error.
Read more >
Tutorial: The Finalize API (an Unsung Hero) | Corona Labs
In this tutorial, learn about the under-utilized but powerful "finalize" event and how it can be used to keep your app running smoothly....
Read more >
Finalize - api
PROPERTY_SETTER]) @Incubating class Finalize. Denotes that the RuleSource method rule carrying this annotation finalizes the rule subject.
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