ATM the "remove" menu item in Active Blocks links to Special:Unblock/username
Update this to link to Special:Unblock/?id=<blockid>, and in the Vue app capture the link click, and when it is clicked
Remove this link, and instead handle it as a button within the Vue app. When it is clicked:
- use the unblock API to
editremove the block - update the active block table when the API request is successful
- if the API request is not successful, display an error
Derived Requirement:
Update the "remove" menu item in Active Blocks to link to Special:Unblock/?id=<blockid> instead of Special:Unblock/username. In the Vue app, implement the following functionality:
- Capture the link click event.
- Use the unblock API to edit the block.
- Update the Active Blocks table when the unblock API request is successful.
- Display an error message if the unblock API request fails.
Test Steps
Test Case 1: Ensure "Remove" Menu Item Links to Correct URL
- Open the Active Blocks page.
- Locate the "remove" menu item next to an active block.
- Click the "remove" menu item.
- ✅❓❌⬜ AC1: Verify that the URL is updated to Special:Unblock/?id=<blockid>.
Test Case 2: Ensure API is Called to Unblock a User
- Open the Active Blocks page.
- Locate and click the "remove" menu item next to an active block.
- Capture the network request.
- ✅❓❌⬜ AC2: Confirm that the unblock API is called with the appropriate block ID.
Test Case 3: Ensure Active Block Table is Updated After Successful API Request
- Open the Active Blocks page.
- Locate and click the "remove" menu item next to an active block.
- Wait for the API request to complete successfully.
- ✅❓❌⬜ AC3: Verify that the active block table is updated to reflect the successful unblock.
Test Case 4: Ensure Error is Displayed After Failed API Request
- Open the Active Blocks page.
- Locate and click the "remove" menu item next to an active block.
- Simulate a failed API request.
- ✅❓❌⬜ AC4: Ensure an error message is displayed when the API request fails.
QA Results - Local
| AC | Status | Details |
|---|---|---|
| 1 | ❓ | T380189#10519567 |
| 2 | ✅ | T380189#10519567 |
| 3 | ✅ | T380189#10519567 |
| 4 | ✅ | T380189#10519567 |
Environment
Local Mediawiki: 1.44.0-alpha (e132441) 20:01, 3 February 2025



