- Please clone the following sample Github repo (
https://github.com/LambdaTest/smartui-figma-web-cli-sample/
).
git clone https://github.com/LambdaTest/smartui-figma-web-cli-sample
- Install the node modules using the command:
npm i
- Configure your project token and Figma token
- Setup your project token show in the SmartUI app after, creating your project.
export PROJECT_TOKEN="123456#1234abcd-****-****-****-************"
set PROJECT_TOKEN="123456#1234abcd-****-****-****-************"
- Setup your personal access token for Figma to authenticate Figma with SmartUI.
export FIGMA_TOKEN="123456#1234abcd-****-****-****-************"
set FIGMA_TOKEN="123456#1234abcd-****-****-****-************"
- Create your figma baseline
npx smartui upload-figma-web designs.json --buildName=FigmaBaseline1
- Execute your functional test script (Selenium Nodejs in this sample)
npx smartui --config web-config.json exec --buildName=web-build -- node figma-web-local.js