bahmutov / cypress-angular-unit-test

Trying to load and bootstrap Angular component dynamically inside Cypress
159 stars 32 forks source link

Documentation: A test example on the way you test Stores. #515

Closed azaeng04 closed 3 years ago

azaeng04 commented 3 years ago

Currently I don't see an example where you test Stores with Cypress. Would be much appreciated!

LeJeanbono commented 3 years ago

Do you want a specific store ?

azaeng04 commented 3 years ago

Using actions, effects, reducers and selectors

LeJeanbono commented 3 years ago

Will use ngrx, I think

LeJeanbono commented 3 years ago

Is it what you're looking for ? https://github.com/bahmutov/cypress-angular-unit-test/pull/516

azaeng04 commented 3 years ago

Yes @LeJeanbono thanks that should be fine

LeJeanbono commented 3 years ago

You can also use mock with TestBed : https://ngrx.io/guide/store/testing#using-a-mock-store