Comments (2)
Hi @cesarpatrick,
Which versions are you using for?
- node
- angular
- spartacus
- spartacus-mock
Did you run ng add @valantic/spartacus-mock
? Did it show any errors in the console?
We have just published version 3.1.0 of spartacus-mock, working with the latest mws version, spartacus 6.7.0 and angular 15. The latest version adds more automatically generated files to help you getting started.
Out of the box, all requests for the standard electronics store https://spartacus-demo.eastus.cloudapp.azure.com/electronics-spa/en/USD/ are mocked.
After a successful setup, you should have several files being generated, see here: https://github.com/valantic/spartacus-mock/blob/main/docs/getting-started/installation.md
If the schematics (running ng add @valantic/spartacus-mock
) do not work for you, you can aswell just run npm i -d @valantic/[email protected]
to install it and then copy / create the files manually.
You can also check this example project, this is how it should look like after the successful setup: https://github.com/janwidmer/spartacus-test-6.7.0/tree/main/src/mock-server. if you clone this test project, you should see spartacus-mock running:
- Checkout Repo
- Make sure, you run node version 18.18.0
- Run npm i
- Run npm run start
- Open Browser URL http://localhost:4200/electronics-spa/de/USD/
from spartacus-mock.
@cesarpatrick we have released another version having more detailed installation docs: https://valantic.gitbook.io/spartacus-mock/getting-started/installation
from spartacus-mock.
Related Issues (20)
- Finalize initial usage documentation
- Adjust docs structure to be prepared to use a documentation tool
- Enhance docs to describe the options of the mock server
- Enhance docs with all usable default routes contained in spartacus-mock
- Enhance docs to show all existing createXxx methods
- Enhance docs with hint, that prettierignore should contain src/mockServiceWorker.js
- Update faker.js to 8.x
- Update Node Version to 18.x and Spartacus to 6.4 and MSW to 1.3.1
- Enhance docs to show how url path / get params can be defined in routes and read in handlers
- Add HTTP Error Case Overring Possibility via In Browser Admin Panel (from Michael)
- Add Mock Handler for Order Return Feature
- Add unit tests for mock-server
- Add unit-tests for schematics
- Update MSW to Version 2.x
- New Features with MSW 2.0 HOT 1
- Improve config around whitelist mode / example data
- Add quiet option
- Improve installation docs, add boilerplate schematics
- Update to Angular 17 and Spartacus 2211.19
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 spartacus-mock.