diff --git a/psf-memo-client/specs/recent-profile-display.feature b/psf-memo-client/specs/recent-profile-display.feature new file mode 100644 index 0000000..145f198 --- /dev/null +++ b/psf-memo-client/specs/recent-profile-display.feature @@ -0,0 +1,55 @@ +# Scenarios: Recent Profile Display - 1, Recent Profile Display - 2, Recent Profile Display - 3, Recent Profile Display - 4, Recent Profile Display - 5 +# +# The /profile/recent page renders each recent profile in a table. A new +# leftmost "Account" column shows the profile's display name and avatar, ahead +# of the existing Address, Bio, Block, Seen, and TXID columns. The display name +# and avatar link to the profile. When a profile has no display name the account +# shows the truncated address; when it has no avatar the account shows an +# identicon. This is a read-only rendering feature: it broadcasts no Memo action +# and writes no DB data. +# +# Fixture "recent-profiles-identities" (the GET /profile/recent response: each +# profile carries the display name and avatar URL joined from the names and +# profilePics stores, as null when absent): +# bitcoincash:qr95sy3j9xwd2ap32xkykttr4cvcu7as4y0qverfuy (alice) { text: alice bio, name: alice, profilePicUrl: https://example.com/alice.png } +# bitcoincash:qqq3728yw0y47sqn6l2na30mcw6zm78dzqre909m2r (bob) { text: bob bio, name: bob, profilePicUrl: https://example.com/bob.jpg } +# bitcoincash:qpm2qsznhks23z7629mms6s4cwef74vcwvy22gdx6a (carol) { text: carol bio, name: carol, profilePicUrl: null } +# bitcoincash:qqlrzp23w08434twmvr4fxw672whkjy0py26r63g3d (dave) { text: dave bio, name: null, profilePicUrl: https://example.com/dave.png } +Feature: Recent Profile Display + + Background: + Given the psf-memo-db API serves the recent profiles fixture "recent-profiles-identities" + + Scenario Outline: Recent Profile Display - 1 the account column shows each profile's display name and avatar + When I open the recent profiles page + Then the recent profiles account for the address shows the display name "" + And the recent profiles account for the address shows the avatar "" + + Examples: + | addr | name | avatar | + | bitcoincash:qr95sy3j9xwd2ap32xkykttr4cvcu7as4y0qverfuy | alice | https://example.com/alice.png | + | bitcoincash:qqq3728yw0y47sqn6l2na30mcw6zm78dzqre909m2r | bob | https://example.com/bob.jpg | + + Scenario Outline: Recent Profile Display - 2 the account avatar and display name link to the profile + When I open the recent profiles page + Then the recent profiles account for the address links the avatar to "" + And the recent profiles account for the address links the display name to "" + + Examples: + | addr | profile_path | + | bitcoincash:qr95sy3j9xwd2ap32xkykttr4cvcu7as4y0qverfuy | /profile/bitcoincash%3Aqr95sy3j9xwd2ap32xkykttr4cvcu7as4y0qverfuy | + | bitcoincash:qqq3728yw0y47sqn6l2na30mcw6zm78dzqre909m2r | /profile/bitcoincash%3Aqqq3728yw0y47sqn6l2na30mcw6zm78dzqre909m2r | + + Scenario: Recent Profile Display - 3 a profile without an avatar shows an identicon + When I open the recent profiles page + Then the recent profiles account for the address bitcoincash:qpm2qsznhks23z7629mms6s4cwef74vcwvy22gdx6a shows an identicon avatar + And the recent profiles account for the address bitcoincash:qpm2qsznhks23z7629mms6s4cwef74vcwvy22gdx6a shows the display name "carol" + + Scenario: Recent Profile Display - 4 a profile without a display name shows the truncated address + When I open the recent profiles page + Then the recent profiles account for the address bitcoincash:qqlrzp23w08434twmvr4fxw672whkjy0py26r63g3d shows the display name "bitcoincas...py26r63g3d" + And the recent profiles account for the address bitcoincash:qqlrzp23w08434twmvr4fxw672whkjy0py26r63g3d shows the avatar "https://example.com/dave.png" + + Scenario: Recent Profile Display - 5 the account column is the first column and the other columns remain + When I open the recent profiles page + Then the recent profiles table has the column headers "Account", "Address", "Bio", "Block", "Seen", "TXID" diff --git a/psf-memo-db/specs/recent-profile-identity.feature b/psf-memo-db/specs/recent-profile-identity.feature new file mode 100644 index 0000000..4b03dda --- /dev/null +++ b/psf-memo-db/specs/recent-profile-identity.feature @@ -0,0 +1,38 @@ +# Scenarios: Recent Profile Identity - 1 +# +# GET /profile/recent returns each recent profile's current display name and +# avatar URL alongside the profile text and provenance it already returns. The +# names store (newest setName, 0x6d01) and the profilePics store (newest +# setProfilePic, 0x6d0a) are keyed by address, so the route joins each record +# into its profile by address. A profile with no name record reports a null +# display name, and a profile with no picture record reports a null avatar URL. +# The join does not change the profile order (block height descending) or the +# pagination metadata. +# +# Fixture "profiles-with-identities" (profiles, names, and profilePics stores): +# profiles: +# bitcoincash:qaddr-alice { text: alice bio, txid: profile-alice, blockHeight: 600300, seen: 3 } +# bitcoincash:qaddr-bob { text: bob bio, txid: profile-bob, blockHeight: 600200, seen: 2 } +# bitcoincash:qaddr-carol { text: carol bio, txid: profile-carol, blockHeight: 600100, seen: 1 } +# names: +# bitcoincash:qaddr-alice { name: alice, txid: name-alice, blockHeight: 600250 } +# bitcoincash:qaddr-carol { name: carol, txid: name-carol, blockHeight: 600050 } +# profilePics: +# bitcoincash:qaddr-alice { url: https://example.com/alice.png, txid: pic-alice, blockHeight: 600260 } +# bitcoincash:qaddr-bob { url: https://example.com/bob.jpg, txid: pic-bob, blockHeight: 600150 } +Feature: Recent Profile Identity + + Background: + Given a psf-memo-db instance with profiles, names, and profilePics stores + Given the fixture "profiles-with-identities" is loaded into the profiles, names, and profilePics stores + + Scenario Outline: Recent Profile Identity - 1 GET /profile/recent returns each profile's display name and avatar + When the client requests /profile/recent + Then the response profile for has display name "" + And the response profile for has avatar "" + + Examples: + | addr | name | avatar | + | bitcoincash:qaddr-alice | alice | https://example.com/alice.png | + | bitcoincash:qaddr-bob | | https://example.com/bob.jpg | + | bitcoincash:qaddr-carol | carol | |