Call Pinia Store Actions From Within a Cypress Component Test

InstructorFilip Hric

Share this video with your friends

Send Tweet

When component uses a state management tool like Pinia, it needs to be defined within the test. To use Pinia inside the Cypress component test, we need to create a Pinia instance and pass it into our store. For changing the state we can call our actions directly from within our test and assert different attributes of the component with Cypress commands