Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Saleor App Payment Stripe

Local development setup

Prerequisites

Running app locally in development containers

Important

You can use the devcontainer Dockerfile and docker-compose.yaml directly - but remember to run pnpm install manually

The easiest way to run Saleor for local development is to use development containers. If you have Visual Studio Code, follow their guide on how to open an existing folder in a container.

The development container only creates a container; you still need to start the server.

The development container will have two ports opened:

  1. 3000 - where the app dev server will listen for requests

Running app in development mode

  1. Install the dependencies by running the following command in the shell:
pnpm install
  1. Create a file named .env and use the contents of the .env.example file as a reference.

  2. Start the development server by running the following command in the shell:

pnpm dev
  1. The app will be available under http://localhost:3000.

Note

To install app in Saleor Cloud, you need to expose your local server to the internet (tunnel). You can use Saleor CLI to do that. See this guide for more details.

  1. Install the app on the Saleor dashboard.

Integration tests

To run integration tests:

  1. Create a file named .env.test and use the contents of the .env.test.example file as a reference.
  2. Change the values of INTEGRATION_* variables
  3. Run tests:
pnpm run test:integration

Tests are using mocked Saleor and local DynamoDB in Docker but are calling the real Stripe API.

E2E tests

To run e2e tests:

  1. Create a file named .env.test and use the contents of the .env.test.example file as a reference.
  2. Change the values of E2E_* variables
  3. Run tests:
pnpm run test:e2e

Tests are using the Stripe staging app that is already installed on Saleor environments.