Comments (8)
I was facing the same problem.
A little workaround could be (using testcafe):
const setFakeVue = ClientFunction(() => {
window.Vue = {version: "2.2.6"};
});
fixture `Home`.page('url').beforeEach(async t => {
await setFakeVue();
});
from testcafe-vue-selectors.
Is there a workaround for this? I tried setting window.Vue = Vue;
, now nothing works – i cannot even select by id :\
from testcafe-vue-selectors.
So far, we couldn't come up with a workaround for this.
If your application uses vue-loader
, don't use the testcafe-selector-extentions
plugin.
Instead, use build-in TestCafe selectors.
from testcafe-vue-selectors.
@fiws You cannot assign Vue imported in test (server side) to variable via function executed on client side. @das-mensch gave the best solution at the moment. Alternatively you can statically import Vue in your application by adding script tag and linking to some cdn. Or add dynamically script tag with Vue via client function.
from testcafe-vue-selectors.
@fiws @das-mensch @Ranmus
[email protected]
from testcafe-vue-selectors.
Is this solution still working?
I'm using the webpack-simple template. I'm testing but not finding the elements within App. See the error and code:
from testcafe-vue-selectors.
Hi @leonardovilarinho.
I can not reproduce the problem on my side.
Make sure your application is running in development mode.
If it is true, then could you attach to issue the full code of your application?
from testcafe-vue-selectors.
Hi @miherlosev, I found my error!
The Vue documentation suggests use the camel case to declare the component names. For example: List; ListItem.
But in the testcafe-vue-selector code there is a transformation filter for lowercase in the tags. Resulting in: list; listitem.
Then search the testcafe for "list" and do not find the element, because "l" is in lowercase.
I'll take you in the PR (#35). Now, the plugin allows the camel case format and suit components names.
from testcafe-vue-selectors.
Related Issues (20)
- Support component loaded via vue-router HOT 6
- [FR] Typings HOT 2
- Can't install vue-selectors HOT 1
- Vue cmp state doens't seem to update HOT 1
- `vue-loader`: migrate to `15.x`
- Return ref along with data, props, computed and state on getVue() HOT 2
- Can't get access to global Vue (Nuxt) object, fails with error. HOT 3
- Basic usage- Vue render content not available HOT 5
- Unable to find a Vue componant within a named slot HOT 4
- Select VueComponent by props values HOT 3
- How to get to deeply nested component? HOT 1
- How to get the text of the component q-toolbar-title? HOT 1
- "babel-core" should be included in package HOT 2
- Error "_keys2 is not defined" when calling .getVue() HOT 1
- Selector() failed to access "Row" of v-data-table of Vuetify HOT 3
- .getVue() seems not working HOT 2
- .getVue() causes error HOT 5
- Select VueComponent by key HOT 3
- Searching for nested components HOT 3
- Vue3 compatibility HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from testcafe-vue-selectors.