Given that I’m logged in and have an opinion about a focus area, when I go to the focus area page, then I should see the number of supporters for the focus area
- And at the bottom of the page, see a button to support the focus area
- and by supporting the focus area, I should see a dialog that allows me to add a comment
- and I when I submit, then my support, username, timestamp, and comment should be visible on the page as an edit. And, I should see a confirmation dialog to show my support has been recorded.
- And I should not be able to support the focus area if I am not logged in
Developer notes: This is essentially about bringing https://gitlab.wikimedia.org/repos/commtech/add-me over to the new repo. AddMe was meant to be a general purpose "support this thing" kind of gadget but it lost steam. We can take just the bits we need.
Derived Requirement:
When a logged-in user visits a focus area page, they should see the number of supporters for the focus area. At the bottom of the page, there should be a button to support the focus area. Upon supporting, the user should be presented with a dialog to add a comment, and after submission, the support action (including username, timestamp, and comment) should be visible as an edit on the page. A confirmation dialog should also be shown to indicate that the support has been recorded. Users who are not logged in should not be able to support the focus area.
BDD
Feature: Support Focus Area Functionality
Scenario: Display number of supporters for a focus area
Given I’m logged in When I visit a focus area page Then I should see the number of supporters for the focus area
Scenario: Display support button for a focus area
Given I’m logged in When I visit a focus area page Then I should see a button to support the focus area at the bottom of the page
Scenario: Submit support with comment for a focus area
Given I’m logged in When I click the support button Then I should see a dialog allowing me to add a comment And when I submit the comment Then my support, username, timestamp, and comment should be visible on the page as an edit And I should see a confirmation dialog showing my support has been recorded
Scenario: Restrict support functionality for non-logged-in users
Given I’m not logged in When I visit a focus area page Then I should not be able to support the focus area
Test Steps
Test Case 1: Validate display of supporters count
Log in to the website.
Navigate to a focus area page.
✅❓❌⬜ AC1: Confirm that the number of supporters is visible on the page.
Test Case 2: Validate presence of support button
Log in to the website.
Navigate to a focus area page.
✅❓❌⬜ AC2: Confirm that a support button is visible at the bottom of the page.
Test Case 3: Validate submission of support with a comment
Log in to the website.
Navigate to a focus area page.
Click on the support button.
Enter a comment in the dialog that appears.
Submit the comment.
✅❓❌⬜ AC3: Confirm that the support, username, timestamp, and comment are visible as an edit on the page.
✅❓❌⬜ AC4: Confirm that a confirmation dialog appears indicating the support has been recorded.
Test Case 4: Validate restriction for non-logged-in users
Log out of the website.
Navigate to a focus area page.
✅❓❌⬜ AC5: Confirm that the support button is not usable or that attempting to support prompts a login requirement.
QA Results - Wishlist-test.toolforge
AC | Status | Details |
---|---|---|
1 | ✅ | T363231#10063100 |
2 | ✅ | T363231#10063100 |
3 | ❌ | T363231#10101379 |
4 | ✅ | T363231#10063100 |
5 | ❌ | T363231#10101379 |