-
Notifications
You must be signed in to change notification settings - Fork 0
Add edit pen #137
Add edit pen #137
Conversation
tests/unit/components/App.spec.ts
Outdated
@@ -9,6 +9,8 @@ import { ENTITY_INIT } from '@/store/entity/actionTypes'; | |||
import { LANGUAGE_PREFERENCE } from '@/store/user/actionTypes'; | |||
import { EDIT_LINK_URL_INIT } from '@/store/links/actionTypes'; | |||
|
|||
config.logModifiedComponents = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has to do with vue-test-utils and vue-class-component. To be honest, I'm a little confused why this warning pops up in this file, which only shallowMount
s components. Any ideas are welcome. Without this, we get the following warning:
console.error node_modules/@vue/test-utils/dist/vue-test-utils.js:15
[vue-test-utils]: The child component has been modified to ensure it is created with properties injected by Vue Test Utils.
This is because the component was created with Vue.extend, or uses the Vue Class Component decorator.
Because the component has been modified, it is not possible to find it with a component selector. To find the component, you must stub it manually using the stubs mounting option, or use a name or ref selector.
You can hide this warning by setting the Vue Test Utils config.logModifiedComponents option to false.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looked at it and #138 helped - please confirm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ermahgerd, it does!!
Update to latests @vue/test-utils. This fixes, amongst others, vuejs/vue-test-utils#973 encountered during #137
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Swords to edit pens!
src/components/EditPen.vue
Outdated
</script> | ||
|
||
<style lang="scss"> | ||
.edit-action a { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This selector makes me uncomfortable as I'm afraid it will see matches from MW/WB.
Using a block identifier would work around that. It may feel repetitive but would give use piece of mind and make our components completely portable. Maybe it's the name that could be cooler to make this appear "more right"™, as in not bound to an implementation ("termbox") but rather part of the same set of building blocks in which we reap the fruits of well done isolation. Something completely generic like a project code name: hajamapa.
(webpack-contrib/css-loader#608 is something I found while pondering)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice idea to push that into his own component!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hajamapa ಠ_ಠ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The generic class name is a good point. I added the .wikibase-termbox__
prefix, since it's correct for now.
tests/unit/components/App.spec.ts
Outdated
@@ -9,6 +9,8 @@ import { ENTITY_INIT } from '@/store/entity/actionTypes'; | |||
import { LANGUAGE_PREFERENCE } from '@/store/user/actionTypes'; | |||
import { EDIT_LINK_URL_INIT } from '@/store/links/actionTypes'; | |||
|
|||
config.logModifiedComponents = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looked at it and #138 helped - please confirm.
Update to latests @vue/test-utils. This fixes, amongst others, vuejs/vue-test-utils#973 encountered during #137
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated and rebased, to harness #138 goodness.
src/components/EditPen.vue
Outdated
</script> | ||
|
||
<style lang="scss"> | ||
.edit-action a { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hajamapa ಠ_ಠ
src/components/EditPen.vue
Outdated
</script> | ||
|
||
<style lang="scss"> | ||
.edit-action a { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The generic class name is a good point. I added the .wikibase-termbox__
prefix, since it's correct for now.
https://phabricator.wikimedia.org/T211584