diff --git a/specs/set-name.feature b/specs/set-name.feature new file mode 100644 index 0000000..8c152bb --- /dev/null +++ b/specs/set-name.feature @@ -0,0 +1,61 @@ +# Scenarios: Set Name - 1, Set Name - 2, Set Name - 3, Set Name - 4, Set Name - 5 +Feature: Set Name + + Background: + Given a wallet authenticated for the address bitcoincash:qqlrzp23w08434twmvr4fxw672whkjy0py26r63g3d + Given the wallet has spendable output to pay the transaction fee + + Scenario Outline: Set Name - 1 a valid name is broadcast and the user lands on the account page + Given I navigate to the path /memo/set-name + When I type a name with the text "" + When I submit the name + Then the app broadcasts an OP_RETURN transaction with the Memo set-name prefix + Then I navigate to the path /account + Then the account page shows my name as "" + + Examples: + | name | + | trout | + | a longer name with spaces | + + Scenario Outline: Set Name - 2 an empty name is rejected on the set name page + Given I navigate to the path /memo/set-name + When I type a name with the text "" + When I submit the name + Then the set name page shows a validation error + Then the app does not broadcast any transaction + + Examples: + | name | + | | + + Scenario Outline: Set Name - 3 an over-long name is rejected on the set name page + Given I navigate to the path /memo/set-name + When I type a name with the text "" + When I submit the name + Then the set name page shows a length error + Then the app does not broadcast any transaction + + Examples: + | name | + | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | + | bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb | + | 😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀 | + + Scenario Outline: Set Name - 4 the byte counter counts down from the name limit + Given I navigate to the path /memo/set-name + When I type a name with the text "" + Then the set name page shows a remaining byte count of + + Examples: + | name | count | + | | 77 | + | trout | 72 | + | é | 75 | + | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 0 | + + Scenario: Set Name - 5 the account page links to the set name page + Given I navigate to the path /account + Then the account page shows a Set Name button + When I click the Set Name button + Then I navigate to the path /memo/set-name