Skip to content

etsy.com: find the listing page's own favorite button in set_favorite - #140

Merged
yummybomb merged 1 commit into
mainfrom
hypeship/etsy-set-favorite-listing-button
Oct 28, 2026
Merged

yummybomb merged 1 commit into
mainfrom
hypeship/etsy-set-favorite-listing-button

Conversation

@yummybomb

Copy link
Copy Markdown
Contributor

Summary

set_favorite returned listing_not_on_page on the listing page itself. Its selector required data-ui="favorite-listing-button". Only result and recommendation cards carry that attribute. The listing page's own heart is button.listing-page-favorite-button[data-listing-id] (data-testid="favorite-heart") and has no data-ui. The selector now also matches that button, so the tool presses it rather than a card's.

The live page also has an "Add to collection" button with the same listing id. The selector does not match it, and the tests now check it is never pressed.

Tests

  • The listing fixtures now use the live markup for the heart and include the "Add to collection" button. The click harness listens on both buttons, and the toggle tests assert that the heart was the button pressed. With the old source, 4 set_favorite tests fail; with this change, all 132 etsy tests pass.
  • node --test "tests/*.test.mjs": 4482 pass. node scripts/validate-registry.mjs: valid.

Live check (author, not independent QA)

Signed in, on a listing page:

  • false → true
  • a no-op repeat
  • true → false

Each step was read back with get_favorite_status, and the account ended where it started. The status stays draft until independent QA.

@yummybomb
yummybomb marked this pull request as ready for review October 28, 2026 15:07
@yummybomb
yummybomb merged commit 490fe87 into main Oct 28, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant