Testing components using asynchronous store actions #1413
Unanswered
rdoepke
asked this question in
Help and Questions
Replies: 1 comment
-
I would suggest using the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone,
I am new to both vue and JS testing and cannot get my component test to work with cypress.
Lets say we have very simple component MyComponent that triggers a fetchData() action on my store:
My DataStore is very basic as well:
Now my test should assert that it properly displays "foo"
However, I am always getting

The component works in the actual implementation. It looks like my fetchData() is neither called (there is no xhr request), nor I am to the state that I could mock my api call yet.
This is from an (almost) fresh quasar project with typescript and test extension using cypress.
What am I doing wrong?
Beta Was this translation helpful? Give feedback.
All reactions