testcafe-vue-selectors
testcafe-vue-selectors copied to clipboard
Support vue components renrered by nuxt.js
https://github.com/nuxt/nuxt.js https://github.com/kartojal/testcafe-nuxt-selectors
Did some research about detecting the vue version and there is a problem if you impose the detection of the version of Vue:
- Maybe a production app does not want to expose his
Vue.version
to the public for preventing to exploit any old bug. So you can not always test an app in production (maybe you want to do tests to live production servers) - In Nuxt apps, it does not expose
window.Vue
, in both development and production builds. You can still detect the Vue version in "development" enviroment usingwindow.__VUE_DEVTOOLS_GLOBAL_HOOK__
Without vue version detection, adding Nuxt to this library would be very easy. Instead of throwing an error if the version is not compatible or not found, we could throw a Warning to the console, but without stopping the execution of the VueSelector.
Could do a pull request if you feel okay with these changes and merge both libraries so is more easy to maintain.
VueSelector will work only if the Vue.js application was built in the development mode. In the production mode, it is impossible to retrieve information about components (behavior like in the vue-devtools extension). I will add a note about this requirement in README.md (https://github.com/DevExpress/testcafe-vue-selectors/issues/28) I will also change the behavior in case of the version incompatibility: raise warning instead of error.
I will check version only for Vue. For Nuxt.js, it is not necessary for the first implementation.
Could do a pull request if you feel okay with these changes and merge both libraries so is more easy to maintain.
You are welcome. I will be glad to see your PR.
@miherlosev I could possible make it work with nuxt
out of the box.
But, to make it work I had to make this patch: https://github.com/kartojal/testcafe-nuxt-selectors/pull/2/files
If that's fine, I can create a PR with this fix and basic window.$nuxt
changes.
Ping @kartojal
@sobolevn
If that's fine, I can create a PR with this fix and basic window.$nuxt changes.
Ok, I don't mind.
This issue has been automatically marked as stale because it has not had any activity for a long period. It will be closed and archived if no further activity occurs. However, we may return to this issue in the future. If it still affects you or you have any additional information regarding it, please leave a comment and we will keep it open.
We're closing this issue after a prolonged period of inactivity. If it still affects you, please add a comment to this issue with up-to-date information. Thank you.