101 lines
2.7 KiB
Markdown
101 lines
2.7 KiB
Markdown
# Dewemoji Chrome Extension Test Walkthrough
|
|
|
|
This checklist verifies extension behavior against current backend flow.
|
|
|
|
## Preconditions
|
|
- Extension loaded in Chrome (unpacked).
|
|
- Backend reachable at `https://dewemoji.com/v1`.
|
|
- Backend deployed with extension search route:
|
|
- `GET /v1/extension/search`
|
|
- Browser DevTools available for network/console checks.
|
|
|
|
## Test 1: Startup and Reload
|
|
1. Open `chrome://extensions`.
|
|
2. Enable `Developer mode`.
|
|
3. Click `Reload` on Dewemoji extension.
|
|
4. Open extension side panel.
|
|
|
|
Expected:
|
|
- No fatal startup error in extension error page.
|
|
- Panel renders and can request data.
|
|
|
|
## Test 2: Search Request Path
|
|
1. Open panel DevTools.
|
|
2. Search any keyword, e.g. `happy`.
|
|
3. Check network request URL.
|
|
|
|
Expected:
|
|
- First attempt uses `/v1/extension/search`.
|
|
- If endpoint is missing on server, extension falls back to `/v1/emojis`.
|
|
- User still gets results.
|
|
|
|
## Test 3: Categories Load
|
|
1. In panel, inspect category dropdown content.
|
|
2. Confirm categories loaded from API.
|
|
|
|
Expected:
|
|
- Categories render from API payload.
|
|
- If categories API fails, extension still shows fallback categories.
|
|
|
|
## Test 4: Pagination and Load More
|
|
1. Run a broad query (e.g. `face`).
|
|
2. Scroll / load next page.
|
|
|
|
Expected:
|
|
- Additional pages append without duplicates.
|
|
- No hard failure when prefetch endpoint returns 404.
|
|
|
|
## Test 5: Offline Guard
|
|
1. Turn off internet.
|
|
2. Search an uncached query.
|
|
|
|
Expected:
|
|
- Graceful failure message shown.
|
|
- No panel crash.
|
|
|
|
## Test 6: Tier Header Observation
|
|
1. Search while signed out (free behavior).
|
|
2. Search while using valid auth if applicable.
|
|
3. Inspect response headers.
|
|
|
|
Expected:
|
|
- `X-Dewemoji-Tier` can be read when present.
|
|
- UI remains stable when header is absent.
|
|
|
|
## Test 7: Account Connect (New)
|
|
1. Open Settings -> Account tab.
|
|
2. Enter email and password for a Dewemoji account.
|
|
3. Click `Connect`.
|
|
|
|
Expected:
|
|
- Status shows `Connected as <email> (Free|Personal)`.
|
|
- Header `Authorization: Bearer ...` is sent on search requests.
|
|
- Top tag changes to `Free` or `Personal` (not `Pro`).
|
|
|
|
## Test 8: Account Disconnect
|
|
1. In Settings -> Account tab, click `Logout`.
|
|
|
|
Expected:
|
|
- Account status returns to `Not connected`.
|
|
- Top tag changes to `Guest`.
|
|
- Search still works for public keywords.
|
|
|
|
## Test 9: Regression Smoke
|
|
1. Insert/copy actions still work.
|
|
2. Settings panel opens and saves.
|
|
3. No new console syntax/runtime errors.
|
|
|
|
Expected:
|
|
- Existing non-search features keep working.
|
|
|
|
## Debug Commands
|
|
- Verify route on backend:
|
|
- `php artisan route:list --path=v1/extension`
|
|
- Clear backend cache after deploy:
|
|
- `php artisan optimize:clear`
|
|
- `php artisan config:cache`
|
|
|
|
## Notes
|
|
- Preferred endpoint is `/v1/extension/search`.
|
|
- Compatibility fallback to `/v1/emojis` is intentional for mixed deployments.
|