Repository navigation
Migrate stories: choosing a bulk action, bringing a group back on sale, and asking to be left alone #2082
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Migrate stories: choosing a bulk action, bringing a group back on sale, and asking to be left alone #2082
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
3b5eb6c
Migrate story: choosing a bulk action for a group
stefan-burke c447432
Finish the landing story and tell the bring-back-on-sale story
claude f0199ca
Migrate story: asking to be left alone
claude 6b2e814
Fold the provider-payload walk into one helper
claude b86cb41
Say what a mixed group is really offered, and reuse the path helper
claude e39d724
Keep the all-off-sale rule away from empty groups
claude File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| @story:attendees.asking-to-be-left-alone | ||
| @owner:attendees @risk:high | ||
| @actor:customer | ||
| @edition:managed @edition:self-hosted | ||
| @surface:public | ||
| Feature: Somebody the site emails can ask to be left alone | ||
| Every promotion the site sends ends with a link to the reader's own | ||
| choices page. That page is found by a one-way code, never by their | ||
| address, and it is theirs alone: one press stops promotions, a later | ||
| press lets them back in, and a third deletes the record the site | ||
| keeps under their code. A link that has lost its code explains | ||
| itself and offers nothing to press, so a broken link can never | ||
| change anything. | ||
|
|
||
| @rule:attendees.every-promotion-carries-the-way-out | ||
| Rule: Every promotion carries the way out | ||
| The link at the bottom of a promotion leads to the reader's own | ||
| choices page, which tells them where they stand before they press | ||
| anything. | ||
|
|
||
| @case:leave-alone.the-link-leads-to-their-own-page | ||
| Scenario: A reader follows the link at the bottom of a promotion | ||
| Given the owner has an email provider of their own | ||
| And 2 people have booked onto "the Gig" | ||
| And the owner has sent a promotion to "the Gig" saying "Half price Friday." | ||
| When one of them follows the choices link in their copy | ||
| Then they land on their own choices page, still subscribed to promotions | ||
|
|
||
| @rule:attendees.asking-not-to-hear-is-one-press | ||
| Rule: Asking not to hear is one press, and it is kept | ||
| Pressing the button on their own page is all it takes. The reader | ||
| is told it worked, the site counts them as having asked not to | ||
| hear, and the page they are left on offers the way back in rather | ||
| than a dead end. | ||
|
|
||
| @case:leave-alone.one-press-stops-the-promotions | ||
| Scenario: One press stops the promotions | ||
| Given the owner has an email provider of their own | ||
| And 2 people have booked onto "the Gig" | ||
| And the owner has sent a promotion to "the Gig" saying "Half price Friday." | ||
| And one of them follows the choices link in their copy | ||
| When they ask to stop hearing about promotions | ||
| Then they are told they have unsubscribed | ||
| And the site counts them as having asked not to hear | ||
| And their page offers them a way back in | ||
|
|
||
| @rule:attendees.a-change-of-mind-puts-them-back | ||
| Rule: A change of mind puts them back | ||
| Someone who asked not to hear can press the way back in on the | ||
| same page. The site stops counting them as having asked not to | ||
| hear, so promotions may reach them again. | ||
|
|
||
| @case:leave-alone.a-change-of-mind | ||
| Scenario: They change their mind and come back | ||
| Given somebody has asked not to hear about promotions | ||
| When they change their mind on their own choices page | ||
| Then they are told they have resubscribed | ||
| And the site counts them as hearing about promotions again | ||
|
|
||
| @rule:attendees.the-record-under-their-code-can-be-deleted | ||
| Rule: The record under their code can be deleted by them | ||
| The same page offers to delete the record the site keeps under | ||
| their one-way code. After the press the site keeps no record under | ||
| that code at all — including the choices they had made on this | ||
| page. | ||
|
|
||
| @case:leave-alone.deleting-their-own-record | ||
| Scenario: They delete the record the site keeps | ||
| Given somebody has asked not to hear about promotions | ||
| When they delete their data from their choices page | ||
| Then they are told their record was deleted | ||
| And the site keeps no record under their code | ||
|
|
||
| @rule:attendees.a-broken-link-changes-nothing | ||
| Rule: A broken link changes nothing | ||
| A choices link that has lost its code — cut short by an email | ||
| program, or mistyped — explains itself. The page offers nothing to | ||
| press, so nobody's choices can be changed by a link that names no | ||
| one. | ||
|
|
||
| @case:leave-alone.a-broken-link-explains-itself | ||
| Scenario: A link with no code explains itself | ||
| When somebody opens the choices page from a broken link | ||
| Then they are told the link is invalid | ||
| And the page offers them nothing to press | ||
72 changes: 72 additions & 0 deletions
72
specs/catalogue/choosing-a-bulk-action-for-a-group.feature
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| @story:catalogue.choosing-a-bulk-action-for-a-group | ||
| @owner:catalogue @risk:low | ||
| @actor:organiser | ||
| @edition:managed @edition:self-hosted | ||
| @surface:admin | ||
| Feature: The organiser chooses what to do with a group from a landing page | ||
| An organiser with a group of listings opens the group's bulk-actions | ||
| page to see what they can do with the whole group at once. The page | ||
| always offers a copy, and it offers taking the group off sale or | ||
| bringing it back only when the action would do something — taking off | ||
| sale needs at least one listing still on sale, and bringing back | ||
| waits until every listing is off sale. An empty group has nothing to | ||
| switch either way, so only the copy is offered. | ||
|
|
||
| @rule:catalogue.bulk-actions-landing-offers-copy-and-deactivate-when-active | ||
| Rule: A group with active listings offers copy and deactivate | ||
| When every listing in the group is on sale, the organiser can copy | ||
| the group or take it off sale. The reactivate action is not offered, | ||
| because there is nothing off sale to bring back. | ||
|
|
||
| @case:catalogue.bulk-actions-landing-all-active | ||
| Scenario: An all-active group offers copy and deactivate | ||
| Given the site has a group called "Workshops" with "Spring Workshop" on sale | ||
| When the organiser opens the bulk actions page for the "Workshops" group | ||
| Then the organiser is offered a way to copy the group | ||
| And the organiser is offered a way to take the group off sale | ||
| And the organiser is not offered a way to bring the group back on sale | ||
| And the page says it holds 1 listing | ||
|
|
||
| @rule:catalogue.bulk-actions-landing-offers-copy-and-reactivate-when-inactive | ||
| Rule: A group with no active listings offers copy and reactivate | ||
| When every listing in the group is off sale, the organiser can copy | ||
| the group or bring it back on sale. The deactivate action is not | ||
| offered, because there is nothing on sale to take off. | ||
|
|
||
| @case:catalogue.bulk-actions-landing-all-inactive | ||
| Scenario: An all-inactive group offers copy and reactivate | ||
| Given the site has a group called "Finished" with "Old Season" on sale | ||
| And "Old Season" is taken off sale | ||
| When the organiser opens the bulk actions page for the "Finished" group | ||
| Then the organiser is offered a way to copy the group | ||
| And the organiser is offered a way to bring the group back on sale | ||
| And the organiser is not offered a way to take the group off sale | ||
| And the page says it holds 1 listing | ||
|
|
||
| @rule:catalogue.bulk-actions-landing-mixed-and-empty-groups | ||
| Rule: A mixed group can still be taken off sale; an empty group offers only the copy | ||
| A group with some listings on sale and some off can still be copied | ||
| and taken off sale — the deactivate link needs only one listing | ||
| still on sale. Bringing the group back needs every listing to be off | ||
| sale, so a mixed group is not offered it. A group with no listings | ||
| has nothing to switch either way, so only the copy is offered. | ||
|
coderabbitai[bot] marked this conversation as resolved.
Resolved
|
||
|
|
||
| @case:catalogue.bulk-actions-landing-mixed | ||
| Scenario: A mixed group offers copy and deactivate but not reactivate | ||
| Given the site has a group called "Mixed" with "Active One" on sale | ||
| And the site has a group called "Mixed" with "Inactive One" on sale | ||
| And "Inactive One" is taken off sale | ||
| When the organiser opens the bulk actions page for the "Mixed" group | ||
| Then the organiser is offered a way to copy the group | ||
| And the organiser is offered a way to take the group off sale | ||
| And the organiser is not offered a way to bring the group back on sale | ||
| And the page says it holds 2 listings | ||
|
|
||
| @case:catalogue.bulk-actions-landing-empty | ||
| Scenario: An empty group offers only the copy | ||
| Given the site has a group called "Empty" with no listings | ||
| When the organiser opens the bulk actions page for the "Empty" group | ||
| Then the organiser is offered a way to copy the group | ||
| And the organiser is not offered a way to take the group off sale | ||
| And the organiser is not offered a way to bring the group back on sale | ||
| And the page says it holds 0 listings | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.