3.2 KiB
3.2 KiB
Dewemoji Migration Test Guide (Provider + Frontend)
Follow this after pulling latest main.
1) Prepare local env
- Open
app/.env. - Set local app URL:
APP_URL=http://127.0.0.1:8000
- Start in sandbox first:
DEWEMOJI_BILLING_MODE=sandboxDEWEMOJI_LICENSE_ACCEPT_ALL=false
- Keep CORS local during testing:
DEWEMOJI_ALLOWED_ORIGINS=http://127.0.0.1:8000,http://localhost:8000
2) Run app
- In
app/, run:php artisan migrate
- Start server:
php artisan serve --host=127.0.0.1 --port=8000
- Open
http://127.0.0.1:8000.
3) Provider parity test (Live mode)
A. Gumroad live mapping test
- Switch to live mode in
.env:DEWEMOJI_BILLING_MODE=liveDEWEMOJI_LICENSE_ACCEPT_ALL=falseDEWEMOJI_PRO_KEYS=DEWEMOJI_GUMROAD_ENABLED=trueDEWEMOJI_GUMROAD_VERIFY_URL=https://api.gumroad.com/v2/licenses/verifyDEWEMOJI_GUMROAD_PRODUCT_IDS=<your_product_id>
- Restart
php artisan serve. - Test verify:
curl -X POST "http://127.0.0.1:8000/v1/license/verify" \
-H "Content-Type: application/json" \
-d '{"key":"<real_gumroad_key>"}'
- Expect
ok=true,source="gumroad", tier headerX-Dewemoji-Tier: pro.
B. Mayar live mapping test
- In
.env, configure:DEWEMOJI_MAYAR_ENABLED=trueDEWEMOJI_MAYAR_VERIFY_URL=<real_mayar_verify_url>- OR (
DEWEMOJI_MAYAR_API_BASE+DEWEMOJI_MAYAR_ENDPOINT_VERIFY) DEWEMOJI_MAYAR_API_KEY=<or secret key>
- Test verify:
curl -X POST "http://127.0.0.1:8000/v1/license/verify" \
-H "Content-Type: application/json" \
-d '{"key":"<real_mayar_key>"}'
- Expect
ok=true,source="mayar".
C. Negative check (important)
- Verify with invalid key.
- Expect
401+error="invalid_license"+ diagnostics indetails.gumroad/details.mayar.
4) Activation lifecycle test
- Verify key is valid first.
- Activate device:
curl -X POST "http://127.0.0.1:8000/v1/license/activate" \
-H "Content-Type: application/json" \
-d '{"key":"<valid_key>","email":"you@example.com","product":"chrome","device_id":"chrome-profile-1"}'
- Expect
ok=true,pro=true. - Deactivate:
curl -X POST "http://127.0.0.1:8000/v1/license/deactivate" \
-H "Content-Type: application/json" \
-d '{"key":"<valid_key>","product":"chrome","device_id":"chrome-profile-1"}'
- Expect
ok=true.
5) Frontend parity test
Open and verify these URLs:
/(discover page)/browse/<category>example:/animals/<category>/<subcategory>example:/animals/animal-mammal/emoji/grinning-face/pricing/api-docs/support/privacy/terms/robots.txt/sitemap.xml
Checks:
- Home search updates URL without full reload.
- Category routes prefill filters correctly.
- Pricing links point to Gumroad URLs.
- Support page loads and shows API/auth guidance.
robots.txtcontains sitemap URL.sitemap.xmlincludes core pages and emoji URLs.
6) Automated test pass
From app/ run:
php artisan test
Expected: all tests pass.
7) Switch back to safe local mode (recommended)
After live-provider testing, return to:
DEWEMOJI_BILLING_MODE=sandbox- disable provider flags unless actively testing them.