This document list a couple of useful information to develop and deploy the gix-components
.
From Playwright documentation:
Playwright Test includes the ability to produce and visually compare screenshots using
await expect(page).toHaveScreenshot()
. On first execution, Playwright test will generate reference screenshots. Subsequent runs will compare against the reference.
To implement a test, follow these steps:
- Add an e2e test in the
./e2e
directory. - Implement the test by automating an action on the documentation website:
- Use
await expect(page).toHaveScreenshot()
within the test. - Commonly, a
data-tid="showcase"
is used to wrap the showcase section of the page being tested and is used within the test to scroll to the particular location.
- Use
- Create a PR for your changes.
- Open the GitHub Actions page and navigate to Update snapshots.
- Manually trigger the generation of screenshots for the CI by running the workflow using your PR or branch.
This last step will generate the screenshots for the CI and add them to your PR. You can trigger this job again at any time you make changes, regardless of whether the test itself changes or not.
Run npm run e2e:snapshots
locally and use step 7 from before to trigger it in CI also.
Once your principal added to the controllers of the wallet, deploy the documentation to mainnet
with the following command:
dfx deploy --network ic --wallet cvthj-wyaaa-aaaad-aaaaq-cai