diff --git a/psf-memo-client/specs/mute-feed-filtering.feature b/psf-memo-client/specs/mute-feed-filtering.feature new file mode 100644 index 0000000..aecbb74 --- /dev/null +++ b/psf-memo-client/specs/mute-feed-filtering.feature @@ -0,0 +1,80 @@ +# Scenarios: Mute Feed Filtering - 1, Mute Feed Filtering - 2, Mute Feed Filtering - 3, Mute Feed Filtering - 4, Mute Feed Filtering - 5, Mute Feed Filtering - 6 +# +# Muting a profile hides that profile's content from the viewer's feeds. The +# psf-memo-db API filters server-side: given the viewer's address, it excludes +# posts and notifications authored by profiles the viewer currently mutes. The +# client identifies the viewer from the wallet and passes the viewer address to +# the recent feed, topic feed, search, and notifications queries. Filtering is +# not optimistic: a mute only takes effect once the mute transaction is mined +# and indexed, which is represented here by the psf-memo-db API reporting the +# mute. Unmuting restores the profile's content once the unmute is indexed. +Feature: Mute Feed Filtering + + Background: + Given a wallet authenticated for the address bitcoincash:qqlrzp23w08434twmvr4fxw672whkjy0py26r63g3d + + Scenario Outline: Mute Feed Filtering - 1 the recent feed hides posts from muted profiles + Given the psf-memo-db API reports that I mute the address + Given the psf-memo-db API serves a post with txid authored by the address with text + Given the psf-memo-db API serves a post with txid authored by the address with text + When I open the recent posts feed + Then the recent feed shows the post with text + And the recent feed does not show the post with text + + Examples: + | muted | txid_a | text_a | other | txid_b | text_b | + | bitcoincash:qr95sy3j9xwd2ap32xkykttr4cvcu7as4y0qverfuy | 1111111111111111111111111111111111111111111111111111111111111111 | hello from muted | bitcoincash:qqq3728yw0y47sqn6l2na30mcw6zm78dzqre909m2r | 2222222222222222222222222222222222222222222222222222222222222222 | hello from other | + | bitcoincash:qqq3728yw0y47sqn6l2na30mcw6zm78dzqre909m2r | 3333333333333333333333333333333333333333333333333333333333333333 | muted again | bitcoincash:qr95sy3j9xwd2ap32xkykttr4cvcu7as4y0qverfuy | 4444444444444444444444444444444444444444444444444444444444444444 | other again | + + Scenario Outline: Mute Feed Filtering - 2 the topic feed hides posts from muted profiles + Given the psf-memo-db API reports that I mute the address + Given the psf-memo-db API serves a post with txid in the topic "bitcoin" authored by the address with text + Given the psf-memo-db API serves a post with txid in the topic "bitcoin" authored by the address with text + When I open the topic feed for "bitcoin" + Then the topic feed shows the post with text + And the topic feed does not show the post with text + + Examples: + | muted | txid_a | text_a | other | txid_b | text_b | + | bitcoincash:qr95sy3j9xwd2ap32xkykttr4cvcu7as4y0qverfuy | 1111111111111111111111111111111111111111111111111111111111111111 | muted topic post | bitcoincash:qqq3728yw0y47sqn6l2na30mcw6zm78dzqre909m2r | 2222222222222222222222222222222222222222222222222222222222222222 | other topic post | + | bitcoincash:qqq3728yw0y47sqn6l2na30mcw6zm78dzqre909m2r | 3333333333333333333333333333333333333333333333333333333333333333 | muted topic again | bitcoincash:qr95sy3j9xwd2ap32xkykttr4cvcu7as4y0qverfuy | 4444444444444444444444444444444444444444444444444444444444444444 | other topic again | + + Scenario Outline: Mute Feed Filtering - 3 search hides posts from muted profiles + Given the psf-memo-db API reports that I mute the address + Given the psf-memo-db API has a post with the text authored by the address + Given the psf-memo-db API has a post with the text authored by the address + When I open the Search page + And I submit a search for + Then the search results include a post with the text + And the search results do not include a post with the text + + Examples: + | muted | text_a | other | text_b | query | + | bitcoincash:qr95sy3j9xwd2ap32xkykttr4cvcu7as4y0qverfuy | muted post about bitcoin | bitcoincash:qqq3728yw0y47sqn6l2na30mcw6zm78dzqre909m2r | other post about bitcoin | bitcoin | + | bitcoincash:qqq3728yw0y47sqn6l2na30mcw6zm78dzqre909m2r | muted post about memo | bitcoincash:qr95sy3j9xwd2ap32xkykttr4cvcu7as4y0qverfuy | other post about memo | memo | + + Scenario Outline: Mute Feed Filtering - 4 notifications hide actions from muted profiles + Given the psf-memo-db API reports that I mute the address + Given the psf-memo-db API serves a post with txid authored by my wallet address with text "hello from me" + Given the psf-memo-db API serves a reply with txid to the post with txid by the address with text + Given the psf-memo-db API serves a reply with txid to the post with txid by the address with text + When I open the Notifications page + Then the notifications include a reply notification from the address with text + And the notifications do not include a reply notification from the address + + Examples: + | my_post | reply_a | muted | text_a | reply_b | other | text_b | + | 1111111111111111111111111111111111111111111111111111111111111111 | 2222222222222222222222222222222222222222222222222222222222222222 | bitcoincash:qr95sy3j9xwd2ap32xkykttr4cvcu7as4y0qverfuy | muted reply | 3333333333333333333333333333333333333333333333333333333333333333 | bitcoincash:qqq3728yw0y47sqn6l2na30mcw6zm78dzqre909m2r | other reply | + | 4444444444444444444444444444444444444444444444444444444444444444 | 5555555555555555555555555555555555555555555555555555555555555555 | bitcoincash:qqq3728yw0y47sqn6l2na30mcw6zm78dzqre909m2r | muted reply again | 6666666666666666666666666666666666666666666666666666666666666666 | bitcoincash:qr95sy3j9xwd2ap32xkykttr4cvcu7as4y0qverfuy | other reply again | + + Scenario: Mute Feed Filtering - 5 unmuting restores posts in the recent feed + Given the psf-memo-db API reports that I mute the address bitcoincash:qr95sy3j9xwd2ap32xkykttr4cvcu7as4y0qverfuy + Given the psf-memo-db API reports that I unmute the address bitcoincash:qr95sy3j9xwd2ap32xkykttr4cvcu7as4y0qverfuy + Given the psf-memo-db API serves a post with txid 1111111111111111111111111111111111111111111111111111111111111111 authored by the address bitcoincash:qr95sy3j9xwd2ap32xkykttr4cvcu7as4y0qverfuy with text "hello from alice" + When I open the recent posts feed + Then the recent feed shows the post with text "hello from alice" + + Scenario: Mute Feed Filtering - 6 the recent feed shows all posts when I mute no one + Given the psf-memo-db API serves a post with txid 1111111111111111111111111111111111111111111111111111111111111111 authored by the address bitcoincash:qr95sy3j9xwd2ap32xkykttr4cvcu7as4y0qverfuy with text "hello from alice" + When I open the recent posts feed + Then the recent feed shows the post with text "hello from alice"