sergehuber opened a new pull request, #39:
URL: https://github.com/apache/unomi-tracker/pull/39

   Stacked on #37 (it needs the wait for a steady server added there). Once #37 
is merged, this PR targets `main`.
   
   ## Summary
   - **UNOMI-1037**: only the first click on an element sent with 
`sendClickEvent` was tracked. `splice(eventIndex, 0)` removed nothing, so the 
element stayed in `eventsPrevented` and later clicks were ignored. Now 
`splice(eventIndex, 1)`.
   - **UNOMI-1038**: `_resolveId` used the array returned by `filter()` as a 
string, missed a mapped part at the start of the id, and looked for 
`"undefined…"` when nothing matched. It now uses the first matching part. Unit 
tests in `test/spec.js`.
   - New browser tests against each Unomi server (`tracker.spec.js`, test page 
options documented in `page/index.html`):
     - personalization: Unomi chooses the variant whose condition matches, and 
the tracker displays it;
     - fallback variant when Unomi cannot be reached, and when it does not 
answer within `timeoutInMilliseconds`;
     - two clicks with `sendClickEvent` store two events (fails before the 
UNOMI-1037 fix: one event);
     - a form: the setup adds a rule on its submit, Unomi returns it in the 
tracked conditions, the form event is stored with its fields (text, checked 
checkboxes, selected option), and the site's own submit handler then runs once.
   - `test/bugs` described these two bugs and was never run (vitest is not 
installed): removed.
   - `test/servers/README.md`: what is tested, and what is not yet.
   
   The test page sends the same requests as before when the new options are not 
used, so the comparison with 1.5.0 is unchanged.
   
   ## Test plan
   - [x] `yarn lint`, `yarn test` (the `_resolveId` tests fail on the old code)
   - [x] `yarn test:servers`: `compare-1.5.0`, `unomi2-legacy`, `unomi2`, 
`unomi3`, `unomi4`, `unomi4-compat` all pass (14 or 15 tests per server)
   - [ ] CI
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to