Package Exports
- @passflow/passflow-react-sdk
- @passflow/passflow-react-sdk/dist/passflow-react-sdk.css
Readme
@passflow/passflow-react-sdk
This is a SDK for react application.
to install just type:
pnpm install
pnpm buildLocal Development
Using Local Passflow JS SDK
For local development and testing with a local version of the Passflow JS SDK, you need to:
- Clone the Passflow JS SDK repository in a sibling directory to this project.
- remove current dependecy
pnpm remove @passflow/passflow-js-sdk - Link folder with:
pnpm link ../passflow-js-sdk
pnpm installNow you can run watch mode in libraray mode and change it. It will compile every changes incrementally.
pnpm watchAfter all done, we need to unlink and return all to the original state
pnpm remove @passflow/passflow-js-sdk
pnpm unlink @passflow/passflow-js-sdk
pnpm install @passflow/passflow-js-sdkTest writing Environment Setup
For local development and UI testing, you need to set up the Passflow environment:
- Set the
PASSFLOW_URLenvironment variable to point to your Passflow instance. - Set the
PASSFLOW_APP_IDenvironment variable - Run
pnpm devanmd all should works
Refer .env.example for more details.
we are using pnpm. Please ansure you have it in the system.
UI Testing
We are using playwright to run UI tests.
First, ensure you have all runtime binary enabled:
pnpm exec playwright installand then feel free to run the tests:
pnpm run test:uiWriting your own ui tests.
You can find a tests in the ./tests frolder.
Please create the new files using the current tests as a reference.
To run the playwright in the design mode with ui, run the follwoing command:
pnpm playwright test --ui